Skip to content

Commit

Permalink
Add cleanAll gulp task
Browse files Browse the repository at this point in the history
  • Loading branch information
blindguardian50 committed Mar 22, 2024
1 parent 8633918 commit 3e8d302
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,16 @@ npm install
## Gulp Build And Development

Gulp is used to automate repeatable tasks. The file [gulpfile.js](gulpfile.js)
defines three public tasks:
defines four public tasks:

- The `clean` task removes existing `package` and `dist` directories in
order to enable a clean rebuild of the project.

- The `cleanAll` task executes the `clean` task and additionally removes
the `node_modules` directory and `package-lock.json` in
order to enable a clean rebuild of the project including
the re-installation of dependencies.

- The `build` task first executes the clean task, then creates a new
build of the framework and copies the self-contained examples into
the freshly created `dist` folder.
Expand All @@ -55,6 +60,9 @@ The public tasks can be invoked either by directly running gulp via npx or
by running the equivalent scripts in package.json:

```
npm run cleanAll
npx gulp cleanAll
npm run clean
npx gulp clean
Expand Down
10 changes: 10 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,20 @@ function cleanPackage() {
return del('package', { force: true });
}

function cleanPackageLock() {
return del('package-lock.json', { force: true });
}

function cleanNodeModules() {
return del('node_modules', { force: true });
}

// # Public tasks

exports.clean = gulp.parallel(cleanDist, cleanPackage);

exports.cleanAll = gulp.parallel(exports.clean, cleanPackageLock, cleanNodeModules)

// TODO: add proxy respvis.js for typescript support in all concerned directories
exports.build = gulp.series(
exports.clean,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
],
"types": "./package/index.d.ts",
"scripts": {
"cleanAll": "npx gulp cleanAll",
"clean": "npx gulp clean",
"build": "npx gulp build",
"dev": "npx gulp serve --dev",
Expand Down

0 comments on commit 3e8d302

Please sign in to comment.