mod-build 4.0.71-beta.2 → 4.0.71
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 +1 -1
- package/src/scripts/plugins.js +20 -20
package/package.json
CHANGED
package/src/scripts/plugins.js
CHANGED
|
@@ -13,28 +13,28 @@ import { handlebarsHelpers } from "./utils.js";
|
|
|
13
13
|
* @example
|
|
14
14
|
* ```javascript
|
|
15
15
|
* copyStaticAssets([
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
16
|
+
{
|
|
17
|
+
src: 'resources/templates' // It will copy all the files and keep the structure.
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
src: 'fonts',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
src: 'videos',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
src: 'accessible-components', // To copy only specific extension files!
|
|
27
|
+
ext: ['.min.js']
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
src: 'foo',
|
|
31
|
+
srcRoot: 'bar', // Option to change the source dir.
|
|
32
|
+
outDir: 'public' // Option to change the destination dir.
|
|
33
|
+
}
|
|
34
34
|
])
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
export const copyStaticAssets =
|
|
37
|
+
export const copyStaticAssets = (assetsList = []) => {
|
|
38
38
|
const findAndCopyAssets = function(assets) {
|
|
39
39
|
if (!Array.isArray(assets) || !assets.length) {
|
|
40
40
|
return;
|
|
@@ -89,7 +89,7 @@ export const copyStaticAssets = async (assetsList = []) => {
|
|
|
89
89
|
return {
|
|
90
90
|
name: 'copy-static-assets',
|
|
91
91
|
enforce: 'post',
|
|
92
|
-
|
|
92
|
+
writeBundle() {
|
|
93
93
|
findAndCopyAssets(assetsList);
|
|
94
94
|
},
|
|
95
95
|
};
|