@modernpoacher/gremlins 0.0.4 → 0.0.6
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/babel.config.cjs +0 -8
- package/package.json +14 -29
- package/src/components/group/index.cjs +2 -2
- package/src/gremlins/fieldset/group/index.cjs +2 -2
- package/src/index.cjs +2 -0
- package/src/index.mjs +4 -1
- package/transform.sh +3 -0
- package/webpack.config.mjs +105 -0
package/babel.config.cjs
CHANGED
|
@@ -40,14 +40,6 @@ const presets = [
|
|
|
40
40
|
|
|
41
41
|
const plugins = [
|
|
42
42
|
'@babel/syntax-jsx',
|
|
43
|
-
'@babel/proposal-export-default-from',
|
|
44
|
-
'@babel/proposal-export-namespace-from',
|
|
45
|
-
[
|
|
46
|
-
'@babel/proposal-class-properties',
|
|
47
|
-
{
|
|
48
|
-
loose: false
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
43
|
[
|
|
52
44
|
'module-resolver', {
|
|
53
45
|
alias: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modernpoacher/gremlins",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
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",
|
|
@@ -48,21 +47,11 @@
|
|
|
48
47
|
"devDependencies": {
|
|
49
48
|
"@babel/core": "^7.22.17",
|
|
50
49
|
"@babel/eslint-parser": "^7.22.15",
|
|
51
|
-
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
52
|
-
"@babel/plugin-proposal-export-default-from": "^7.22.17",
|
|
53
|
-
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
|
|
54
50
|
"@babel/preset-env": "^7.22.15",
|
|
55
51
|
"@babel/preset-react": "^7.22.15",
|
|
56
52
|
"@babel/register": "^7.22.15",
|
|
57
53
|
"@modernpoacher/design-system": "1.0.72",
|
|
58
54
|
"@modernpoacher/hooks": "^1.0.434",
|
|
59
|
-
"@sequencemedia/gulp": "^1.1.71",
|
|
60
|
-
"@sequencemedia/gulp-clean-css": "^1.0.33",
|
|
61
|
-
"@sequencemedia/gulp-css-purge": "^1.1.26",
|
|
62
|
-
"@sequencemedia/gulp-debug": "^1.0.37",
|
|
63
|
-
"@sequencemedia/gulp-postcss": "^1.0.36",
|
|
64
|
-
"@sequencemedia/gulp-sass": "^1.0.32",
|
|
65
|
-
"@sequencemedia/gulp-sourcemaps": "^1.0.33",
|
|
66
55
|
"@storybook/addon-actions": "^7.4.0",
|
|
67
56
|
"@storybook/addon-essentials": "^7.4.0",
|
|
68
57
|
"@storybook/addon-links": "^7.4.0",
|
|
@@ -71,39 +60,35 @@
|
|
|
71
60
|
"@types/react": "^18.2.21",
|
|
72
61
|
"@typescript-eslint/eslint-plugin": "^6.6.0",
|
|
73
62
|
"@typescript-eslint/parser": "^6.6.0",
|
|
74
|
-
"autoprefixer": "^10.4.15",
|
|
75
63
|
"babel-plugin-module-resolver": "^5.0.0",
|
|
64
|
+
"clean-webpack-plugin": "^4.0.0",
|
|
76
65
|
"core-js": "^3.32.2",
|
|
77
66
|
"cross-env": "^7.0.3",
|
|
78
|
-
"cssnano": "^6.0.1",
|
|
79
|
-
"del": "^7.1.0",
|
|
80
67
|
"eslint": "^8.49.0",
|
|
81
68
|
"eslint-config-standard": "^17.1.0",
|
|
82
69
|
"eslint-config-standard-with-typescript": "^39.0.0",
|
|
83
70
|
"eslint-import-resolver-babel-module": "^5.3.2",
|
|
84
71
|
"eslint-plugin-react": "^7.33.2",
|
|
85
|
-
"glob-all": "^3.3.1",
|
|
86
72
|
"husky": "^8.0.3",
|
|
87
73
|
"jest": "^29.6.4",
|
|
74
|
+
"mini-css-extract-plugin": "^2.7.6",
|
|
88
75
|
"postcss": "^8.4.29",
|
|
89
|
-
"postcss-
|
|
76
|
+
"postcss-import": "^15.1.0",
|
|
77
|
+
"postcss-loader": "^7.3.3",
|
|
90
78
|
"postcss-map": "^0.11.0",
|
|
91
|
-
"postcss-normalize": "^10.0.1",
|
|
92
|
-
"postcss-scss": "^4.0.8",
|
|
93
79
|
"prop-types": "^15.8.1",
|
|
94
80
|
"react": "^18.2.0",
|
|
95
81
|
"react-dom": "^18.2.0",
|
|
96
82
|
"react-test-renderer": "^18.2.0",
|
|
97
|
-
"
|
|
98
|
-
"sass": "^1.
|
|
83
|
+
"remove-files-webpack-plugin": "^1.5.0",
|
|
84
|
+
"sass": "^1.68.0",
|
|
85
|
+
"sass-loader": "^13.3.2",
|
|
99
86
|
"storybook": "^7.4.0",
|
|
100
|
-
"vinyl-paths": "^5.0.0"
|
|
87
|
+
"vinyl-paths": "^5.0.0",
|
|
88
|
+
"webpack": "^5.88.2",
|
|
89
|
+
"webpack-cli": "^5.1.4"
|
|
101
90
|
},
|
|
102
91
|
"imports": {
|
|
103
|
-
"#build/gulp/build/*": "./build/gulp/build/*.mjs",
|
|
104
|
-
"#build/gulp/build": "./build/gulp/build/index.mjs",
|
|
105
|
-
"#build/gulp/transform": "./build/gulp/transform/index.mjs",
|
|
106
|
-
"#build/gulp/*": "./build/gulp/*.mjs",
|
|
107
92
|
"#build/paths": "./build/paths.mjs"
|
|
108
93
|
},
|
|
109
94
|
"exports": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require('@babel/register')({
|
|
2
2
|
ignore: [
|
|
3
|
-
/node_modules\/(?!@modernpoacher\/cogs|@modernpoacher\/sprockets)/
|
|
3
|
+
/node_modules\/(?!@modernpoacher\/cogs|@modernpoacher\/gremlins|@modernpoacher\/sprockets)/
|
|
4
4
|
]
|
|
5
5
|
})
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ const debug = require('debug')
|
|
|
8
8
|
|
|
9
9
|
const log = debug('@modernpoacher/sprockets/components/group')
|
|
10
10
|
|
|
11
|
-
log('`
|
|
11
|
+
log('`gremlins` is awake')
|
|
12
12
|
|
|
13
13
|
const {
|
|
14
14
|
default: component
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require('@babel/register')({
|
|
2
2
|
ignore: [
|
|
3
|
-
/node_modules\/(?!@modernpoacher\/cogs|@modernpoacher\/sprockets)/
|
|
3
|
+
/node_modules\/(?!@modernpoacher\/cogs|@modernpoacher\/gremlins|@modernpoacher\/sprockets)/
|
|
4
4
|
]
|
|
5
5
|
})
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ const debug = require('debug')
|
|
|
8
8
|
|
|
9
9
|
const log = debug('@modernpoacher/gremlins/gremlins/fieldset/group')
|
|
10
10
|
|
|
11
|
-
log('`
|
|
11
|
+
log('`gremlins` is awake')
|
|
12
12
|
|
|
13
13
|
const {
|
|
14
14
|
default: component
|
package/src/index.cjs
CHANGED
|
@@ -18,6 +18,7 @@ const RadioGremlin = require('./gremlins/radio/index.cjs')
|
|
|
18
18
|
const SelectGremlin = require('./gremlins/select/index.cjs')
|
|
19
19
|
const TextGremlin = require('./gremlins/text/index.cjs')
|
|
20
20
|
const TextareaGremlin = require('./gremlins/textarea/index.cjs')
|
|
21
|
+
const FieldsetGremlin = require('./gremlins/fieldset/index.cjs')
|
|
21
22
|
|
|
22
23
|
module.exports.CheckboxGremlin = CheckboxGremlin
|
|
23
24
|
module.exports.EmailGremlin = EmailGremlin
|
|
@@ -27,3 +28,4 @@ module.exports.RadioGremlin = RadioGremlin
|
|
|
27
28
|
module.exports.SelectGremlin = SelectGremlin
|
|
28
29
|
module.exports.TextGremlin = TextGremlin
|
|
29
30
|
module.exports.TextareaGremlin = TextareaGremlin
|
|
31
|
+
module.exports.FieldsetGremlin = FieldsetGremlin
|
package/src/index.mjs
CHANGED
|
@@ -8,6 +8,7 @@ import RadioGremlin from './gremlins/radio/index.cjs'
|
|
|
8
8
|
import SelectGremlin from './gremlins/select/index.cjs'
|
|
9
9
|
import TextGremlin from './gremlins/text/index.cjs'
|
|
10
10
|
import TextareaGremlin from './gremlins/textarea/index.cjs'
|
|
11
|
+
import FieldsetGremlin from './gremlins/fieldset/index.cjs'
|
|
11
12
|
|
|
12
13
|
const log = debug('@modernpoacher/gremlins')
|
|
13
14
|
|
|
@@ -21,6 +22,7 @@ export { default as RadioGremlin } from './gremlins/radio/index.cjs'
|
|
|
21
22
|
export { default as SelectGremlin } from './gremlins/select/index.cjs'
|
|
22
23
|
export { default as TextGremlin } from './gremlins/text/index.cjs'
|
|
23
24
|
export { default as TextareaGremlin } from './gremlins/textarea/index.cjs'
|
|
25
|
+
export { default as FieldsetGremlin } from './gremlins/fieldset/index.cjs'
|
|
24
26
|
|
|
25
27
|
export default {
|
|
26
28
|
CheckboxGremlin,
|
|
@@ -30,5 +32,6 @@ export default {
|
|
|
30
32
|
RadioGremlin,
|
|
31
33
|
SelectGremlin,
|
|
32
34
|
TextGremlin,
|
|
33
|
-
TextareaGremlin
|
|
35
|
+
TextareaGremlin,
|
|
36
|
+
FieldsetGremlin
|
|
34
37
|
}
|
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
|
+
}
|