mirror of
https://github.com/gchq/CyberChef.git
synced 2025-06-17 11:45:07 -04:00
Operations can now set options from within the worker
This commit is contained in:
parent
13f07abb8a
commit
f6b52b7c82
10 changed files with 81 additions and 38 deletions
21
Gruntfile.js
21
Gruntfile.js
|
@ -72,7 +72,16 @@ module.exports = function (grunt) {
|
|||
BUILD_CONSTANTS = {
|
||||
COMPILE_TIME: JSON.stringify(compileTime),
|
||||
COMPILE_MSG: JSON.stringify(grunt.option("compile-msg") || grunt.option("msg") || ""),
|
||||
PKG_VERSION: JSON.stringify(pkg.version)
|
||||
PKG_VERSION: JSON.stringify(pkg.version),
|
||||
ENVIRONMENT_IS_WORKER: function() {
|
||||
return typeof importScripts === "function";
|
||||
},
|
||||
ENVIRONMENT_IS_NODE: function() {
|
||||
return typeof process === "object" && typeof require === "function";
|
||||
},
|
||||
ENVIRONMENT_IS_WEB: function() {
|
||||
return typeof window === "object";
|
||||
}
|
||||
},
|
||||
moduleEntryPoints = listEntryModules();
|
||||
|
||||
|
@ -277,7 +286,10 @@ module.exports = function (grunt) {
|
|||
output: {
|
||||
filename: "index.js",
|
||||
path: __dirname + "/build/test"
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin(BUILD_CONSTANTS)
|
||||
]
|
||||
},
|
||||
node: {
|
||||
target: "node",
|
||||
|
@ -288,7 +300,10 @@ module.exports = function (grunt) {
|
|||
path: __dirname + "/build/node",
|
||||
library: "CyberChef",
|
||||
libraryTarget: "commonjs2"
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin(BUILD_CONSTANTS)
|
||||
]
|
||||
}
|
||||
},
|
||||
"webpack-dev-server": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue