2017-09-22 16:05:15 +00:00
|
|
|
"use strict";
|
|
|
|
|
2017-04-13 18:00:55 +00:00
|
|
|
const webpack = require("webpack");
|
|
|
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
2018-12-25 23:58:00 +00:00
|
|
|
const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
|
2017-08-01 14:42:09 +00:00
|
|
|
const NodeExternals = require("webpack-node-externals");
|
2017-04-13 18:00:55 +00:00
|
|
|
const Inliner = require("web-resource-inliner");
|
2018-03-26 22:14:23 +00:00
|
|
|
const glob = require("glob");
|
|
|
|
const path = require("path");
|
2016-12-14 16:39:17 +00:00
|
|
|
|
2017-07-03 22:15:57 +00:00
|
|
|
/**
|
|
|
|
* Grunt configuration for building the app in various formats.
|
|
|
|
*
|
|
|
|
* @author n1474335 [n1474335@gmail.com]
|
|
|
|
* @copyright Crown Copyright 2017
|
|
|
|
* @license Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2017-03-23 00:33:40 +00:00
|
|
|
module.exports = function (grunt) {
|
2016-11-28 10:42:58 +00:00
|
|
|
grunt.file.defaultEncoding = "utf8";
|
|
|
|
grunt.file.preserveBOM = false;
|
2016-12-14 16:39:17 +00:00
|
|
|
|
2016-11-28 10:42:58 +00:00
|
|
|
// Tasks
|
|
|
|
grunt.registerTask("dev",
|
|
|
|
"A persistent task which creates a development build whenever source files are modified.",
|
2018-08-29 18:21:46 +00:00
|
|
|
["clean:dev", "clean:config", "exec:generateConfig", "concurrent:dev"]);
|
2017-03-21 22:41:44 +00:00
|
|
|
|
|
|
|
grunt.registerTask("node",
|
|
|
|
"Compiles CyberChef into a single NodeJS module.",
|
2018-05-16 09:25:29 +00:00
|
|
|
["clean:node", "clean:config", "exec:generateConfig", "webpack:node", "chmod:build"]);
|
2016-12-14 16:39:17 +00:00
|
|
|
|
2017-02-23 18:59:58 +00:00
|
|
|
grunt.registerTask("test",
|
2018-12-29 02:58:05 +00:00
|
|
|
"A task which runs all the operation tests in the tests directory.",
|
|
|
|
["exec:generateConfig", "exec:opTests"]);
|
|
|
|
|
|
|
|
grunt.registerTask("testui",
|
|
|
|
"A task which runs all the UI tests in the tests directory. Requires the dev server to be running.",
|
2018-12-29 23:46:13 +00:00
|
|
|
["connect:prod", "exec:browserTests"]);
|
2016-12-14 16:39:17 +00:00
|
|
|
|
2016-11-28 10:42:58 +00:00
|
|
|
grunt.registerTask("docs",
|
|
|
|
"Compiles documentation in the /docs directory.",
|
|
|
|
["clean:docs", "jsdoc", "chmod:docs"]);
|
2016-12-14 16:39:17 +00:00
|
|
|
|
2017-03-27 15:08:36 +00:00
|
|
|
grunt.registerTask("prod",
|
|
|
|
"Creates a production-ready build. Use the --msg flag to add a compile message.",
|
2018-08-29 18:21:46 +00:00
|
|
|
["eslint", "clean:prod", "clean:config", "exec:generateConfig", "webpack:web", "inline", "chmod"]);
|
2016-12-03 00:37:38 +00:00
|
|
|
|
2016-11-28 10:42:58 +00:00
|
|
|
grunt.registerTask("default",
|
2017-03-29 20:51:42 +00:00
|
|
|
"Lints the code base",
|
|
|
|
["eslint", "exec:repoSize"]);
|
2016-12-14 16:39:17 +00:00
|
|
|
|
2017-03-27 15:08:36 +00:00
|
|
|
grunt.registerTask("inline",
|
|
|
|
"Compiles a production build of CyberChef into a single, portable web page.",
|
2018-05-16 09:25:29 +00:00
|
|
|
["exec:generateConfig", "webpack:webInline", "runInliner", "clean:inlineScripts"]);
|
2017-03-27 15:08:36 +00:00
|
|
|
|
2017-08-24 23:25:49 +00:00
|
|
|
|
|
|
|
grunt.registerTask("runInliner", runInliner);
|
2016-11-28 10:42:58 +00:00
|
|
|
grunt.registerTask("doc", "docs");
|
2017-02-28 17:08:36 +00:00
|
|
|
grunt.registerTask("tests", "test");
|
2016-12-14 16:39:17 +00:00
|
|
|
grunt.registerTask("lint", "eslint");
|
|
|
|
|
|
|
|
|
2016-11-28 10:42:58 +00:00
|
|
|
// Load tasks provided by each plugin
|
2016-12-14 16:39:17 +00:00
|
|
|
grunt.loadNpmTasks("grunt-eslint");
|
2017-03-27 15:08:36 +00:00
|
|
|
grunt.loadNpmTasks("grunt-webpack");
|
2016-11-28 10:42:58 +00:00
|
|
|
grunt.loadNpmTasks("grunt-jsdoc");
|
|
|
|
grunt.loadNpmTasks("grunt-contrib-clean");
|
|
|
|
grunt.loadNpmTasks("grunt-contrib-copy");
|
2018-05-06 11:24:01 +00:00
|
|
|
grunt.loadNpmTasks("grunt-contrib-watch");
|
2016-11-28 10:42:58 +00:00
|
|
|
grunt.loadNpmTasks("grunt-chmod");
|
|
|
|
grunt.loadNpmTasks("grunt-exec");
|
2017-04-05 20:30:22 +00:00
|
|
|
grunt.loadNpmTasks("grunt-accessibility");
|
2017-09-17 12:47:33 +00:00
|
|
|
grunt.loadNpmTasks("grunt-concurrent");
|
2018-12-29 23:46:13 +00:00
|
|
|
grunt.loadNpmTasks("grunt-contrib-connect");
|
2016-12-14 16:39:17 +00:00
|
|
|
|
|
|
|
|
2017-03-27 15:08:36 +00:00
|
|
|
// Project configuration
|
2017-05-02 22:03:28 +00:00
|
|
|
const compileTime = grunt.template.today("UTC:dd/mm/yyyy HH:MM:ss") + " UTC",
|
2017-07-03 22:15:57 +00:00
|
|
|
pkg = grunt.file.readJSON("package.json"),
|
|
|
|
webpackConfig = require("./webpack.config.js"),
|
|
|
|
BUILD_CONSTANTS = {
|
|
|
|
COMPILE_TIME: JSON.stringify(compileTime),
|
|
|
|
COMPILE_MSG: JSON.stringify(grunt.option("compile-msg") || grunt.option("msg") || ""),
|
2017-09-19 23:37:57 +00:00
|
|
|
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";
|
|
|
|
}
|
2017-08-09 19:09:23 +00:00
|
|
|
},
|
|
|
|
moduleEntryPoints = listEntryModules();
|
2016-11-28 10:42:58 +00:00
|
|
|
|
2017-03-27 15:08:36 +00:00
|
|
|
/**
|
|
|
|
* Compiles a production build of CyberChef into a single, portable web page.
|
|
|
|
*/
|
|
|
|
function runInliner() {
|
2017-04-13 18:00:55 +00:00
|
|
|
const done = this.async();
|
2017-03-27 15:08:36 +00:00
|
|
|
Inliner.html({
|
|
|
|
relativeTo: "build/prod/",
|
|
|
|
fileContent: grunt.file.read("build/prod/cyberchef.htm"),
|
|
|
|
images: true,
|
|
|
|
svgs: true,
|
|
|
|
scripts: true,
|
|
|
|
links: true,
|
|
|
|
strict: true
|
|
|
|
}, function(error, result) {
|
|
|
|
if (error) {
|
2017-04-13 18:00:55 +00:00
|
|
|
if (error instanceof Error) {
|
2017-04-28 15:51:57 +00:00
|
|
|
done(error);
|
2017-04-13 18:00:55 +00:00
|
|
|
} else {
|
2017-04-28 15:51:57 +00:00
|
|
|
done(new Error(error));
|
2017-04-13 18:00:55 +00:00
|
|
|
}
|
|
|
|
} else {
|
2017-04-28 15:51:57 +00:00
|
|
|
grunt.file.write("build/prod/cyberchef.htm", result);
|
|
|
|
done(true);
|
2017-03-27 15:08:36 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
2016-12-14 16:39:17 +00:00
|
|
|
|
2017-08-09 19:09:23 +00:00
|
|
|
/**
|
|
|
|
* Generates an entry list for all the modules.
|
|
|
|
*/
|
|
|
|
function listEntryModules() {
|
2018-04-02 16:10:51 +00:00
|
|
|
const entryModules = {};
|
2017-08-09 19:09:23 +00:00
|
|
|
|
2018-03-26 22:14:23 +00:00
|
|
|
glob.sync("./src/core/config/modules/*.mjs").forEach(file => {
|
|
|
|
const basename = path.basename(file);
|
|
|
|
if (basename !== "Default.mjs" && basename !== "OpModules.mjs")
|
|
|
|
entryModules[basename.split(".mjs")[0]] = path.resolve(file);
|
2017-08-09 19:09:23 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
return entryModules;
|
|
|
|
}
|
|
|
|
|
2016-11-28 10:42:58 +00:00
|
|
|
grunt.initConfig({
|
2017-03-27 15:08:36 +00:00
|
|
|
clean: {
|
2018-03-26 21:25:36 +00:00
|
|
|
dev: ["build/dev/*"],
|
2018-03-26 22:14:23 +00:00
|
|
|
prod: ["build/prod/*"],
|
|
|
|
node: ["build/node/*"],
|
2018-04-02 18:24:25 +00:00
|
|
|
config: ["src/core/config/OperationConfig.json", "src/core/config/modules/*", "src/code/operations/index.mjs"],
|
2017-09-13 15:21:31 +00:00
|
|
|
docs: ["docs/*", "!docs/*.conf.json", "!docs/*.ico", "!docs/*.png"],
|
2017-09-17 12:47:33 +00:00
|
|
|
inlineScripts: ["build/prod/scripts.js"],
|
2017-03-27 15:08:36 +00:00
|
|
|
},
|
2016-12-14 16:39:17 +00:00
|
|
|
eslint: {
|
2016-11-28 10:42:58 +00:00
|
|
|
options: {
|
2017-04-28 15:51:57 +00:00
|
|
|
configFile: "./.eslintrc.json"
|
2016-11-28 10:42:58 +00:00
|
|
|
},
|
2018-12-29 23:46:13 +00:00
|
|
|
configs: ["*.{js,mjs}"],
|
2018-04-11 17:29:02 +00:00
|
|
|
core: ["src/core/**/*.{js,mjs}", "!src/core/vendor/**/*", "!src/core/operations/legacy/**/*"],
|
2018-03-26 22:14:23 +00:00
|
|
|
web: ["src/web/**/*.{js,mjs}"],
|
|
|
|
node: ["src/node/**/*.{js,mjs}"],
|
2018-12-28 21:49:40 +00:00
|
|
|
tests: ["tests/**/*.{js,mjs}"],
|
2016-11-28 10:42:58 +00:00
|
|
|
},
|
|
|
|
jsdoc: {
|
|
|
|
options: {
|
|
|
|
destination: "docs",
|
|
|
|
template: "node_modules/ink-docstrap/template",
|
|
|
|
recurse: true,
|
|
|
|
readme: "./README.md",
|
|
|
|
configure: "docs/jsdoc.conf.json"
|
|
|
|
},
|
|
|
|
all: {
|
|
|
|
src: [
|
2017-03-23 00:33:40 +00:00
|
|
|
"src/**/*.js",
|
2018-03-26 22:14:23 +00:00
|
|
|
"src/**/*.mjs",
|
|
|
|
"!src/core/vendor/**/*"
|
2016-11-28 10:42:58 +00:00
|
|
|
],
|
|
|
|
}
|
|
|
|
},
|
2017-04-05 20:30:22 +00:00
|
|
|
accessibility: {
|
|
|
|
options: {
|
2017-04-07 16:00:32 +00:00
|
|
|
accessibilityLevel: "WCAG2A",
|
|
|
|
verbose: false,
|
|
|
|
ignore: [
|
|
|
|
"WCAG2A.Principle1.Guideline1_3.1_3_1.H42.2"
|
|
|
|
]
|
2017-04-05 20:30:22 +00:00
|
|
|
},
|
|
|
|
test: {
|
|
|
|
src: ["build/**/*.html"]
|
|
|
|
}
|
|
|
|
},
|
2017-03-21 22:41:44 +00:00
|
|
|
webpack: {
|
2017-07-03 22:15:57 +00:00
|
|
|
options: webpackConfig,
|
2018-12-26 00:39:30 +00:00
|
|
|
web: () => {
|
|
|
|
return {
|
|
|
|
mode: "production",
|
|
|
|
target: "web",
|
|
|
|
entry: Object.assign({
|
|
|
|
main: "./src/web/index.js",
|
|
|
|
sitemap: "./src/web/static/sitemap.js"
|
|
|
|
}, moduleEntryPoints),
|
|
|
|
output: {
|
|
|
|
path: __dirname + "/build/prod"
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
"./config/modules/OpModules": "./config/modules/Default"
|
2017-03-27 15:08:36 +00:00
|
|
|
}
|
2018-12-26 00:39:30 +00:00
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new webpack.DefinePlugin(BUILD_CONSTANTS),
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
filename: "index.html",
|
|
|
|
template: "./src/web/html/index.html",
|
|
|
|
chunks: ["main"],
|
|
|
|
compileTime: compileTime,
|
|
|
|
version: pkg.version,
|
|
|
|
minify: {
|
|
|
|
removeComments: true,
|
|
|
|
collapseWhitespace: true,
|
|
|
|
minifyJS: true,
|
|
|
|
minifyCSS: true
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
new BundleAnalyzerPlugin({
|
|
|
|
analyzerMode: "static",
|
|
|
|
reportFilename: "BundleAnalyzerReport.html",
|
|
|
|
openAnalyzer: false
|
|
|
|
}),
|
|
|
|
]
|
|
|
|
};
|
2017-08-24 23:25:49 +00:00
|
|
|
},
|
|
|
|
webInline: {
|
2018-03-01 19:45:34 +00:00
|
|
|
mode: "production",
|
2017-08-24 23:25:49 +00:00
|
|
|
target: "web",
|
|
|
|
entry: "./src/web/index.js",
|
|
|
|
output: {
|
|
|
|
filename: "scripts.js",
|
|
|
|
path: __dirname + "/build/prod"
|
|
|
|
},
|
|
|
|
plugins: [
|
2018-03-01 20:32:09 +00:00
|
|
|
new webpack.DefinePlugin(Object.assign({}, BUILD_CONSTANTS, {
|
|
|
|
INLINE: "true"
|
|
|
|
})),
|
2017-08-24 23:25:49 +00:00
|
|
|
new HtmlWebpackPlugin({
|
2017-03-27 15:08:36 +00:00
|
|
|
filename: "cyberchef.htm",
|
|
|
|
template: "./src/web/html/index.html",
|
|
|
|
compileTime: compileTime,
|
2018-03-01 20:32:09 +00:00
|
|
|
version: pkg.version + "s",
|
2017-03-27 15:08:36 +00:00
|
|
|
inline: true,
|
|
|
|
minify: {
|
|
|
|
removeComments: true,
|
|
|
|
collapseWhitespace: true,
|
|
|
|
minifyJS: true,
|
|
|
|
minifyCSS: true
|
|
|
|
}
|
|
|
|
}),
|
2017-03-22 16:12:53 +00:00
|
|
|
]
|
2017-03-21 22:41:44 +00:00
|
|
|
},
|
|
|
|
node: {
|
2018-03-01 19:45:34 +00:00
|
|
|
mode: "production",
|
2017-03-21 22:41:44 +00:00
|
|
|
target: "node",
|
2018-03-26 22:14:23 +00:00
|
|
|
entry: "./src/node/index.mjs",
|
2017-08-01 14:42:09 +00:00
|
|
|
externals: [NodeExternals()],
|
2017-03-21 22:41:44 +00:00
|
|
|
output: {
|
|
|
|
filename: "CyberChef.js",
|
2017-03-27 15:20:43 +00:00
|
|
|
path: __dirname + "/build/node",
|
2017-03-21 22:41:44 +00:00
|
|
|
library: "CyberChef",
|
|
|
|
libraryTarget: "commonjs2"
|
2017-09-19 23:37:57 +00:00
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new webpack.DefinePlugin(BUILD_CONSTANTS)
|
|
|
|
]
|
2017-03-21 22:41:44 +00:00
|
|
|
}
|
|
|
|
},
|
2017-07-03 22:15:57 +00:00
|
|
|
"webpack-dev-server": {
|
|
|
|
options: {
|
|
|
|
webpack: webpackConfig,
|
2017-09-22 16:05:15 +00:00
|
|
|
host: "0.0.0.0",
|
|
|
|
disableHostCheck: true,
|
2017-09-17 12:47:33 +00:00
|
|
|
overlay: true,
|
2017-09-22 16:05:15 +00:00
|
|
|
inline: false,
|
2017-09-17 12:47:33 +00:00
|
|
|
clientLogLevel: "error",
|
2017-07-03 22:15:57 +00:00
|
|
|
stats: {
|
|
|
|
children: false,
|
2017-09-17 12:47:33 +00:00
|
|
|
chunks: false,
|
|
|
|
modules: false,
|
2018-03-01 19:45:34 +00:00
|
|
|
entrypoints: false,
|
2018-10-10 15:49:07 +00:00
|
|
|
warningsFilter: [
|
|
|
|
/source-map/,
|
|
|
|
/dependency is an expression/,
|
|
|
|
/export 'default'/
|
|
|
|
],
|
2017-09-17 12:47:33 +00:00
|
|
|
}
|
2017-07-03 22:15:57 +00:00
|
|
|
},
|
|
|
|
start: {
|
|
|
|
webpack: {
|
2018-03-01 19:45:34 +00:00
|
|
|
mode: "development",
|
2017-07-03 22:15:57 +00:00
|
|
|
target: "web",
|
2017-08-09 19:09:23 +00:00
|
|
|
entry: Object.assign({
|
|
|
|
main: "./src/web/index.js"
|
|
|
|
}, moduleEntryPoints),
|
2017-08-24 23:25:49 +00:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
2018-03-26 22:14:23 +00:00
|
|
|
"./config/modules/OpModules": "./config/modules/Default"
|
2017-08-24 23:25:49 +00:00
|
|
|
}
|
|
|
|
},
|
2017-07-03 22:15:57 +00:00
|
|
|
plugins: [
|
|
|
|
new webpack.DefinePlugin(BUILD_CONSTANTS),
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
filename: "index.html",
|
|
|
|
template: "./src/web/html/index.html",
|
2017-08-09 19:09:23 +00:00
|
|
|
chunks: ["main"],
|
2017-07-03 22:15:57 +00:00
|
|
|
compileTime: compileTime,
|
|
|
|
version: pkg.version,
|
|
|
|
})
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2018-12-29 23:46:13 +00:00
|
|
|
connect: {
|
|
|
|
prod: {
|
|
|
|
options: {
|
|
|
|
port: 8000,
|
|
|
|
base: "build/prod/"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2016-11-28 10:42:58 +00:00
|
|
|
copy: {
|
2017-01-31 18:24:56 +00:00
|
|
|
ghPages: {
|
2016-12-03 00:37:38 +00:00
|
|
|
options: {
|
2017-09-13 15:21:31 +00:00
|
|
|
process: function (content, srcpath) {
|
2016-12-03 00:37:38 +00:00
|
|
|
// Add Google Analytics code to index.html
|
2017-09-13 15:21:31 +00:00
|
|
|
if (srcpath.indexOf("index.html") >= 0) {
|
|
|
|
content = content.replace("</body></html>",
|
|
|
|
grunt.file.read("src/web/static/ga.html") + "</body></html>");
|
|
|
|
return grunt.template.process(content, srcpath);
|
|
|
|
} else {
|
|
|
|
return content;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
noProcess: ["**", "!**/*.html"]
|
2016-12-03 00:37:38 +00:00
|
|
|
},
|
2017-09-13 15:21:31 +00:00
|
|
|
files: [
|
|
|
|
{
|
|
|
|
src: "build/prod/index.html",
|
|
|
|
dest: "build/prod/index.html"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
expand: true,
|
|
|
|
src: "docs/**",
|
|
|
|
dest: "build/prod/"
|
2018-02-20 16:52:27 +00:00
|
|
|
},
|
2017-09-13 15:21:31 +00:00
|
|
|
]
|
2016-11-28 10:42:58 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
chmod: {
|
|
|
|
build: {
|
|
|
|
options: {
|
|
|
|
mode: "755",
|
|
|
|
},
|
2017-03-27 15:08:36 +00:00
|
|
|
src: ["build/**/*", "build/"]
|
2016-11-28 10:42:58 +00:00
|
|
|
},
|
|
|
|
docs: {
|
|
|
|
options: {
|
|
|
|
mode: "755",
|
|
|
|
},
|
|
|
|
src: ["docs/**/*", "docs/"]
|
|
|
|
}
|
|
|
|
},
|
2018-05-06 11:24:01 +00:00
|
|
|
watch: {
|
|
|
|
config: {
|
|
|
|
files: ["src/core/operations/**/*", "!src/core/operations/index.mjs"],
|
|
|
|
tasks: ["exec:generateConfig"]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
concurrent: {
|
|
|
|
dev: ["watch:config", "webpack-dev-server:start"],
|
|
|
|
options: {
|
|
|
|
logConcurrentOutput: true
|
|
|
|
}
|
|
|
|
},
|
2016-11-28 10:42:58 +00:00
|
|
|
exec: {
|
2017-01-31 18:24:56 +00:00
|
|
|
repoSize: {
|
2016-11-28 10:42:58 +00:00
|
|
|
command: [
|
2016-12-14 16:39:17 +00:00
|
|
|
"git ls-files | wc -l | xargs printf '\n%b\ttracked files\n'",
|
|
|
|
"du -hs | egrep -o '^[^\t]*' | xargs printf '%b\trepository size\n'"
|
|
|
|
].join(";"),
|
2016-11-28 10:42:58 +00:00
|
|
|
stderr: false
|
|
|
|
},
|
2017-01-31 18:24:56 +00:00
|
|
|
cleanGit: {
|
2016-11-28 10:42:58 +00:00
|
|
|
command: "git gc --prune=now --aggressive"
|
|
|
|
},
|
2018-02-20 16:52:27 +00:00
|
|
|
sitemap: {
|
|
|
|
command: "node build/prod/sitemap.js > build/prod/sitemap.xml"
|
2018-03-26 22:14:23 +00:00
|
|
|
},
|
2018-04-11 18:08:42 +00:00
|
|
|
generateConfig: {
|
|
|
|
command: [
|
2018-05-06 11:24:01 +00:00
|
|
|
"echo '\n--- Regenerating config files. ---'",
|
2018-05-20 16:05:59 +00:00
|
|
|
"mkdir -p src/core/config/modules",
|
2018-05-20 15:49:42 +00:00
|
|
|
"echo 'export default {};\n' > src/core/config/modules/OpModules.mjs",
|
2018-05-20 16:05:59 +00:00
|
|
|
"echo '[]\n' > src/core/config/OperationConfig.json",
|
2018-08-31 13:58:06 +00:00
|
|
|
"node --experimental-modules --no-warnings --no-deprecation src/core/config/scripts/generateOpsIndex.mjs",
|
|
|
|
"node --experimental-modules --no-warnings --no-deprecation src/core/config/scripts/generateConfig.mjs",
|
2018-05-06 11:24:01 +00:00
|
|
|
"echo '--- Config scripts finished. ---\n'"
|
2018-04-11 18:08:42 +00:00
|
|
|
].join(";")
|
|
|
|
},
|
2018-12-29 02:58:05 +00:00
|
|
|
opTests: {
|
2018-12-28 21:49:40 +00:00
|
|
|
command: "node --experimental-modules --no-warnings --no-deprecation tests/operations/index.mjs"
|
2018-12-29 02:58:05 +00:00
|
|
|
},
|
|
|
|
browserTests: {
|
2018-12-29 23:46:13 +00:00
|
|
|
command: "./node_modules/.bin/nightwatch --env prod,inline"
|
2018-02-20 16:52:27 +00:00
|
|
|
}
|
2017-02-28 17:08:36 +00:00
|
|
|
},
|
2016-11-28 10:42:58 +00:00
|
|
|
});
|
|
|
|
};
|