Skip to content

Commit

Permalink
build: remove the tools folder (electron#24880)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound authored Aug 7, 2020
1 parent b0ea1e1 commit 433956c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ action("electron_js2c") {
inputs = sources + [ "//third_party/electron_node/tools/js2c.py" ]
outputs = [ "$root_gen_dir/electron_natives.cc" ]

script = "tools/js2c.py"
script = "build/js2c.py"
args = [ rebase_path("//third_party/electron_node") ] +
rebase_path(outputs, root_build_dir) +
rebase_path(sources, root_build_dir)
Expand Down
File renamed without changes.
17 changes: 17 additions & 0 deletions script/run-if-exists.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const cp = require('child_process');
const fs = require('fs');

const checkPath = process.argv[2];
const command = process.argv.slice(3);

if (fs.existsSync(checkPath)) {
const child = cp.spawn(
`${command[0]}${process.platform === 'win32' ? '.cmd' : ''}`,
command.slice(1),
{
stdio: 'inherit',
cwd: checkPath
}
);
child.on('exit', code => process.exit(code));
}
2 changes: 1 addition & 1 deletion spec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"main": "static/main.js",
"version": "0.1.0",
"scripts": {
"postinstall": "node ../tools/run-if-exists.js node_modules/robotjs node-gyp rebuild"
"postinstall": "node ../script/run-if-exists.js node_modules/robotjs node-gyp rebuild"
},
"devDependencies": {
"basic-auth": "^2.0.1",
Expand Down
17 changes: 0 additions & 17 deletions tools/run-if-exists.js

This file was deleted.

0 comments on commit 433956c

Please sign in to comment.