@s-ui/bundler 9.15.0 → 9.18.0
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/bin/sui-bundler-build.js
CHANGED
|
@@ -4,14 +4,13 @@
|
|
|
4
4
|
const fs = require('fs')
|
|
5
5
|
const path = require('path')
|
|
6
6
|
const program = require('commander')
|
|
7
|
-
const rimraf = require('rimraf')
|
|
8
7
|
const webpack = require('webpack')
|
|
9
8
|
const {writeFile} = require('@s-ui/helpers/file')
|
|
10
9
|
|
|
11
|
-
const config = require('../webpack.config.prod')
|
|
12
|
-
const linkLoaderConfigBuilder = require('../loaders/linkLoaderConfigBuilder')
|
|
13
|
-
const log = require('../shared/log')
|
|
14
|
-
const {config: projectConfig} = require('../shared')
|
|
10
|
+
const config = require('../webpack.config.prod.js')
|
|
11
|
+
const linkLoaderConfigBuilder = require('../loaders/linkLoaderConfigBuilder.js')
|
|
12
|
+
const log = require('../shared/log.js')
|
|
13
|
+
const {config: projectConfig} = require('../shared/index.js')
|
|
15
14
|
|
|
16
15
|
process.env.NODE_ENV = process.env.NODE_ENV || 'production'
|
|
17
16
|
|
|
@@ -56,7 +55,10 @@ const nextConfig = packagesToLink.length
|
|
|
56
55
|
|
|
57
56
|
if (clean) {
|
|
58
57
|
log.processing('Removing previous build...')
|
|
59
|
-
|
|
58
|
+
fs.rmSync(path.resolve(process.env.PWD, 'public'), {
|
|
59
|
+
force: true,
|
|
60
|
+
recursive: true
|
|
61
|
+
})
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
log.processing('Generating minified bundle...')
|
package/bin/sui-bundler-lib.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/* eslint-disable no-console */
|
|
3
3
|
// https://github.com/coryhouse/react-slingshot/blob/master/tools/build.js
|
|
4
4
|
const program = require('commander')
|
|
5
|
-
const rimraf = require('rimraf')
|
|
6
5
|
const webpack = require('webpack')
|
|
7
6
|
const path = require('path')
|
|
7
|
+
const fs = require('fs')
|
|
8
8
|
const {showError, showWarning} = require('@s-ui/helpers/cli')
|
|
9
9
|
const {getPackageJson} = require('@s-ui/helpers/packages')
|
|
10
10
|
const config = require('../webpack.config.lib.js')
|
|
@@ -65,7 +65,7 @@ if (umd) {
|
|
|
65
65
|
|
|
66
66
|
if (clean) {
|
|
67
67
|
log.processing(`Removing previous build in ${output}...`)
|
|
68
|
-
|
|
68
|
+
fs.rmSync(outputFolder, {force: true, recursive: true})
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
log.processing('Generating minified bundle...')
|
package/loaders/LinkLoader.js
CHANGED
|
@@ -2,7 +2,9 @@ const LIB_PATH = '/lib'
|
|
|
2
2
|
|
|
3
3
|
const createMatchTransformer = linkedPackagePath => match => {
|
|
4
4
|
// we have to detect if the last char is a quote or /lib to add the correct suffix
|
|
5
|
-
const
|
|
5
|
+
const lastChar = match[match.length - 1]
|
|
6
|
+
const nextLastChat = lastChar === "'" ? "'" : '"'
|
|
7
|
+
const suffix = lastChar === nextLastChat ? nextLastChat : LIB_PATH
|
|
6
8
|
return `${linkedPackagePath}${suffix}`.replace('/src/lib', '/src')
|
|
7
9
|
}
|
|
8
10
|
|
|
@@ -19,7 +21,7 @@ function linkLoader(source) {
|
|
|
19
21
|
// create a regex for detecting if the package is used in the source
|
|
20
22
|
// we have to check if it ends with quote (normal import)
|
|
21
23
|
// or with /lib, as we might be importing a submodule of a package
|
|
22
|
-
const regex = new RegExp(`${prefix}${pkg}(\\${LIB_PATH}|')`, 'g')
|
|
24
|
+
const regex = new RegExp(`${prefix}${pkg}(\\${LIB_PATH}|"|')`, 'g')
|
|
23
25
|
// create a function that will be used when match ocurred
|
|
24
26
|
const transformMatch = createMatchTransformer(packagesToLink[pkg])
|
|
25
27
|
// replace all the uses of the package by using the function
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@s-ui/bundler",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.18.0",
|
|
4
4
|
"description": "Config-free bundler for ES6 React apps.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"sui-bundler": "./bin/sui-bundler.js"
|
|
@@ -21,18 +21,18 @@
|
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://github.com/SUI-Components/sui/tree/master/packages/sui-bundler#readme",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@babel/core": "7.17.
|
|
24
|
+
"@babel/core": "7.17.9",
|
|
25
25
|
"@s-ui/helpers": "1",
|
|
26
26
|
"@s-ui/sass-loader": "1",
|
|
27
27
|
"address": "1.1.2",
|
|
28
|
-
"autoprefixer": "10.4.
|
|
29
|
-
"babel-loader": "8.2.
|
|
28
|
+
"autoprefixer": "10.4.5",
|
|
29
|
+
"babel-loader": "8.2.5",
|
|
30
30
|
"babel-preset-sui": "3",
|
|
31
31
|
"buffer": "6.0.3",
|
|
32
32
|
"commander": "8.3.0",
|
|
33
33
|
"css-loader": "6.7.1",
|
|
34
34
|
"css-minimizer-webpack-plugin": "3.4.1",
|
|
35
|
-
"esbuild": "0.14.
|
|
35
|
+
"esbuild": "0.14.38",
|
|
36
36
|
"escape-string-regexp": "4.0.0",
|
|
37
37
|
"fast-glob": "3.2.11",
|
|
38
38
|
"find-free-ports": "3.0.0",
|
|
@@ -42,14 +42,13 @@
|
|
|
42
42
|
"postcss": "8.4.12",
|
|
43
43
|
"postcss-loader": "6.2.1",
|
|
44
44
|
"process": "0.11.10",
|
|
45
|
-
"
|
|
46
|
-
"sass": "1.49.11",
|
|
45
|
+
"sass": "1.50.1",
|
|
47
46
|
"stream-http": "3.2.0",
|
|
48
47
|
"strip-ansi": "6.0.1",
|
|
49
48
|
"style-loader": "3.3.1",
|
|
50
49
|
"url": "0.11.0",
|
|
51
|
-
"webpack": "5.
|
|
52
|
-
"webpack-dev-server": "4.
|
|
50
|
+
"webpack": "5.72.0",
|
|
51
|
+
"webpack-dev-server": "4.8.1",
|
|
53
52
|
"webpack-manifest-plugin": "5.0.0",
|
|
54
53
|
"webpack-node-externals": "3.0.0"
|
|
55
54
|
}
|