1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-21 09:38:01 +02:00

Tools: Added clean script

This commit is contained in:
Laurent Cozic 2020-10-10 13:02:37 +01:00
parent f007735936
commit 6c84fdc51d
3 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,11 @@
const utils = require('../utils');
const rootDir = utils.rootDir();
const fs = require('fs-extra');
module.exports = {
src: '',
fn: async function() {
await fs.remove(`${rootDir}/CliClient/tests-build`);
await fs.remove(`${rootDir}/CliClient/build`);
},
};

View File

@ -5,8 +5,13 @@ const tasks = {
copyLib: require('./Tools/gulp/tasks/copyLib'),
tsc: require('./Tools/gulp/tasks/tsc'),
updateIgnoredTypeScriptBuild: require('./Tools/gulp/tasks/updateIgnoredTypeScriptBuild'),
deleteBuildDirs: require('./Tools/gulp/tasks/deleteBuildDirs'),
};
utils.registerGulpTasks(gulp, tasks);
gulp.task('build', gulp.series('copyLib', 'tsc', 'updateIgnoredTypeScriptBuild'));
// The clean task removes build directories and copy back the library. This is useful
// when switching from one branch to another.
gulp.task('clean', gulp.series('deleteBuildDirs', 'copyLib'));

View File

@ -8,6 +8,7 @@
"watch": "node node_modules/typescript/bin/tsc --watch --project tsconfig.dev.json",
"build": "gulp build",
"setupNewRelease": "node ./Tools/setupNewRelease",
"clean": "npm run clean",
"postinstall": "cd Tools && npm i && cd .. && cd ReactNativeClient && npm i && cd .. && cd ElectronClient && npm i && cd .. && cd CliClient && npm i && cd .. && gulp build"
},
"husky": {