@esportsplus/ui 0.0.35 → 0.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,39 +2,23 @@
2
2
  "author": "ICJR",
3
3
  "dependencies": {
4
4
  "@esportsplus/action": "^0.0.31",
5
+ "@esportsplus/app": "^0.0.0",
5
6
  "@esportsplus/delegated-events": "^0.0.16",
6
7
  "@esportsplus/reactivity": "^0.0.18",
7
- "@esportsplus/template": "^0.0.14",
8
- "autoprefixer": "^10.4.13",
9
- "clean-webpack-plugin": "^4.0.0",
10
- "css-loader": "^6.7.3",
11
- "css-minimizer-webpack-plugin": "^4.2.2",
12
- "glob": "^8.0.3",
13
- "mini-css-extract-plugin": "^2.7.2",
14
- "modern-normalize": "^1.1.0",
15
- "postcss-loader": "^7.0.2",
16
- "sass": "^1.57.1",
17
- "sass-loader": "^13.2.0"
8
+ "@esportsplus/template": "^0.0.14"
18
9
  },
19
10
  "description": "UI",
20
- "devDependencies": {
21
- "npm-run-all": "^4.1.5",
22
- "tsc-alias": "^1.8.2",
23
- "typescript": "^4.9.4",
24
- "webpack": "^5.75.0",
25
- "webpack-cli": "^5.0.1"
26
- },
27
11
  "main": "./build/index.js",
28
12
  "name": "@esportsplus/ui",
29
13
  "private": false,
30
14
  "scripts": {
31
15
  "build": "run-p build:css build:ts",
32
- "build:css": "webpack --config webpack.sass.js",
16
+ "build:css": "webpack --config webpack.sass.config.js --env=production=true",
33
17
  "build:ts": "tsc && tsc-alias",
34
18
  "-": "-",
35
19
  "prepare": "npm run build",
36
20
  "prepublishOnly": "npm run build"
37
21
  },
38
22
  "types": "./build/index.d.ts",
39
- "version": "0.0.35"
23
+ "version": "0.0.36"
40
24
  }
@@ -1,101 +1,14 @@
1
- const { CleanWebpackPlugin } = require('clean-webpack-plugin');
2
- const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
3
- const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4
- const autoprefixer = require('autoprefixer');
5
- const glob = require('glob');
6
- const path = require('path');
7
- const sass = require('sass');
1
+ const { config, entry: e } = require('@esportsplus/app/webpack.sass.config.js');
8
2
 
9
3
 
10
- const config = (entry, output, production) => {
11
- output = path.resolve(output).replace(/\\/g, '/');
12
- production = production !== 'false' ? true : false;
4
+ let entry = {
5
+ 'components': e('./src/components/**/index.scss'),
6
+ 'components.variables': e('./src/components/**/variables.scss'),
13
7
 
14
- return {
15
- entry,
16
- mode: (production ? 'production' : 'development'),
17
- module: {
18
- rules: [
19
- {
20
- test: /\.(c|sc|sa)ss$/,
21
- use: [
22
- {
23
- loader: MiniCssExtractPlugin.loader,
24
- options: {
25
- esModule: false,
26
- },
27
- },
28
- {
29
- loader: 'css-loader',
30
- options: {
31
- // Prevents Following Urls To Fonts/Images
32
- url: false,
33
- importLoaders: 1
34
- }
35
- },
36
- {
37
- loader: 'postcss-loader',
38
- options: {
39
- postcssOptions: {
40
- plugins: [
41
- autoprefixer()
42
- ]
43
- }
44
- }
45
- },
46
- {
47
- loader: 'sass-loader',
48
- options: {
49
- // Use `dart-sass`
50
- implementation: sass,
51
- },
52
- },
53
- ],
54
- },
55
- ],
56
- },
57
- optimization: {
58
- minimize: production,
59
- minimizer: [
60
- `...`,
61
- new CssMinimizerPlugin()
62
- ]
63
- },
64
- output: {
65
- path: output,
66
- },
67
- plugins: [
68
- new MiniCssExtractPlugin(),
69
- new CleanWebpackPlugin({
70
- cleanAfterEveryBuildPatterns: [`${output}/**/*.js`],
71
- cleanOnceBeforeBuildPatterns: [],
72
- dangerouslyAllowCleanPatternsOutsideProject: false,
73
- dry: false,
74
- verbose: false
75
- })
76
- ],
77
- watch: !production
78
- };
79
- };
8
+ 'css-utilities': e('./src/css-utilities/**/index.scss'),
9
+ 'css-utilities.variables': e('./src/css-utilities/**/variables.scss')
10
+ },
11
+ output = './build/css';
80
12
 
81
- const scss = (pattern, { normalizer, ui } = {}) => {
82
- let scss = glob.sync(path.resolve(pattern).replace(/\\/g, '/'), { nosort: true });
83
13
 
84
- if (ui !== undefined) {
85
- if (typeof ui !== 'string') {
86
- throw new Error('`ui` must be a string');
87
- }
88
-
89
- scss.push(`@esportsplus/ui/build/css/css-utilities${str ? `.${str}` : ''}.scss`);
90
- scss.unshift(`@esportsplus/ui/build/css/components${str ? `.${str}` : ''}.scss`);
91
- }
92
-
93
- if (normalizer) {
94
- scss.unshift('modern-normalize/modern-normalize.css');
95
- }
96
-
97
- return scss.flat();
98
- };
99
-
100
-
101
- module.exports = { config, scss };
14
+ module.exports = ({ production }) => config(entry, output, production);
@@ -1 +0,0 @@
1
- @font-face{font-display:swap;font-family:Montserrat;font-style:normal;font-weight:400;src:local("Montserrat Regular"),local("Montserrat-Regular"),url(fonts/Montserrat-Regular.woff2) format("woff2"),url(fonts/Montserrat-Regular.woff) format("woff")}@font-face{font-display:swap;font-family:Montserrat;font-style:italic;font-weight:400;src:local("Montserrat Italic"),local("Montserrat-Italic"),url(fonts/Montserrat-Italic.woff2) format("woff2"),url(fonts/Montserrat-Italic.woff) format("woff")}@font-face{font-display:swap;font-family:Montserrat;font-style:normal;font-weight:500;src:local("Montserrat Medium"),local("Montserrat-Medium"),url(fonts/Montserrat-Medium.woff2) format("woff2"),url(fonts/Montserrat-Medium.woff) format("woff")}@font-face{font-display:swap;font-family:Montserrat;font-style:italic;font-weight:500;src:local("Montserrat MediumItalic"),local("Montserrat-MediumItalic"),url(fonts/Montserrat-MediumItalic.woff2) format("woff2"),url(fonts/Montserrat-MediumItalic.woff) format("woff")}@font-face{font-display:swap;font-family:Montserrat;font-style:normal;font-weight:600;src:local("Montserrat SemiBold"),local("Montserrat-SemiBold"),url(fonts/Montserrat-SemiBold.woff2) format("woff2"),url(fonts/Montserrat-SemiBold.woff) format("woff")}@font-face{font-display:swap;font-family:Montserrat;font-style:italic;font-weight:600;src:local("Montserrat SemiBoldItalic"),local("Montserrat-SemiBoldItalic"),url(fonts/Montserrat-SemiBoldItalic.woff2) format("woff2"),url(fonts/Montserrat-SemiBoldItalic.woff) format("woff")}@font-face{font-display:swap;font-family:Montserrat;font-style:normal;font-weight:700;src:local("Montserrat Bold"),local("Montserrat Bold"),url(fonts/Montserrat-Bold.woff2) format("woff2"),url(fonts/Montserrat-Bold.woff) format("woff")}@font-face{font-display:swap;font-family:Montserrat;font-style:italic;font-weight:700;src:local("Montserrat BoldItalic"),local("Montserrat-BoldItalic"),url(fonts/Montserrat-BoldItalic.woff2) format("woff2"),url(fonts/Montserrat-BoldItalic.woff) format("woff")}
package/webpack.sass.js DELETED
@@ -1,14 +0,0 @@
1
- const { config, scss } = require('./webpack.sass.config.js');
2
-
3
-
4
- let entry = {
5
- 'components': scss(`./src/components/**/index.scss`),
6
- 'components.variables': scss(`./src/components/**/variables.scss`),
7
-
8
- 'css-utilities': scss(`./src/css-utilities/**/index.scss`),
9
- 'css-utilities.variables': scss(`./src/css-utilities/**/variables.scss`)
10
- },
11
- output = './build/css';
12
-
13
-
14
- module.exports = config(entry, output);