1
0
mirror of synced 2024-11-14 18:27:40 +01:00

Rejigged grunt tasks.

This commit is contained in:
n1474335 2019-07-09 14:31:18 +01:00
parent 29cb273d08
commit d1ad2d0845
2 changed files with 25 additions and 22 deletions

View File

@ -11,7 +11,6 @@ before_script:
script:
- grunt lint
- grunt test
- grunt test-node
- grunt docs
- npm run node-prod
- grunt prod --msg="$COMPILE_MSG"

View File

@ -26,26 +26,6 @@ module.exports = function (grunt) {
"A persistent task which creates a development build whenever source files are modified.",
["clean:dev", "clean:config", "exec:generateConfig", "concurrent:dev"]);
grunt.registerTask("node",
"Compiles CyberChef into a single NodeJS module.",
["clean", "exec:generateConfig", "exec:generateNodeIndex", "webpack:node", "webpack:nodeRepl", "chmod:build"]);
grunt.registerTask("test",
"A task which runs all the operation tests in the tests directory.",
["clean", "exec:generateConfig", "exec:opTests"]);
grunt.registerTask("testui",
"A task which runs all the UI tests in the tests directory. The prod task must already have been run.",
["connect:prod", "exec:browserTests"]);
grunt.registerTask("test-node",
"Run all the node tests in the tests directory",
["clean", "exec:generateConfig", "exec:generateNodeIndex", "exec:nodeTests"]);
grunt.registerTask("docs",
"Compiles documentation in the /docs directory.",
["clean:docs", "jsdoc", "chmod:docs"]);
grunt.registerTask("prod",
"Creates a production-ready build. Use the --msg flag to add a compile message.",
[
@ -53,6 +33,29 @@ module.exports = function (grunt) {
"copy:standalone", "zip:standalone", "clean:standalone", "chmod"
]);
grunt.registerTask("node",
"Compiles CyberChef into a single NodeJS module.",
[
"clean:node", "clean:config", "clean:nodeConfig", "exec:generateConfig",
"exec:generateNodeIndex", "webpack:node", "webpack:nodeRepl", "chmod:build"
]);
grunt.registerTask("test",
"A task which runs all the operation tests in the tests directory.",
[
"clean:config", "clean:nodeConfig", "exec:generateConfig", "exec:generateNodeIndex",
"exec:nodeTests", "exec:opTests"
]);
grunt.registerTask("testui",
"A task which runs all the UI tests in the tests directory. The prod task must already have been run.",
["connect:prod", "exec:browserTests"]);
grunt.registerTask("docs",
"Compiles documentation in the /docs directory.",
["clean:docs", "jsdoc", "chmod:docs"]);
grunt.registerTask("default",
"Lints the code base",
["eslint", "exec:repoSize"]);
@ -110,7 +113,8 @@ module.exports = function (grunt) {
dev: ["build/dev/*"],
prod: ["build/prod/*"],
node: ["build/node/*"],
config: ["src/core/config/OperationConfig.json", "src/core/config/modules/*", "src/code/operations/index.mjs", "src/node/index.mjs", "src/node/config/OperationConfig.json"],
config: ["src/core/config/OperationConfig.json", "src/core/config/modules/*", "src/code/operations/index.mjs"],
nodeConfig: ["src/node/index.mjs", "src/node/config/OperationConfig.json"],
docs: ["docs/*", "!docs/*.conf.json", "!docs/*.ico", "!docs/*.png"],
standalone: ["build/prod/CyberChef*.html"]
},