mirror of
https://github.com/zotero/zotero.git
synced 2026-08-28 05:25:31 +00:00
Some checks are pending
CI / Build, Upload, Test (push) Waiting to run
Repo moved to zotero/document-worker on GitHub
After pulling, run:
git submodule sync
git submodule update --init document-worker
If an old `pdf-worker/` directory is left behind, it can be removed manually.
29 lines
No EOL
678 B
JavaScript
29 lines
No EOL
678 B
JavaScript
'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, 'reader/build'));
|
|
await getClean(path.join(ROOT, 'document-worker/build'));
|
|
await getClean(path.join(ROOT, 'note-editor/build'));
|
|
} catch (err) {
|
|
process.exitCode = 1;
|
|
global.isError = true;
|
|
onError(err);
|
|
}
|
|
})();
|
|
} |