Skip to content

Commit

Permalink
removes the following files automatically before compiling
Browse files Browse the repository at this point in the history
- `.git`, `a.exe`, `a.out`
- `node_modules/node/bin/node.exe`
- `node_modules/.bin/node.exe`
- `node_modules/node/bin/node`
- `node_modules/.bin/node`
- fixes #57
  • Loading branch information
pmq20 committed Jul 27, 2017
1 parent 05eb8c5 commit 945cedc
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
- fix the example code on compiling a web application
- fixes https://github.com/pmq20/node-compiler/issues/50
- fixes https://github.com/pmq20/node-compiler/issues/59
- removes the following files automatically before compiling
- `.git`, `a.exe`, `a.out`
- `node_modules/node/bin/node.exe`
- `node_modules/.bin/node.exe`
- `node_modules/node/bin/node`
- `node_modules/.bin/node`
- fixes https://github.com/pmq20/node-compiler/issues/57

## v1.4.0

Expand Down
24 changes: 24 additions & 0 deletions lib/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,30 @@ def npm_install
STDERR.puts `git status` unless @options[:quiet]
@utils.rm_rf('.git')
end
if File.exist?('a.exe')
STDERR.puts `dir a.exe`
@utils.rm_rf('a.exe')
end
if File.exist?('a.out')
STDERR.puts `ls -l a.out`
@utils.rm_rf('a.out')
end
if File.exist?('node_modules/node/bin/node.exe')
STDERR.puts `dir node_modules\\node\\bin\\node.exe`
@utils.rm_rf('node_modules\node\bin\node.exe')
end
if File.exist?('node_modules/.bin/node.exe')
STDERR.puts `dir node_modules\\.bin\\node.exe`
@utils.rm_rf('node_modules\.bin\node.exe')
end
if File.exist?('node_modules/node/bin/node')
STDERR.puts `ls -l node_modules/node/bin/node`
@utils.rm_rf('node_modules/node/bin/node')
end
if File.exist?('node_modules/.bin/node')
STDERR.puts `ls -l node_modules/.bin/node`
@utils.rm_rf('node_modules/.bin/node')
end
end
end

Expand Down

0 comments on commit 945cedc

Please sign in to comment.