Skip to content

Commit

Permalink
Merge branch 'release/1.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
nsteenbeek committed Jan 23, 2020
2 parents f75a305 + 18e77a0 commit 05b1218
Show file tree
Hide file tree
Showing 11 changed files with 3,492 additions and 3,894 deletions.
2 changes: 1 addition & 1 deletion bin/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/root/deploy/deploy.js

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions bin/root/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,55 +15,55 @@
"i18next-scanner": "i18next-scanner --config i18next-scanner.config.js src/**/*.{js,ts,tsx}"
},
"devDependencies": {
"@babel/core": "^7.6.2",
"@babel/polyfill": "^7.6.0",
"@babel/preset-env": "^7.6.2",
"@types/jasmine": "^3.4.2",
"@types/node": "^12.7.9",
"@types/react": "^16.9.4",
"@types/react-dom": "^16.9.1",
"@types/xrm": "^9.0.15",
"@typescript-eslint/eslint-plugin": "^2.3.2",
"@typescript-eslint/parser": "^2.3.2",
"@babel/core": "^7.8.3",
"@babel/polyfill": "^7.8.3",
"@babel/preset-env": "^7.8.3",
"@types/jasmine": "^3.5.1",
"@types/node": "^13.1.8",
"@types/react": "^16.9.19",
"@types/react-dom": "^16.9.5",
"@types/xrm": "^9.0.19",
"@typescript-eslint/eslint-plugin": "^2.17.0",
"@typescript-eslint/parser": "^2.17.0",
"adal-angular": "^1.0.17",
"autoprefixer": "^9.6.4",
"autoprefixer": "^9.7.4",
"babel-loader": "^8.0.6",
"babel-plugin-istanbul": "^5.2.0",
"copy-webpack-plugin": "^5.0.4",
"babel-plugin-istanbul": "^6.0.0",
"copy-webpack-plugin": "^5.1.1",
"cross-env": "^6.0.3",
"css-loader": "^3.2.0",
"css-loader": "^3.4.2",
"cssnano": "^4.1.10",
"eslint": "^6.5.1",
"eslint-loader": "^3.0.2",
"i18next": "^17.0.16",
"eslint": "^6.8.0",
"eslint-loader": "^3.0.3",
"i18next": "^19.0.3",
"i18next-scanner": "^2.10.3",
"istanbul-instrumenter-loader": "^3.0.1",
"json-loader": "^0.5.4",
"karma": "^4.3.0",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage": "^2.0.1",
"karma-jasmine": "^2.0.1",
"karma-junit-reporter": "^1.2.0",
"karma-jasmine": "^3.1.0",
"karma-junit-reporter": "^2.0.1",
"karma-sourcemap-loader": "^0.3.7",
"karma-tap": "^4.1.4",
"karma-webpack": "^4.0.2",
"mini-css-extract-plugin": "^0.8.0",
"mini-css-extract-plugin": "^0.9.0",
"moment": "^2.24.0",
"node-sass": "^4.12.0",
"opn": "^6.0.0",
"node-sass": "^4.13.1",
"open": "^7.0.0",
"postcss-loader": "^3.0.0",
"react": "^16.10.1",
"react-dom": "^16.9.0",
"replace-in-file-webpack-plugin": "^1.0.6",
"sass-loader": "^8.0.0",
"style-loader": "^1.0.0",
"sass-loader": "^8.0.2",
"style-loader": "^1.1.3",
"terser-webpack-plugin": "^2.3.2",
"ts-loader": "^6.2.0",
"typescript": "^3.6.3",
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.41.0",
"typescript": "^3.7.5",
"webpack": "^4.41.5",
"webpack-auto-inject-version": "^1.2.2",
"webpack-cli": "^3.3.9",
"webpack-dev-server": "^3.8.2"
"webpack-dev-server": "^3.10.1"
},
"dependencies": {
}
Expand Down
8 changes: 3 additions & 5 deletions bin/root/src/translation/Translation.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
import i18next from 'i18next';
import i18next, {TOptions} from 'i18next';

declare interface Resources {
[index: string]: {translation: {[index: string]: string}};
Expand Down Expand Up @@ -43,11 +41,11 @@ export class Translation {
}
}

public static translate(text: string, options?: i18next.TOptions | string): string {
public static translate(text: string, options?: TOptions | string): string {
return i18next.t(text, options);
}

public static translateArray(text: string | Array<string>, options?: i18next.TOptions | string): Array<string> {
public static translateArray(text: string | Array<string>, options?: TOptions | string): Array<string> {
if (text instanceof Array) {
const translations: string[] = [];
for (const txt of text) {
Expand Down
21 changes: 11 additions & 10 deletions bin/root/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ var path = require("path"),
WebpackAutoInject = require("webpack-auto-inject-version"),
CopyWebpackPlugin = require("copy-webpack-plugin"),
MiniCssExtractPlugin = require("mini-css-extract-plugin"),
UglifyJSPlugin = require("uglifyjs-webpack-plugin"),
TerserPlugin = require("terser-webpack-plugin"),
ReplaceInFileWebpackPlugin = require("replace-in-file-webpack-plugin");

const scssLoaders = [MiniCssExtractPlugin.loader, "css-loader", "postcss-loader", "sass-loader"],
cssLoaders = [MiniCssExtractPlugin.loader, "css-loader", "postcss-loader"];

module.exports = {
mode: mode,
entry: {},
entry: {
},
output: {
path: dir_build,
filename: "[name]/[name].js",
Expand Down Expand Up @@ -136,15 +137,15 @@ module.exports = {
colors: true
},
optimization: {
minimizer: [
new UglifyJSPlugin({
uglifyOptions: {
compress: {
drop_console: mode !== "development",
}
minimize: mode !== "development",
minimizer: [new TerserPlugin({
extractComments: false,
terserOptions: {
compress: {
drop_console: mode !== "development"
}
})
]
}
})]
},
devtool: mode === "development" ? "source-map" : false
};
Loading

0 comments on commit 05b1218

Please sign in to comment.