1
0
mirror of synced 2024-12-01 01:37:18 +01:00

Added babel-preset-env with browser version targets and babel-polyfill

This commit is contained in:
n1474335 2017-03-21 23:56:46 +00:00
parent 885fbe13ac
commit 1800bad61d
4 changed files with 20 additions and 8 deletions

View File

@ -1 +1,11 @@
{ "presets": [ "es2015" ] } {
"presets": [
["env", {
"targets": {
"chrome": 40,
"firefox": 35,
"edge": 14
}
}]
]
}

View File

@ -148,7 +148,7 @@ module.exports = function(grunt) {
}, },
web: { web: {
target: "web", target: "web",
entry: "./src/js/views/html/main.js", entry: ["babel-polyfill", "./src/js/views/html/main.js"],
output: { output: {
filename: "scripts.js", filename: "scripts.js",
path: "build/dev" path: "build/dev"
@ -156,7 +156,7 @@ module.exports = function(grunt) {
}, },
tests: { tests: {
target: "node", target: "node",
entry: "./test/TestRunner.js", entry: ["babel-polyfill", "./test/TestRunner.js"],
output: { output: {
filename: "index.js", filename: "index.js",
path: "build/test" path: "build/test"
@ -170,7 +170,7 @@ module.exports = function(grunt) {
}, },
node: { node: {
target: "node", target: "node",
entry: "./src/js/views/node/index.js", entry: ["babel-polyfill", "./src/js/views/node/index.js"],
output: { output: {
filename: "CyberChef.js", filename: "CyberChef.js",
path: "build/node", path: "build/node",
@ -434,7 +434,7 @@ module.exports = function(grunt) {
}, },
js: { js: {
files: "src/js/**/*.js", files: "src/js/**/*.js",
tasks: ["concat:js", "chmod:build"] tasks: ["webpack:web", "chmod:build"]
}, },
html: { html: {
files: "src/html/**/*.html", files: "src/html/**/*.html",
@ -446,7 +446,7 @@ module.exports = function(grunt) {
}, },
grunt: { grunt: {
files: "Gruntfile.js", files: "Gruntfile.js",
tasks: ["clean:dev", "concat:css", "concat:js", "copy:htmlDev", "copy:staticDev", "chmod:build"] tasks: ["clean:dev", "concat:css", "webpack:web", "copy:htmlDev", "copy:staticDev", "chmod:build"]
} }
}, },
}); });

View File

@ -28,7 +28,8 @@
"devDependencies": { "devDependencies": {
"babel-core": "^6.24.0", "babel-core": "^6.24.0",
"babel-loader": "^6.4.0", "babel-loader": "^6.4.0",
"babel-preset-es2015": "^6.24.0", "babel-polyfill": "^6.23.0",
"babel-preset-env": "^1.2.2",
"exports-loader": "^0.6.4", "exports-loader": "^0.6.4",
"grunt": ">=0.4.5", "grunt": ">=0.4.5",
"grunt-chmod": "~1.1.1", "grunt-chmod": "~1.1.1",

View File

@ -1,4 +1,5 @@
var rawdeflate = require("zlibjs/bin/rawdeflate.min"), var Utils = require("../core/Utils.js"),
rawdeflate = require("zlibjs/bin/rawdeflate.min"),
rawinflate = require("zlibjs/bin/rawinflate.min"), rawinflate = require("zlibjs/bin/rawinflate.min"),
zlibAndGzip = require("zlibjs/bin/zlib_and_gzip.min"), zlibAndGzip = require("zlibjs/bin/zlib_and_gzip.min"),
zip = require("zlibjs/bin/zip.min"), zip = require("zlibjs/bin/zip.min"),