rename dishTranslationTypes
This commit is contained in:
parent
79e2ca6284
commit
c70f14419a
@ -13,7 +13,7 @@ script:
|
||||
- grunt test
|
||||
- grunt test-node
|
||||
- grunt docs
|
||||
- NODE_ENV=production grunt node
|
||||
- npm run node-prod
|
||||
- grunt prod --msg="$COMPILE_MSG"
|
||||
- xvfb-run --server-args="-screen 0 1200x800x24" grunt testui
|
||||
before_deploy:
|
||||
|
25
Gruntfile.js
25
Gruntfile.js
@ -6,7 +6,6 @@ const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPl
|
||||
const NodeExternals = require("webpack-node-externals");
|
||||
const glob = require("glob");
|
||||
const path = require("path");
|
||||
const UglifyJSWebpackPlugin = require("uglifyjs-webpack-plugin");
|
||||
|
||||
/**
|
||||
* Grunt configuration for building the app in various formats.
|
||||
@ -91,7 +90,7 @@ module.exports = function (grunt) {
|
||||
return typeof importScripts === "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() {
|
||||
return typeof window === "object";
|
||||
@ -226,17 +225,6 @@ module.exports = function (grunt) {
|
||||
maxChunks: 1
|
||||
})
|
||||
],
|
||||
optimization: {
|
||||
minimizer: NODE_PROD ? [
|
||||
new UglifyJSWebpackPlugin({
|
||||
cache: true,
|
||||
parallel: true,
|
||||
uglifyOptions: {
|
||||
"keep_fnames": true,
|
||||
}
|
||||
})
|
||||
] : []
|
||||
}
|
||||
},
|
||||
nodeRepl: {
|
||||
mode: NODE_PROD ? "production" : "development",
|
||||
@ -257,17 +245,6 @@ module.exports = function (grunt) {
|
||||
maxChunks: 1
|
||||
})
|
||||
],
|
||||
optimization: {
|
||||
minimizer: NODE_PROD ? [
|
||||
new UglifyJSWebpackPlugin({
|
||||
parallel: true,
|
||||
cache: true,
|
||||
uglifyOptions: {
|
||||
"keep_fnames": true,
|
||||
}
|
||||
})
|
||||
] : []
|
||||
}
|
||||
}
|
||||
},
|
||||
"webpack-dev-server": {
|
||||
|
@ -158,7 +158,6 @@
|
||||
"testui": "grunt testui",
|
||||
"docs": "grunt docs",
|
||||
"lint": "grunt lint",
|
||||
"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"
|
||||
"newop": "node --experimental-modules src/core/config/scripts/newOperation.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ import {
|
||||
DishListFile,
|
||||
DishNumber,
|
||||
DishString,
|
||||
} from "./dishTranslationTypes";
|
||||
} from "./dishTypes";
|
||||
|
||||
|
||||
/**
|
||||
|
@ -4,14 +4,14 @@
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
import DishTranslationType from "./DishTranslationType";
|
||||
import DishType from "./DishType";
|
||||
import Utils from "../Utils";
|
||||
import BigNumber from "bignumber.js";
|
||||
|
||||
/**
|
||||
* translation methods for BigNumber Dishes
|
||||
*/
|
||||
class DishBigNumber extends DishTranslationType {
|
||||
class DishBigNumber extends DishType {
|
||||
|
||||
/**
|
||||
* convert the given value to a ArrayBuffer
|
@ -4,12 +4,12 @@
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
import DishTranslationType from "./DishTranslationType";
|
||||
import DishType from "./DishType";
|
||||
|
||||
/**
|
||||
* Translation methods for ArrayBuffer Dishes
|
||||
*/
|
||||
class DishByteArray extends DishTranslationType {
|
||||
class DishByteArray extends DishType {
|
||||
|
||||
/**
|
||||
* convert the given value to a ArrayBuffer
|
@ -4,13 +4,13 @@
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
import DishTranslationType from "./DishTranslationType";
|
||||
import DishType from "./DishType";
|
||||
import Utils from "../Utils";
|
||||
|
||||
/**
|
||||
* Translation methods for file Dishes
|
||||
*/
|
||||
class DishFile extends DishTranslationType {
|
||||
class DishFile extends DishType {
|
||||
|
||||
/**
|
||||
* convert the given value to an ArrayBuffer
|
@ -4,13 +4,13 @@
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
import DishTranslationType from "./DishTranslationType";
|
||||
import DishType from "./DishType";
|
||||
import Utils from "../Utils";
|
||||
|
||||
/**
|
||||
* Translation methods for JSON dishes
|
||||
*/
|
||||
class DishJSON extends DishTranslationType {
|
||||
class DishJSON extends DishType {
|
||||
|
||||
/**
|
||||
* convert the given value to a ArrayBuffer
|
@ -4,13 +4,14 @@
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
import DishTranslationType from "./DishTranslationType";
|
||||
import DishType from "./DishType";
|
||||
import Utils from "../Utils.mjs";
|
||||
|
||||
|
||||
/**
|
||||
* Translation methods for ListFile Dishes
|
||||
*/
|
||||
class DishListFile extends DishTranslationType {
|
||||
class DishListFile extends DishType {
|
||||
|
||||
/**
|
||||
* convert the given value to a ArrayBuffer
|
@ -5,13 +5,13 @@
|
||||
*/
|
||||
|
||||
|
||||
import DishTranslationType from "./DishTranslationType";
|
||||
import DishType from "./DishType";
|
||||
import Utils from "../Utils";
|
||||
|
||||
/**
|
||||
* Translation methods for number dishes
|
||||
*/
|
||||
class DishNumber extends DishTranslationType {
|
||||
class DishNumber extends DishType {
|
||||
|
||||
/**
|
||||
* convert the given value to a ArrayBuffer
|
@ -5,13 +5,13 @@
|
||||
*/
|
||||
|
||||
|
||||
import DishTranslationType from "./DishTranslationType";
|
||||
import DishType from "./DishType";
|
||||
import Utils from "../Utils";
|
||||
|
||||
/**
|
||||
* Translation methods for string dishes
|
||||
*/
|
||||
class DishString extends DishTranslationType {
|
||||
class DishString extends DishType {
|
||||
|
||||
/**
|
||||
* convert the given value to a ArrayBuffer
|
@ -8,7 +8,7 @@
|
||||
/**
|
||||
* Abstract class for dish translation methods
|
||||
*/
|
||||
class DishTranslationType {
|
||||
class DishType {
|
||||
|
||||
/**
|
||||
* Warn translations dont work without value from bind
|
||||
@ -24,7 +24,7 @@ class DishTranslationType {
|
||||
* @param {*} value
|
||||
*/
|
||||
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
|
||||
*/
|
||||
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;
|
Loading…
x
Reference in New Issue
Block a user