Skip to content

Commit 2ee9ca8

Browse files
Merge branch 'master' into update_dtrader_url
2 parents e35fb62 + 83d816e commit 2ee9ca8

File tree

15 files changed

+171
-115
lines changed

15 files changed

+171
-115
lines changed

build/aliases.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,4 @@ release:
6464
releaseci:
6565
- 'default'
6666
- 'shell:compile_production'
67+
- 'hashres'

build/copy.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ module.exports = function (grunt) {
1313
{ expand: true, cwd: 'src/download/fonts', src: ['binary_symbols.woff'], dest: `${global.dist}/download/fonts/` },
1414

1515
{ expand: true, src: ['favicon.ico'], dest: global.dist },
16-
17-
// Serve pushwoosh SDKs
18-
{ expand: true, cwd: 'src/javascript/_common/lib/pushwooshSDK/', src: ['**'], dest: global.dist },
1916
{ expand: true, cwd: 'src/root_files/app', src: ['**', '!index.html'], dest: 'dist' }, // top level
2017
{ expand: true, cwd: 'src/root_files/app', src: ['index.html'], dest: global.dist },
2118

build/hashres.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
options: {
3+
encoding: "utf8",
4+
length: 8,
5+
algorithm: "md5",
6+
renameFiles: false,
7+
fileNameFormat: "${name}.${ext}?${hash}",
8+
},
9+
main: {
10+
src: [
11+
"dist/css/*.css",
12+
"dist/js/**/*.js",
13+
"dist/images/**/*.{png,jpg,jpeg,gif,webp,svg}",
14+
"!dist/images/common/logos/icon_deriv.svg",
15+
],
16+
dest: "dist/**/*.html",
17+
},
18+
};

build/postcss.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ module.exports = function (grunt) {
22
return {
33
options: {
44
processors: [
5-
require('autoprefixer')()
5+
require('autoprefixer')(),
6+
require('postcss-cachebuster')({
7+
supportedProps: [
8+
'background',
9+
'background-image',
10+
],
11+
}),
612
],
713
},
814
dist: {

build/webpack/plugins.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const CircularDependencyPlugin = require('circular-dependency-plugin');
2+
const CryptoJS = require('crypto-js');
23
const path = require('path');
34
const webpack = require('webpack');
45
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
@@ -47,7 +48,8 @@ const getPlugins = (app, grunt) => ([
4748

4849
new webpack.DefinePlugin({
4950
'process.env': {
50-
NODE_ENV: JSON.stringify('production'),
51+
BUILD_HASH: JSON.stringify(CryptoJS.MD5(Date.now().toString()).toString()),
52+
NODE_ENV : JSON.stringify('production'),
5153
},
5254
}),
5355
]

package-lock.json

Lines changed: 98 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
"grunt-contrib-watch": "1.1.0",
7070
"grunt-eslint": "24.3.0",
7171
"grunt-gh-pages": "4.0.0",
72+
"grunt-hashres": "^0.4.1",
7273
"grunt-mocha-test": "0.13.3",
7374
"grunt-notify": "0.4.5",
7475
"grunt-postcss": "^0.9.0",
@@ -102,10 +103,11 @@
102103
"@babel/polyfill": "7.12.1",
103104
"@binary-com/binary-document-uploader": "^2.4.4",
104105
"@binary-com/binary-style": "^0.2.26",
105-
"@binary-com/webtrader-charts": "0.5.21",
106+
"@binary-com/webtrader-charts": "0.5.22",
106107
"@livechat/customer-sdk": "4.0.2",
107108
"canvas-toBlob": "1.0.0",
108109
"classnames": "2.2.5",
110+
"crypto-js": "^4.2.0",
109111
"custom-event-polyfill": "0.3.0",
110112
"davidshimjs-qrcodejs": "0.0.2",
111113
"event-source-polyfill": "0.0.9",
@@ -116,6 +118,7 @@
116118
"js-yaml": "4.1.0",
117119
"kinetic": "5.2.0",
118120
"moment": "^2.29.4",
121+
"postcss-cachebuster": "^0.1.6",
119122
"promise-polyfill": "6.1.0",
120123
"prop-types": "^15.8.1",
121124
"react": "16.14.0",

0 commit comments

Comments
 (0)