Beta-Seite hinzugefügt
This commit is contained in:
parent
b0287f5db0
commit
e61097cfc4
36
bin/build.js
36
bin/build.js
@ -6,10 +6,12 @@ const fs = require('fs');
|
||||
|
||||
var uglifyJs = null;
|
||||
var babel = null;
|
||||
var regenerator = null;
|
||||
|
||||
if (shouldMangleAndTranspile) {
|
||||
uglifyJs = require('uglify-es');
|
||||
babel = require('babel-core');
|
||||
regenerator = require('regenerator');
|
||||
}
|
||||
const uglifyOptions = {
|
||||
ecma: "es6",
|
||||
@ -22,20 +24,20 @@ const uglifyOptions = {
|
||||
},
|
||||
// toplevel: true
|
||||
},
|
||||
compress: {
|
||||
ecma: "es6",
|
||||
keep_fargs: false,
|
||||
toplevel: true,
|
||||
dead_code: true,
|
||||
unused: true,
|
||||
passes: 1,
|
||||
},
|
||||
// compress: {
|
||||
// ecma: "es6",
|
||||
// keep_fargs: false,
|
||||
// toplevel: true,
|
||||
// dead_code: true,
|
||||
// unused: true,
|
||||
// passes: 1,
|
||||
// },
|
||||
// sourceMap:{
|
||||
// url:"inline"
|
||||
// },
|
||||
// output: {
|
||||
// beautify: true
|
||||
// }
|
||||
output: {
|
||||
beautify: true
|
||||
}
|
||||
};
|
||||
|
||||
const babelOptions = {
|
||||
@ -43,7 +45,12 @@ const babelOptions = {
|
||||
minified: true,
|
||||
presets: ['env'],
|
||||
// sourceMaps:"inline",
|
||||
// plugins: [["minify-mangle-names", {topLevel: true}], "transform-class-properties"]
|
||||
// plugins: ["regenerator-runtime"]
|
||||
};
|
||||
|
||||
const regeneratorOptions = {
|
||||
includeRuntime: true,
|
||||
// sourceMaps:"inline",
|
||||
};
|
||||
|
||||
const options = require('../rollup.config');
|
||||
@ -62,13 +69,16 @@ async function build() {
|
||||
fs.writeFileSync('transpiled.js', code);
|
||||
const babelRes = babel.transform(code, babelOptions);
|
||||
code = babelRes.code;
|
||||
code = regenerator.compile(code, regeneratorOptions).code;
|
||||
const uglifyRes2 = uglifyJs.minify(code, {mangle:{toplevel:true},compress: {
|
||||
keep_fargs: false,
|
||||
toplevel: true,
|
||||
dead_code: true,
|
||||
unused: true,
|
||||
passes: 1,
|
||||
},});
|
||||
|
||||
},
|
||||
});
|
||||
code = uglifyRes2.code;
|
||||
}
|
||||
fs.writeFileSync(outputOptions[i].file, code);
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
npm run build
|
||||
npm run build 1
|
||||
@ -20,6 +20,7 @@
|
||||
"babel-preset-env": "^1.6.1",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"babel-preset-latest": "^6.24.1",
|
||||
"regenerator": "^0.13.2",
|
||||
"rollup": "^0.57.1",
|
||||
"rollup-plugin-babel": "^3.0.3",
|
||||
"uglify-es": "^3.3.9"
|
||||
|
||||
5609
public/js/app.js
5609
public/js/app.js
File diff suppressed because one or more lines are too long
@ -24,7 +24,7 @@ export class FourWordsLevel extends Level {
|
||||
leafsWords[3] = Level._createLeafsForWord(this.words[3], this.templateContainer.copyLeafTemplate());
|
||||
|
||||
let rootSegment = new RowSegment(this.templateContainer.copyRowTemplate());
|
||||
for (let i = 0, n = this.wordLength / 4; i < n; i++) {
|
||||
for (let i = 0; i < this.wordLength / 4; i++) {
|
||||
|
||||
let parents = [];
|
||||
parents[0] = new ParentSegment(this.templateContainer.copyParentTemplate());
|
||||
|
||||
@ -28,7 +28,7 @@ export class SixWordsRowLevel extends Level {
|
||||
leafsWords[5] = Level._createLeafsForWord(this.words[5], this.templateContainer.copyLeafTemplate());
|
||||
|
||||
let rootSegment = new RowSegment(this.templateContainer.copyRowTemplate());
|
||||
for (let i = 0, n = this.wordLength / 4; i < n; i++) {
|
||||
for (let i = 0; i < this.wordLength / 4; i++) {
|
||||
|
||||
let parents = [];
|
||||
parents[0] = new ParentSegment(this.templateContainer.copyParentTemplate());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user