@movable/studio-framework-build-config 3.1.1-error-logging → 3.2.0-app-validation
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 +4 -4
- package/src/apps/rollup.js +32 -27
- package/src/packages/rollup.js +11 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@movable/studio-framework-build-config",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0-app-validation",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Movable Ink",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"@babel/plugin-transform-runtime": "^7.13.15",
|
|
14
14
|
"@babel/preset-env": "^7.20.2",
|
|
15
15
|
"@babel/preset-react": "^7.14.5",
|
|
16
|
-
"@movable/rollup-plugin-manifest-merger": "^3.
|
|
17
|
-
"@movable/rollup-plugin-package-manifest-validator": "^3.
|
|
16
|
+
"@movable/rollup-plugin-manifest-merger": "^3.2.0-app-validation",
|
|
17
|
+
"@movable/rollup-plugin-package-manifest-validator": "^3.2.0-app-validation",
|
|
18
18
|
"@rollup/plugin-terser": "^0.4.0",
|
|
19
19
|
"@rollup/plugin-url": "^6.0.0",
|
|
20
20
|
"esbuild": "^0.15.14",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"volta": {
|
|
46
46
|
"extends": "../../package.json"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "4480978dc5c4fdc28f0dd55f569fe6d8344f6469"
|
|
49
49
|
}
|
package/src/apps/rollup.js
CHANGED
|
@@ -13,6 +13,7 @@ const { manifestMerger } = require('@movable/rollup-plugin-manifest-merger');
|
|
|
13
13
|
const { importExportToGlobal, dependenciesOnly } = require('rollup-split-index');
|
|
14
14
|
const babelrc = require('./babel');
|
|
15
15
|
const buildDataLoader = require('./data-loader');
|
|
16
|
+
const { manifestValidatorPluginApps } = require('@movable/rollup-plugin-manifest-validator');
|
|
16
17
|
|
|
17
18
|
module.exports = function rollupConfig(passedConfig = {}) {
|
|
18
19
|
const inputFile = 'app/index.js';
|
|
@@ -24,35 +25,37 @@ module.exports = function rollupConfig(passedConfig = {}) {
|
|
|
24
25
|
...passedConfig
|
|
25
26
|
};
|
|
26
27
|
|
|
28
|
+
const plugins = [
|
|
29
|
+
manifestMerger({ output: 'manifest.yml', ignoreFrameworkVersionUpdate: true }),
|
|
30
|
+
babel(babelrc),
|
|
31
|
+
resolve(),
|
|
32
|
+
commonjs(),
|
|
33
|
+
postcss({
|
|
34
|
+
modules: false
|
|
35
|
+
}),
|
|
36
|
+
copy({
|
|
37
|
+
assets: glob.sync('**/app/*.{png,jpg,jpeg}')
|
|
38
|
+
}),
|
|
39
|
+
image(),
|
|
40
|
+
json(),
|
|
41
|
+
dependenciesOnly(),
|
|
42
|
+
replace({
|
|
43
|
+
'process.env.NODE_ENV': JSON.stringify('production')
|
|
44
|
+
}),
|
|
45
|
+
config.dataLoader ? buildDataLoader(config.dataLoader) : null,
|
|
46
|
+
config.minify
|
|
47
|
+
? terser({
|
|
48
|
+
ecma: 2022,
|
|
49
|
+
sourceMap: true,
|
|
50
|
+
format: { comments: false, ecma: 2022 }
|
|
51
|
+
})
|
|
52
|
+
: null,
|
|
53
|
+
config.serve ? serve() : null
|
|
54
|
+
].filter(Boolean);
|
|
55
|
+
|
|
27
56
|
const vendorTree = {
|
|
28
57
|
input: inputFile,
|
|
29
|
-
plugins:
|
|
30
|
-
manifestMerger({ output: 'manifest.yml', ignoreFrameworkVersionUpdate: true }),
|
|
31
|
-
babel(babelrc),
|
|
32
|
-
resolve(),
|
|
33
|
-
commonjs(),
|
|
34
|
-
postcss({
|
|
35
|
-
modules: false
|
|
36
|
-
}),
|
|
37
|
-
copy({
|
|
38
|
-
assets: glob.sync('**/app/*.{png,jpg,jpeg}')
|
|
39
|
-
}),
|
|
40
|
-
image(),
|
|
41
|
-
json(),
|
|
42
|
-
dependenciesOnly(),
|
|
43
|
-
replace({
|
|
44
|
-
'process.env.NODE_ENV': JSON.stringify('production')
|
|
45
|
-
}),
|
|
46
|
-
config.dataLoader ? buildDataLoader(config.dataLoader) : null,
|
|
47
|
-
config.minify
|
|
48
|
-
? terser({
|
|
49
|
-
ecma: 2022,
|
|
50
|
-
sourceMap: true,
|
|
51
|
-
format: { comments: false, ecma: 2022 }
|
|
52
|
-
})
|
|
53
|
-
: null,
|
|
54
|
-
config.serve ? serve() : null
|
|
55
|
-
].filter(Boolean),
|
|
58
|
+
plugins: plugins,
|
|
56
59
|
output: {
|
|
57
60
|
name: 'studioDependencies',
|
|
58
61
|
dir: './',
|
|
@@ -61,6 +64,8 @@ module.exports = function rollupConfig(passedConfig = {}) {
|
|
|
61
64
|
}
|
|
62
65
|
};
|
|
63
66
|
|
|
67
|
+
plugins.splice(1, 0, manifestValidatorPluginApps({ manifestPath: 'app-manifest.yml' }));
|
|
68
|
+
|
|
64
69
|
const indexTree = {
|
|
65
70
|
input: inputFile,
|
|
66
71
|
plugins: [
|
package/src/packages/rollup.js
CHANGED
|
@@ -11,7 +11,7 @@ const {
|
|
|
11
11
|
manifestMerger,
|
|
12
12
|
inputFile
|
|
13
13
|
} = require('@movable/rollup-plugin-manifest-merger');
|
|
14
|
-
const {
|
|
14
|
+
const { manifestValidatorPluginPackages } = require('@movable/rollup-plugin-manifest-validator');
|
|
15
15
|
const babelConf = require('./babel');
|
|
16
16
|
|
|
17
17
|
const reactBase = require.resolve('react');
|
|
@@ -44,7 +44,11 @@ module.exports = function rollupConfig(pkg) {
|
|
|
44
44
|
];
|
|
45
45
|
|
|
46
46
|
if (!process.env.SKIP_VALIDATION)
|
|
47
|
-
plugins.splice(
|
|
47
|
+
plugins.splice(
|
|
48
|
+
1,
|
|
49
|
+
0,
|
|
50
|
+
manifestValidatorPluginPackages({ manifestPath: 'package-manifest.yml' })
|
|
51
|
+
);
|
|
48
52
|
|
|
49
53
|
return {
|
|
50
54
|
input: inputFile,
|
|
@@ -75,7 +79,11 @@ module.exports = function rollupConfig(pkg) {
|
|
|
75
79
|
];
|
|
76
80
|
|
|
77
81
|
if (!process.env.SKIP_VALIDATION)
|
|
78
|
-
plugins.splice(
|
|
82
|
+
plugins.splice(
|
|
83
|
+
1,
|
|
84
|
+
0,
|
|
85
|
+
manifestValidatorPluginPackages({ manifestPath: 'package-manifest.yml' })
|
|
86
|
+
);
|
|
79
87
|
|
|
80
88
|
return {
|
|
81
89
|
output: [
|