Skip to content

Commit

Permalink
string-replace-loader upgraded to last version
Browse files Browse the repository at this point in the history
  • Loading branch information
yasin749 committed Jun 28, 2022
1 parent 5f4ca9d commit 2840d9e
Show file tree
Hide file tree
Showing 7 changed files with 172 additions and 129 deletions.
9 changes: 9 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules
src/public
src/tools
webpack.client.config.js
webpack.common.config.js
webpack.server.config.js
babel.config.js
babel.server.config.js
postcss.config.js
35 changes: 27 additions & 8 deletions config/string.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ const voltranConfig = require('../voltran.config');

const prometheusFile = voltranConfig.monitoring.prometheus;

function replaceString () {
const data = [
{ search: '__V_COMPONENTS__', replace: normalizeUrl(voltranConfig.routing.components), flags: 'g' },
function replaceString() {
const data = [
{
search: '__V_COMPONENTS__',
replace: normalizeUrl(voltranConfig.routing.components),
flags: 'g'
},
{
search: '__APP_CONFIG__',
replace: normalizeUrl(`${voltranConfig.appConfigFile.output.path}/${voltranConfig.appConfigFile.output.name}.js`),
Expand All @@ -20,14 +24,29 @@ function replaceString () {
replace: normalizeUrl(`${voltranConfig.inputFolder}/assets.json`),
flags: 'g'
},
{ search: '__V_DICTIONARY__', replace: normalizeUrl(voltranConfig.routing.dictionary), flags: 'g' },
{ search: '@voltran/core', replace: normalizeUrl(path.resolve(__dirname, '../src/index')), flags: 'g' },
{ search: '"__V_styles__"', replace: getStyles() }
{
search: '__V_DICTIONARY__',
replace: normalizeUrl(voltranConfig.routing.dictionary),
flags: 'g'
},
{
search: '@voltran/core',
replace: normalizeUrl(path.resolve(__dirname, '../src/index')),
flags: 'g'
},
{
search: '"__V_styles__"',
replace: getStyles()
}
];

data.push({ search: '__V_PROMETHEUS__', replace: normalizeUrl(prometheusFile ? prometheusFile : '../lib/tools/prom.js'), flags: 'g' });
data.push({
search: '__V_PROMETHEUS__',
replace: normalizeUrl(prometheusFile || '../lib/tools/prom.js'),
flags: 'g'
});

return data;
return data;
}

module.exports = replaceString;
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "voltranjs",
"version": "1.0.29",
"version": "1.1.0",
"main": "src/index.js",
"author": "Hepsiburada Technology Team",
"bin": {
Expand All @@ -25,29 +25,31 @@
"@babel/plugin-proposal-optional-chaining": "7.16.7",
"@babel/plugin-proposal-throw-expressions": "7.16.7",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/plugin-syntax-jsx": "^7.12.13",
"@babel/plugin-transform-runtime": "7.16.10",
"@babel/preset-env": "7.15.4",
"@babel/preset-react": "7.14.5",
"@babel/preset-env": "7.16.10",
"@babel/preset-react": "7.16.7",
"@babel/runtime": "7.16.7",
"@researchgate/react-intersection-observer": "1.0.3",
"arg": "^4.1.3",
"assets-webpack-plugin": "3.10.0",
"async": "^3.2.0",
"autoprefixer": "10.4.2",
"autoprefixer": "9.3.1",
"axios": "0.19.0",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1",
"babel-eslint": "10.1.0",
"classnames": "2.2.6",
"clean-webpack-plugin": "1.0.0",
"cli-color": "^2.0.0",
"clean-webpack-plugin": "4.0.0",
"cli-color": "2.0.2",
"compose-middleware": "5.0.1",
"compression": "^1.7.4",
"cookie-parser": "1.4.3",
"copy-webpack-plugin": "4.5.2",
"core-js": "^3.16.3",
"core-js": "3.20.3",
"css-loader": "6.5.1",
"css-minimizer-webpack-plugin": "3.4.1",
"eev": "0.1.5",
"esbuild-loader": "2.18.0",
"esbuild-loader": "2.19.0",
"eslint": "6.1.0",
"eslint-config-airbnb": "18.0.1",
"eslint-config-prettier": "6.3.0",
Expand All @@ -65,13 +67,11 @@
"mini-css-extract-plugin": "2.5.2",
"newrelic": "^6.13.0",
"node-sass": "6.0.1",
"optimize-css-assets-webpack-plugin": "5.0.8",
"pixrem": "5.0.0",
"pixrem": "4.0.1",
"pleeease-filters": "4.0.0",
"postcss": "8.4.5",
"postcss-inline-svg": "5.0.0",
"postcss-loader": "6.2.1",
"postcss-scss": "4.0.3",
"postcss": "7.0.5",
"postcss-inline-svg": "3.1.1",
"postcss-loader": "3.0.0",
"prettier": "1.18.2",
"prom-client": "12.0.0",
"prop-types": "15.6.2",
Expand All @@ -85,10 +85,10 @@
"rimraf": "3.0.2",
"sass-loader": "12.4.0",
"serve-static": "1.14.1",
"source-map-support": "^0.5.19",
"string-replace-loader": "2.3.0",
"source-map-support": "0.5.21",
"string-replace-loader": "3.1.0",
"style-loader": "3.3.1",
"styled-components": "^5.1.0",
"styled-components": "5.1.0",
"svg-url-loader": "7.1.1",
"terser-webpack-plugin": "5.3.1",
"webpack": "5.65.0",
Expand All @@ -100,9 +100,9 @@
"webpack-merge": "5.8.0",
"webpack-node-externals": "3.0.0",
"whatwg-fetch": "2.0.4",
"xss": "^1.0.8",

"@babel/plugin-syntax-jsx": "^7.12.13",
"xss": "^1.0.8"
},
"devDependencies": {
"auto-changelog": "^2.2.1",
"babel-jest": "^23.6.0",
"enzyme": "^3.11.0",
Expand Down
14 changes: 8 additions & 6 deletions postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ const postCssInlineSvg = require('postcss-inline-svg');
const voltranConfig = require('./voltran.config');

module.exports = {
plugins: [
postCssInlineSvg({ path: voltranConfig.svgFolder }),
postCssPixrem(),
postCssFilters(),
autoprefixer
]
plugins() {
return [
postCssInlineSvg({path: voltranConfig.svgFolder}),
postCssPixrem(),
postCssFilters(),
autoprefixer
];
}
};
Loading

0 comments on commit 2840d9e

Please sign in to comment.