first commit
This commit is contained in:
16
scripts/npm-start.js
Normal file
16
scripts/npm-start.js
Normal file
@ -0,0 +1,16 @@
|
||||
/* eslint-env node */
|
||||
'use strict';
|
||||
|
||||
const runAll = require('npm-run-all');
|
||||
|
||||
runAll(['develop', 'upload'], {
|
||||
parallel: true,
|
||||
stdout: process.stdout,
|
||||
stdin: process.stdin,
|
||||
}).catch(({ results }) => {
|
||||
results
|
||||
.filter(({ code }) => code)
|
||||
.forEach(({ name }) => {
|
||||
console.log(`"npm run ${name}" was failed`);
|
||||
});
|
||||
});
|
15
scripts/prepare-private-key.js
Normal file
15
scripts/prepare-private-key.js
Normal file
@ -0,0 +1,15 @@
|
||||
/* eslint-env node */
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const RSA = require('node-rsa');
|
||||
|
||||
const key = new RSA({ b: 1024 });
|
||||
const privateKey = key.exportKey('pkcs1-private');
|
||||
const privateKeyFile = './private.ppk';
|
||||
|
||||
if (!fs.existsSync(privateKeyFile)) {
|
||||
fs.writeFile(privateKeyFile, privateKey, (err) => {
|
||||
err && console.error(err);
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user