Skip to content

Commit

Permalink
refactor: remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
macabeus committed Jul 14, 2019
1 parent 43e50eb commit e508893
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/App.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Fragment, Component, useEffect, useState } from 'react';
import React, { Fragment, useEffect, useState } from 'react';
import { render } from 'react-dom';
import useWasm from '../use-wasm/index.js';

Expand Down Expand Up @@ -179,7 +179,7 @@ function App() {

return (
<Fragment>
<canvas id='preview' onClick={ev => {
<canvas id='preview' onClick={() => {
if (filter >= FILTER_LIMIT) {
setFilter(0);
return;
Expand Down
4 changes: 2 additions & 2 deletions use-wasm/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useEffect } from 'react';
import { useState, useEffect } from 'react';

function useWasm(filename) {
const filepath = filename + '.wasm';
Expand Down Expand Up @@ -30,7 +30,7 @@ function useWasm(filename) {
};

if (typeof WebAssembly.instantiateStreaming === 'function') {
const load = WebAssembly.instantiateStreaming(fetch(filepath), importObj)
WebAssembly.instantiateStreaming(fetch(filepath), importObj)
.then(results => {
setInstance(results.instance.exports)
});
Expand Down
2 changes: 0 additions & 2 deletions xwasm/build.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
function Build(rootPath, filePath = '', exportedFunctions, output) {
const path = require('path');
const fs = require('fs');
const { spawn } = require('child_process');

// exported_functions: `['_doubler']`
Expand Down
2 changes: 1 addition & 1 deletion xwasm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const argv = process.argv;
const path = require('path');

function guide(argument) {
function guide() {
console.log('\nAvailable commands: install, build, version\n Docs: https://github.com/raphamorim/wasm')
}

Expand Down
2 changes: 1 addition & 1 deletion xwasm/install.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function InstallEmscripten(rootPath) {
const path = require('path');
const fs = require('fs');
const { spawn, execSync } = require('child_process');
const { spawn } = require('child_process');

console.log('Installing SDK in:', process.cwd())

Expand Down

0 comments on commit e508893

Please sign in to comment.