Skip to content

Instantly share code, notes, and snippets.

@imlucas
Created March 14, 2016 18:57
Show Gist options
  • Save imlucas/7a8956cf153595168109 to your computer and use it in GitHub Desktop.
Save imlucas/7a8956cf153595168109 to your computer and use it in GitHub Desktop.
var asar = require('asar');
function createApplicationAsar(CONFIG, done) {
var opts = {
// ordering: path.resolve(__dirname, '..',
// 'resources', 'asar-ordering-hint.txt'),
unpack: '{' + [
'*.node',
'**/vendor/**'
].join(',') + '}'
};
var src = path.join(CONFIG.resources, 'app');
var dest = path.join(CONFIG.resources, 'app.asar');
asar.createPackageWithOptions(src, dest, opts, function() {
del(src, {force: true}).then(function() {
done();
}, done);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment