Rename scripts
folder to js-build
This commit is contained in:
parent
c07eccb468
commit
ae0091fbae
15 changed files with 7 additions and 7 deletions
29
js-build/clean.js
Normal file
29
js-build/clean.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const fs = require('fs-extra');
|
||||
const { onError } = require('./utils');
|
||||
|
||||
const ROOT = path.resolve(__dirname, '..');
|
||||
|
||||
async function getClean(source) {
|
||||
await fs.remove(source);
|
||||
}
|
||||
|
||||
module.exports = getClean;
|
||||
|
||||
if (require.main === module) {
|
||||
(async () => {
|
||||
try {
|
||||
await getClean(path.join(ROOT, 'build'));
|
||||
await getClean(path.join(ROOT, '.signatures.json'));
|
||||
await getClean(path.join(ROOT, 'pdf-reader/build'));
|
||||
await getClean(path.join(ROOT, 'pdf-worker/build'));
|
||||
await getClean(path.join(ROOT, 'note-editor/build'));
|
||||
} catch (err) {
|
||||
process.exitCode = 1;
|
||||
global.isError = true;
|
||||
onError(err);
|
||||
}
|
||||
})();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue