mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-02 12:47:41 +02:00
Tools: Added clean script
This commit is contained in:
parent
f007735936
commit
6c84fdc51d
11
Tools/gulp/tasks/deleteBuildDirs.js
Normal file
11
Tools/gulp/tasks/deleteBuildDirs.js
Normal 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`);
|
||||||
|
},
|
||||||
|
};
|
@ -5,8 +5,13 @@ const tasks = {
|
|||||||
copyLib: require('./Tools/gulp/tasks/copyLib'),
|
copyLib: require('./Tools/gulp/tasks/copyLib'),
|
||||||
tsc: require('./Tools/gulp/tasks/tsc'),
|
tsc: require('./Tools/gulp/tasks/tsc'),
|
||||||
updateIgnoredTypeScriptBuild: require('./Tools/gulp/tasks/updateIgnoredTypeScriptBuild'),
|
updateIgnoredTypeScriptBuild: require('./Tools/gulp/tasks/updateIgnoredTypeScriptBuild'),
|
||||||
|
deleteBuildDirs: require('./Tools/gulp/tasks/deleteBuildDirs'),
|
||||||
};
|
};
|
||||||
|
|
||||||
utils.registerGulpTasks(gulp, tasks);
|
utils.registerGulpTasks(gulp, tasks);
|
||||||
|
|
||||||
gulp.task('build', gulp.series('copyLib', 'tsc', 'updateIgnoredTypeScriptBuild'));
|
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'));
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
"watch": "node node_modules/typescript/bin/tsc --watch --project tsconfig.dev.json",
|
"watch": "node node_modules/typescript/bin/tsc --watch --project tsconfig.dev.json",
|
||||||
"build": "gulp build",
|
"build": "gulp build",
|
||||||
"setupNewRelease": "node ./Tools/setupNewRelease",
|
"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"
|
"postinstall": "cd Tools && npm i && cd .. && cd ReactNativeClient && npm i && cd .. && cd ElectronClient && npm i && cd .. && cd CliClient && npm i && cd .. && gulp build"
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
|
Loading…
Reference in New Issue
Block a user