mirror of
https://github.com/gchq/CyberChef
synced 2025-01-04 00:38:41 +00:00
add dev builds for node
This commit is contained in:
parent
7522e5de33
commit
781ff956e3
2 changed files with 24 additions and 1 deletions
23
Gruntfile.js
23
Gruntfile.js
|
@ -28,7 +28,11 @@ module.exports = function (grunt) {
|
||||||
|
|
||||||
grunt.registerTask("node",
|
grunt.registerTask("node",
|
||||||
"Compiles CyberChef into a single NodeJS module.",
|
"Compiles CyberChef into a single NodeJS module.",
|
||||||
["clean", "exec:generateConfig", "exec:generateNodeIndex", "webpack:node", "webpack:nodeRepl", "chmod:build"]);
|
["clean", "exec:generateConfig", "exec:generateNodeIndex", "webpack:node", "chmod:build"]);
|
||||||
|
|
||||||
|
grunt.registerTask("node-prod",
|
||||||
|
"Compiles CyberChef into a single NodeJS module.",
|
||||||
|
["clean", "exec:generateConfig", "exec:generateNodeIndex", "webpack:nodeProd", "webpack:nodeRepl", "chmod:build"]);
|
||||||
|
|
||||||
grunt.registerTask("test",
|
grunt.registerTask("test",
|
||||||
"A task which runs all the operation tests in the tests directory.",
|
"A task which runs all the operation tests in the tests directory.",
|
||||||
|
@ -270,6 +274,23 @@ module.exports = function (grunt) {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
node: {
|
node: {
|
||||||
|
mode: "development",
|
||||||
|
target: "node",
|
||||||
|
entry: "./src/node/index.mjs",
|
||||||
|
externals: [NodeExternals({
|
||||||
|
whitelist: ["crypto-api/src/crypto-api"]
|
||||||
|
})],
|
||||||
|
output: {
|
||||||
|
filename: "CyberChef.js",
|
||||||
|
path: __dirname + "/build/node",
|
||||||
|
library: "CyberChef",
|
||||||
|
libraryTarget: "commonjs2"
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
new webpack.DefinePlugin(BUILD_CONSTANTS)
|
||||||
|
],
|
||||||
|
},
|
||||||
|
nodeProd: {
|
||||||
mode: "production",
|
mode: "production",
|
||||||
target: "node",
|
target: "node",
|
||||||
entry: "./src/node/index.mjs",
|
entry: "./src/node/index.mjs",
|
||||||
|
|
|
@ -138,7 +138,9 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "grunt dev",
|
"start": "grunt dev",
|
||||||
|
"start-node": "grunt node",
|
||||||
"build": "grunt prod",
|
"build": "grunt prod",
|
||||||
|
"build-node": "grunt node-prod",
|
||||||
"test": "grunt test",
|
"test": "grunt test",
|
||||||
"testui": "grunt testui",
|
"testui": "grunt testui",
|
||||||
"docs": "grunt docs",
|
"docs": "grunt docs",
|
||||||
|
|
Loading…
Reference in a new issue