@modernpoacher/gremlins 0.0.5 → 0.0.7
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 +29 -41
- package/transform.sh +3 -0
- package/webpack.config.mjs +105 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modernpoacher/gremlins",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "Gremlins",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Gremlins",
|
|
@@ -24,10 +24,9 @@
|
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"prepublishOnly": "cross-env NODE_ENV=production npm run build",
|
|
27
|
-
"build": "cross-env DEBUG=@modernpoacher/gremlins
|
|
28
|
-
"build:watch": "cross-env DEBUG=@modernpoacher/gremlins
|
|
29
|
-
"transform": "cross-env DEBUG=@modernpoacher/gremlins
|
|
30
|
-
"transform:watch": "cross-env DEBUG=@modernpoacher/gremlins npm run gulp -- transform:watch",
|
|
27
|
+
"build": "cross-env DEBUG=@modernpoacher/gremlins webpack",
|
|
28
|
+
"build:watch": "cross-env DEBUG=@modernpoacher/gremlins webpack --watch",
|
|
29
|
+
"transform": "cross-env DEBUG=@modernpoacher/gremlins ./transform.sh",
|
|
31
30
|
"pregulp": "npm run nvm",
|
|
32
31
|
"gulp": "gulp --color",
|
|
33
32
|
"prelint": "npm run nvm",
|
|
@@ -46,61 +45,50 @@
|
|
|
46
45
|
"debug": "^4.3.4"
|
|
47
46
|
},
|
|
48
47
|
"devDependencies": {
|
|
49
|
-
"@babel/core": "^7.22.
|
|
48
|
+
"@babel/core": "^7.22.20",
|
|
50
49
|
"@babel/eslint-parser": "^7.22.15",
|
|
51
|
-
"@babel/preset-env": "^7.22.
|
|
50
|
+
"@babel/preset-env": "^7.22.20",
|
|
52
51
|
"@babel/preset-react": "^7.22.15",
|
|
53
52
|
"@babel/register": "^7.22.15",
|
|
54
|
-
"@modernpoacher/design-system": "1.0.
|
|
55
|
-
"@modernpoacher/hooks": "^1.0.
|
|
56
|
-
"@
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
59
|
-
"@
|
|
60
|
-
"@
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
63
|
-
"@
|
|
64
|
-
"@storybook/addon-essentials": "^7.4.0",
|
|
65
|
-
"@storybook/addon-links": "^7.4.0",
|
|
66
|
-
"@storybook/react": "^7.4.0",
|
|
67
|
-
"@storybook/react-webpack5": "^7.4.0",
|
|
68
|
-
"@types/react": "^18.2.21",
|
|
69
|
-
"@typescript-eslint/eslint-plugin": "^6.6.0",
|
|
70
|
-
"@typescript-eslint/parser": "^6.6.0",
|
|
71
|
-
"autoprefixer": "^10.4.15",
|
|
53
|
+
"@modernpoacher/design-system": "1.0.77",
|
|
54
|
+
"@modernpoacher/hooks": "^1.0.436",
|
|
55
|
+
"@storybook/addon-actions": "^7.4.3",
|
|
56
|
+
"@storybook/addon-essentials": "^7.4.3",
|
|
57
|
+
"@storybook/addon-links": "^7.4.3",
|
|
58
|
+
"@storybook/react": "^7.4.3",
|
|
59
|
+
"@storybook/react-webpack5": "^7.4.3",
|
|
60
|
+
"@types/react": "^18.2.22",
|
|
61
|
+
"@typescript-eslint/eslint-plugin": "^6.7.2",
|
|
62
|
+
"@typescript-eslint/parser": "^6.7.2",
|
|
72
63
|
"babel-plugin-module-resolver": "^5.0.0",
|
|
64
|
+
"clean-webpack-plugin": "^4.0.0",
|
|
73
65
|
"core-js": "^3.32.2",
|
|
74
66
|
"cross-env": "^7.0.3",
|
|
75
|
-
"cssnano": "^6.0.1",
|
|
76
|
-
"del": "^7.1.0",
|
|
77
67
|
"eslint": "^8.49.0",
|
|
78
68
|
"eslint-config-standard": "^17.1.0",
|
|
79
69
|
"eslint-config-standard-with-typescript": "^39.0.0",
|
|
80
70
|
"eslint-import-resolver-babel-module": "^5.3.2",
|
|
81
71
|
"eslint-plugin-react": "^7.33.2",
|
|
82
|
-
"glob-all": "^3.3.1",
|
|
83
72
|
"husky": "^8.0.3",
|
|
84
|
-
"jest": "^29.
|
|
85
|
-
"
|
|
86
|
-
"postcss
|
|
73
|
+
"jest": "^29.7.0",
|
|
74
|
+
"mini-css-extract-plugin": "^2.7.6",
|
|
75
|
+
"postcss": "^8.4.30",
|
|
76
|
+
"postcss-import": "^15.1.0",
|
|
77
|
+
"postcss-loader": "^7.3.3",
|
|
87
78
|
"postcss-map": "^0.11.0",
|
|
88
|
-
"postcss-normalize": "^10.0.1",
|
|
89
|
-
"postcss-scss": "^4.0.8",
|
|
90
79
|
"prop-types": "^15.8.1",
|
|
91
80
|
"react": "^18.2.0",
|
|
92
81
|
"react-dom": "^18.2.0",
|
|
93
82
|
"react-test-renderer": "^18.2.0",
|
|
94
|
-
"
|
|
95
|
-
"sass": "^1.
|
|
96
|
-
"
|
|
97
|
-
"
|
|
83
|
+
"remove-files-webpack-plugin": "^1.5.0",
|
|
84
|
+
"sass": "^1.68.0",
|
|
85
|
+
"sass-loader": "^13.3.2",
|
|
86
|
+
"storybook": "^7.4.3",
|
|
87
|
+
"vinyl-paths": "^5.0.0",
|
|
88
|
+
"webpack": "^5.88.2",
|
|
89
|
+
"webpack-cli": "^5.1.4"
|
|
98
90
|
},
|
|
99
91
|
"imports": {
|
|
100
|
-
"#build/gulp/build/*": "./build/gulp/build/*.mjs",
|
|
101
|
-
"#build/gulp/build": "./build/gulp/build/index.mjs",
|
|
102
|
-
"#build/gulp/transform": "./build/gulp/transform/index.mjs",
|
|
103
|
-
"#build/gulp/*": "./build/gulp/*.mjs",
|
|
104
92
|
"#build/paths": "./build/paths.mjs"
|
|
105
93
|
},
|
|
106
94
|
"exports": {
|
package/transform.sh
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import path from 'node:path'
|
|
2
|
+
import Webpack from 'webpack'
|
|
3
|
+
import {
|
|
4
|
+
CleanWebpackPlugin
|
|
5
|
+
} from 'clean-webpack-plugin'
|
|
6
|
+
import RemoveFilesPlugin from 'remove-files-webpack-plugin'
|
|
7
|
+
import MiniCssExtractPlugin from 'mini-css-extract-plugin'
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
sourcePath as SOURCE_PATH,
|
|
11
|
+
targetPath as TARGET_PATH,
|
|
12
|
+
modulePath as MODULE_PATH
|
|
13
|
+
} from '#build/paths'
|
|
14
|
+
|
|
15
|
+
const {
|
|
16
|
+
SourceMapDevToolPlugin
|
|
17
|
+
} = Webpack
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
mode: 'production',
|
|
21
|
+
entry: {
|
|
22
|
+
'preview-head': path.join(SOURCE_PATH, 'sass/preview-head.scss')
|
|
23
|
+
},
|
|
24
|
+
output: {
|
|
25
|
+
path: path.join(TARGET_PATH, 'css')
|
|
26
|
+
},
|
|
27
|
+
stats: {
|
|
28
|
+
colors: true
|
|
29
|
+
},
|
|
30
|
+
module: {
|
|
31
|
+
rules: [
|
|
32
|
+
{
|
|
33
|
+
test: /\.scss$/i,
|
|
34
|
+
use: [
|
|
35
|
+
MiniCssExtractPlugin.loader,
|
|
36
|
+
{
|
|
37
|
+
loader: 'css-loader',
|
|
38
|
+
options: {
|
|
39
|
+
importLoaders: 1,
|
|
40
|
+
sourceMap: false
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
loader: 'postcss-loader',
|
|
45
|
+
options: {
|
|
46
|
+
sourceMap: false,
|
|
47
|
+
postcssOptions: {
|
|
48
|
+
config: false,
|
|
49
|
+
plugins: [
|
|
50
|
+
'postcss-import',
|
|
51
|
+
[
|
|
52
|
+
'postcss-map', {
|
|
53
|
+
maps: [
|
|
54
|
+
path.join(MODULE_PATH, '@modernpoacher/design-system/src/tokens/palette.json')
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
loader: 'sass-loader',
|
|
64
|
+
options: {
|
|
65
|
+
sourceMap: false,
|
|
66
|
+
sassOptions: {
|
|
67
|
+
includePaths: [
|
|
68
|
+
path.join(MODULE_PATH, '@modernpoacher/design-system/src/sass')
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
plugins: [
|
|
78
|
+
new CleanWebpackPlugin({
|
|
79
|
+
verbose: false,
|
|
80
|
+
cleanOnceBeforeBuildPatterns: [
|
|
81
|
+
path.join(TARGET_PATH, 'css/*.css'),
|
|
82
|
+
path.join(TARGET_PATH, 'css/*.css.map')
|
|
83
|
+
]
|
|
84
|
+
}),
|
|
85
|
+
new MiniCssExtractPlugin({
|
|
86
|
+
filename: '[name].css'
|
|
87
|
+
}),
|
|
88
|
+
new SourceMapDevToolPlugin({
|
|
89
|
+
test: /\.css$/i,
|
|
90
|
+
filename: '[name].css.map'
|
|
91
|
+
}),
|
|
92
|
+
new RemoveFilesPlugin({
|
|
93
|
+
after: {
|
|
94
|
+
test: [
|
|
95
|
+
{
|
|
96
|
+
folder: path.join(TARGET_PATH, 'css'),
|
|
97
|
+
method (filePath) {
|
|
98
|
+
return /\.js$/m.test(filePath)
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
}
|