@@ -27,17 +27,43 @@ sh.cd(path.join(__dirname, '..'))
27
27
28
28
// remove any previously created folder with the same name
29
29
sh . rm ( '-rf' , folderName )
30
+
30
31
// create any folders so that `cp` works
31
32
sh . mkdir ( '-p' , folderName )
32
33
sh . mkdir ( '-p' , `${ folderName } /assets/brand/` )
34
+ sh . mkdir ( '-p' , `${ folderName } /assets/dist/css/` )
35
+ sh . mkdir ( '-p' , `${ folderName } /assets/dist/js/` )
33
36
34
37
sh . cp ( '-Rf' , `_gh_pages/docs/${ versionShort } /examples/*` , folderName )
35
- sh . cp ( '-Rf' , `_gh_pages/docs/${ versionShort } /dist/` , `${ folderName } /assets/` )
36
- // also copy the two brand images we use in the examples
37
- sh . cp ( '-f' , [
38
- `_gh_pages/docs/${ versionShort } /assets/brand/bootstrap-logo.svg` ,
39
- `_gh_pages/docs/${ versionShort } /assets/brand/bootstrap-logo-white.svg`
40
- ] , `${ folderName } /assets/brand/` )
38
+
39
+ // these are the files we need in the examples
40
+ const cssFiles = [
41
+ 'bootstrap.min.css' ,
42
+ 'bootstrap.min.css.map' ,
43
+ 'bootstrap.rtl.min.css' ,
44
+ 'bootstrap.rtl.min.css.map'
45
+ ]
46
+ const jsFiles = [
47
+ 'bootstrap.bundle.min.js' ,
48
+ 'bootstrap.bundle.min.js.map'
49
+ ]
50
+ const imgFiles = [
51
+ 'bootstrap-logo.svg' ,
52
+ 'bootstrap-logo-white.svg'
53
+ ]
54
+
55
+ cssFiles . forEach ( file => {
56
+ sh . cp ( '-f' , `_gh_pages/docs/${ versionShort } /dist/css/${ file } ` , `${ folderName } /assets/dist/css/` )
57
+ } )
58
+
59
+ jsFiles . forEach ( file => {
60
+ sh . cp ( '-f' , `_gh_pages/docs/${ versionShort } /dist/js/${ file } ` , `${ folderName } /assets/dist/js/` )
61
+ } )
62
+
63
+ imgFiles . forEach ( file => {
64
+ sh . cp ( '-f' , `_gh_pages/docs/${ versionShort } /assets/brand/${ file } ` , `${ folderName } /assets/brand/` )
65
+ } )
66
+
41
67
sh . rm ( `${ folderName } /index.html` )
42
68
43
69
// get all examples' HTML files
0 commit comments