diff options
| author | Alexandre Flament <alex@al-f.net> | 2021-06-16 15:51:43 +0200 |
|---|---|---|
| committer | Alexandre Flament <alex@al-f.net> | 2021-06-16 16:04:58 +0200 |
| commit | 14ba56fd1a9e82206f964a8830953a1b51eecbdd (patch) | |
| tree | f8e6aecfb7c1b03041d8e73004aeffb2855516d3 | |
| parent | c01325688158fdde886e2ecb347d8d4d9707a84d (diff) | |
[mod] make node.clean: call the "clean" script from the packages.json
The dependencies and build process are described in the gruntfiles.js and packages.json files.
It makes sense to move the clean up to these files too.
| -rwxr-xr-x | manage | 11 | ||||
| -rw-r--r-- | searx/static/themes/oscar/package.json | 22 | ||||
| -rw-r--r-- | searx/static/themes/simple/package.json | 3 |
3 files changed, 19 insertions, 17 deletions
@@ -310,14 +310,11 @@ node.env() { } node.clean() { - build_msg CLEAN "locally installed npm dependencies" - rm -rf \ - ./searx/static/themes/oscar/package-lock.json \ - ./searx/static/themes/oscar/node_modules \ - ./searx/static/themes/simple/package-lock.json \ - ./searx/static/themes/simple/node_modules - ./searx/static/themes/simple/ion.less \ + ( set -e + npm --prefix searx/static/themes/oscar run clean + npm --prefix searx/static/themes/simple run clean + ) dump_return $? } diff --git a/searx/static/themes/oscar/package.json b/searx/static/themes/oscar/package.json index 8a3d48787..94883873d 100644 --- a/searx/static/themes/oscar/package.json +++ b/searx/static/themes/oscar/package.json @@ -1,23 +1,27 @@ { "devDependencies": { - "grunt": "^1.3.0", - "grunt-cli": "^1.3.2", + "grunt": "~1.4.1", + "grunt-cli": "^1.4.3", "grunt-contrib-concat": "~1.0.1", "grunt-contrib-copy": "^1.0.0", "grunt-contrib-jshint": "~3.0.0", "grunt-contrib-less": "~3.0.0", - "grunt-contrib-uglify": "~5.0.0", - "grunt-contrib-watch": "~1.1.0" - }, - "scripts": { - "build": "npm install && grunt", - "start": "grunt watch", - "test": "grunt" + "grunt-contrib-uglify": "~5.0.1", + "grunt-contrib-watch": "~1.1.0", + "jslint": "^0.12.1", + "less": "^4.1.1", + "less-plugin-clean-css": "^1.5.1" }, "dependencies": { "bootstrap": "^3.4.1", "corejs-typeahead": "^1.3.1", "jquery": "^3.6.0", "leaflet": "^1.7.1" + }, + "scripts": { + "all": "npm install && grunt", + "build": "grunt", + "watch": "grunt watch", + "clean": "rm -Rf node_modules package-lock.json" } } diff --git a/searx/static/themes/simple/package.json b/searx/static/themes/simple/package.json index e23157bf4..22357a4c7 100644 --- a/searx/static/themes/simple/package.json +++ b/searx/static/themes/simple/package.json @@ -22,6 +22,7 @@ "scripts": { "all": "npm install && grunt", "build": "grunt", - "watch": "grunt watch" + "watch": "grunt watch", + "clean": "rm -Rf node_modules package-lock.json ion.less" } } |