1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-08-16 01:54:53 +02:00

Adding version scripts

This commit is contained in:
Antonio Laguna
2017-09-16 22:29:34 +02:00
parent 3b7203c9ab
commit b1e03202e3
5 changed files with 160 additions and 5 deletions

21
zip-release.js Normal file
View File

@@ -0,0 +1,21 @@
/* eslint-disable no-console */
const fs = require('fs');
const archiver = require('archiver');
const pck = require('./package.json');
const output = fs.createWriteStream(`${__dirname}/${pck.name}.zip`);
const archive = archiver('zip', { zlib: { level: 9 } });
output.on('close', () => {
console.log(`${archive.pointer()} total bytes`);
});
archive.on('error', err => {
throw err;
});
archive.pipe(output);
pck.release.files.forEach(f => archive.glob(f));
archive.finalize();