Unpack native module files

It improves performance and makes virus scanners happy
This commit is contained in:
Cheng Zhao
2015-03-25 16:46:36 +08:00
parent 3ce12693e6
commit 2d9f2091c5
2 changed files with 2 additions and 2 deletions

View File

@@ -6,7 +6,7 @@
"url": "https://github.com/atom/atom.git"
},
"dependencies": {
"asar": "^0.2.2",
"asar": "^0.4.0",
"async": "~0.2.9",
"donna": "1.0.7",
"formidable": "~1.0.14",

View File

@@ -13,7 +13,7 @@ module.exports = (grunt) ->
grunt.log.error 'The app has to be built before generating asar archive.'
return done(false)
asar.createPackage appDir, path.resolve(appDir, '..', 'app.asar'), (err) ->
asar.createPackageWithOptions appDir, path.resolve(appDir, '..', 'app.asar'), {unpack: '*.node'}, (err) ->
return done(err) if err?
rm appDir
done()