n1474335 6 роки тому
батько
коміт
d1ad2d0845
2 змінених файлів з 17 додано та 14 видалено
  1. 0 1
      .travis.yml
  2. 17 13
      Gruntfile.js

+ 0 - 1
.travis.yml

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

+ 17 - 13
Gruntfile.js

@@ -26,32 +26,35 @@ module.exports = function (grunt) {
         "A persistent task which creates a development build whenever source files are modified.",
         "A persistent task which creates a development build whenever source files are modified.",
         ["clean:dev", "clean:config", "exec:generateConfig", "concurrent:dev"]);
         ["clean:dev", "clean:config", "exec:generateConfig", "concurrent:dev"]);
 
 
+    grunt.registerTask("prod",
+        "Creates a production-ready build. Use the --msg flag to add a compile message.",
+        [
+            "eslint", "clean:prod", "clean:config", "exec:generateConfig", "webpack:web",
+            "copy:standalone", "zip:standalone", "clean:standalone", "chmod"
+        ]);
+
     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:node", "clean:config", "clean:nodeConfig", "exec:generateConfig",
+            "exec:generateNodeIndex", "webpack:node", "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.",
-        ["clean", "exec:generateConfig", "exec:opTests"]);
+        [
+            "clean:config", "clean:nodeConfig", "exec:generateConfig", "exec:generateNodeIndex",
+            "exec:nodeTests", "exec:opTests"
+        ]);
 
 
     grunt.registerTask("testui",
     grunt.registerTask("testui",
         "A task which runs all the UI tests in the tests directory. The prod task must already have been run.",
         "A task which runs all the UI tests in the tests directory. The prod task must already have been run.",
         ["connect:prod", "exec:browserTests"]);
         ["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",
     grunt.registerTask("docs",
         "Compiles documentation in the /docs directory.",
         "Compiles documentation in the /docs directory.",
         ["clean:docs", "jsdoc", "chmod:docs"]);
         ["clean:docs", "jsdoc", "chmod:docs"]);
 
 
-    grunt.registerTask("prod",
-        "Creates a production-ready build. Use the --msg flag to add a compile message.",
-        [
-            "eslint", "clean:prod", "clean:config", "exec:generateConfig", "webpack:web",
-            "copy:standalone", "zip:standalone", "clean:standalone", "chmod"
-        ]);
 
 
     grunt.registerTask("default",
     grunt.registerTask("default",
         "Lints the code base",
         "Lints the code base",
@@ -110,7 +113,8 @@ module.exports = function (grunt) {
             dev: ["build/dev/*"],
             dev: ["build/dev/*"],
             prod: ["build/prod/*"],
             prod: ["build/prod/*"],
             node: ["build/node/*"],
             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"],
             docs: ["docs/*", "!docs/*.conf.json", "!docs/*.ico", "!docs/*.png"],
             standalone: ["build/prod/CyberChef*.html"]
             standalone: ["build/prod/CyberChef*.html"]
         },
         },