1
0
mirror of synced 2025-01-31 03:53:46 +01:00

rename dishTranslationTypes

This commit is contained in:
d98762625 2019-07-05 09:44:01 +01:00
parent 79e2ca6284
commit c70f14419a
14 changed files with 23 additions and 46 deletions

View File

@ -13,7 +13,7 @@ script:
- grunt test - grunt test
- grunt test-node - grunt test-node
- grunt docs - grunt docs
- NODE_ENV=production grunt node - npm run node-prod
- grunt prod --msg="$COMPILE_MSG" - grunt prod --msg="$COMPILE_MSG"
- xvfb-run --server-args="-screen 0 1200x800x24" grunt testui - xvfb-run --server-args="-screen 0 1200x800x24" grunt testui
before_deploy: before_deploy:

View File

@ -6,7 +6,6 @@ const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPl
const NodeExternals = require("webpack-node-externals"); const NodeExternals = require("webpack-node-externals");
const glob = require("glob"); const glob = require("glob");
const path = require("path"); const path = require("path");
const UglifyJSWebpackPlugin = require("uglifyjs-webpack-plugin");
/** /**
* Grunt configuration for building the app in various formats. * Grunt configuration for building the app in various formats.
@ -91,7 +90,7 @@ module.exports = function (grunt) {
return typeof importScripts === "function"; return typeof importScripts === "function";
}, },
ENVIRONMENT_IS_NODE: function() { ENVIRONMENT_IS_NODE: function() {
return typeof process === "object" && typeof require === "function"; return typeof process === "object" && process.versions !== null && process.versions.node !== null && typeof require === "function";
}, },
ENVIRONMENT_IS_WEB: function() { ENVIRONMENT_IS_WEB: function() {
return typeof window === "object"; return typeof window === "object";
@ -226,17 +225,6 @@ module.exports = function (grunt) {
maxChunks: 1 maxChunks: 1
}) })
], ],
optimization: {
minimizer: NODE_PROD ? [
new UglifyJSWebpackPlugin({
cache: true,
parallel: true,
uglifyOptions: {
"keep_fnames": true,
}
})
] : []
}
}, },
nodeRepl: { nodeRepl: {
mode: NODE_PROD ? "production" : "development", mode: NODE_PROD ? "production" : "development",
@ -257,17 +245,6 @@ module.exports = function (grunt) {
maxChunks: 1 maxChunks: 1
}) })
], ],
optimization: {
minimizer: NODE_PROD ? [
new UglifyJSWebpackPlugin({
parallel: true,
cache: true,
uglifyOptions: {
"keep_fnames": true,
}
})
] : []
}
} }
}, },
"webpack-dev-server": { "webpack-dev-server": {

View File

@ -158,7 +158,6 @@
"testui": "grunt testui", "testui": "grunt testui",
"docs": "grunt docs", "docs": "grunt docs",
"lint": "grunt lint", "lint": "grunt lint",
"newop": "node --experimental-modules src/core/config/scripts/newOperation.mjs", "newop": "node --experimental-modules src/core/config/scripts/newOperation.mjs"
"postinstall": "[ -f node_modules/crypto-api/src/crypto-api.mjs ] || npx j2m node_modules/crypto-api/src/crypto-api.js"
} }
} }

View File

@ -19,7 +19,7 @@ import {
DishListFile, DishListFile,
DishNumber, DishNumber,
DishString, DishString,
} from "./dishTranslationTypes"; } from "./dishTypes";
/** /**

View File

@ -4,14 +4,14 @@
* @license Apache-2.0 * @license Apache-2.0
*/ */
import DishTranslationType from "./DishTranslationType"; import DishType from "./DishType";
import Utils from "../Utils"; import Utils from "../Utils";
import BigNumber from "bignumber.js"; import BigNumber from "bignumber.js";
/** /**
* translation methods for BigNumber Dishes * translation methods for BigNumber Dishes
*/ */
class DishBigNumber extends DishTranslationType { class DishBigNumber extends DishType {
/** /**
* convert the given value to a ArrayBuffer * convert the given value to a ArrayBuffer

View File

@ -4,12 +4,12 @@
* @license Apache-2.0 * @license Apache-2.0
*/ */
import DishTranslationType from "./DishTranslationType"; import DishType from "./DishType";
/** /**
* Translation methods for ArrayBuffer Dishes * Translation methods for ArrayBuffer Dishes
*/ */
class DishByteArray extends DishTranslationType { class DishByteArray extends DishType {
/** /**
* convert the given value to a ArrayBuffer * convert the given value to a ArrayBuffer

View File

@ -4,13 +4,13 @@
* @license Apache-2.0 * @license Apache-2.0
*/ */
import DishTranslationType from "./DishTranslationType"; import DishType from "./DishType";
import Utils from "../Utils"; import Utils from "../Utils";
/** /**
* Translation methods for file Dishes * Translation methods for file Dishes
*/ */
class DishFile extends DishTranslationType { class DishFile extends DishType {
/** /**
* convert the given value to an ArrayBuffer * convert the given value to an ArrayBuffer

View File

@ -4,13 +4,13 @@
* @license Apache-2.0 * @license Apache-2.0
*/ */
import DishTranslationType from "./DishTranslationType"; import DishType from "./DishType";
import Utils from "../Utils"; import Utils from "../Utils";
/** /**
* Translation methods for JSON dishes * Translation methods for JSON dishes
*/ */
class DishJSON extends DishTranslationType { class DishJSON extends DishType {
/** /**
* convert the given value to a ArrayBuffer * convert the given value to a ArrayBuffer

View File

@ -4,13 +4,14 @@
* @license Apache-2.0 * @license Apache-2.0
*/ */
import DishTranslationType from "./DishTranslationType"; import DishType from "./DishType";
import Utils from "../Utils.mjs"; import Utils from "../Utils.mjs";
/** /**
* Translation methods for ListFile Dishes * Translation methods for ListFile Dishes
*/ */
class DishListFile extends DishTranslationType { class DishListFile extends DishType {
/** /**
* convert the given value to a ArrayBuffer * convert the given value to a ArrayBuffer

View File

@ -5,13 +5,13 @@
*/ */
import DishTranslationType from "./DishTranslationType"; import DishType from "./DishType";
import Utils from "../Utils"; import Utils from "../Utils";
/** /**
* Translation methods for number dishes * Translation methods for number dishes
*/ */
class DishNumber extends DishTranslationType { class DishNumber extends DishType {
/** /**
* convert the given value to a ArrayBuffer * convert the given value to a ArrayBuffer

View File

@ -5,13 +5,13 @@
*/ */
import DishTranslationType from "./DishTranslationType"; import DishType from "./DishType";
import Utils from "../Utils"; import Utils from "../Utils";
/** /**
* Translation methods for string dishes * Translation methods for string dishes
*/ */
class DishString extends DishTranslationType { class DishString extends DishType {
/** /**
* convert the given value to a ArrayBuffer * convert the given value to a ArrayBuffer

View File

@ -8,7 +8,7 @@
/** /**
* Abstract class for dish translation methods * Abstract class for dish translation methods
*/ */
class DishTranslationType { class DishType {
/** /**
* Warn translations dont work without value from bind * Warn translations dont work without value from bind
@ -24,7 +24,7 @@ class DishTranslationType {
* @param {*} value * @param {*} value
*/ */
static toArrayBuffer() { static toArrayBuffer() {
throw new Error("toByteArray has not been implemented"); throw new Error("toArrayBuffer has not been implemented");
} }
/** /**
@ -32,8 +32,8 @@ class DishTranslationType {
* @param {boolean} notUTF8 * @param {boolean} notUTF8
*/ */
static fromArrayBuffer(notUTF8=undefined) { static fromArrayBuffer(notUTF8=undefined) {
throw new Error("toType has not been implemented"); throw new Error("fromArrayBuffer has not been implemented");
} }
} }
export default DishTranslationType; export default DishType;