@videinfra/static-website-builder 2.0.2 → 2.0.4

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.
Files changed (122) hide show
  1. package/.prettierrc +11 -11
  2. package/CHANGELOG.md +214 -210
  3. package/README.md +102 -102
  4. package/bin/builder.js +40 -40
  5. package/eslint.config.js +39 -39
  6. package/gulpfile.js +63 -63
  7. package/init/default/config/config.js +44 -44
  8. package/init/default/src/html/data/global.js +9 -9
  9. package/init/default/src/javascripts/_entries.js +14 -14
  10. package/init/index.js +63 -63
  11. package/init/test/.env +6 -6
  12. package/init/test/.env.local +3 -2
  13. package/init/test/config/config.js +71 -67
  14. package/init/test/src/html/404.twig +12 -12
  15. package/init/test/src/html/data/global.js +10 -10
  16. package/init/test/src/html/env.twig +21 -21
  17. package/init/test/src/html/layouts/base.twig +1 -1
  18. package/init/test/src/html/other.twig +9 -9
  19. package/init/test/src/html/preposition.twig +4 -4
  20. package/init/test/src/javascripts/_entries-alt.js +10 -10
  21. package/init/test/src/javascripts/_entries.js +19 -19
  22. package/init/test/src/javascripts/common.js +13 -13
  23. package/init/test/src/javascripts/main.js +8 -8
  24. package/init/test/src/javascripts/something.ts +9 -9
  25. package/init/test/src/stylesheets/autoprefixer-test.scss +3 -3
  26. package/init/test/src/stylesheets/env-test.scss +28 -28
  27. package/init/test/src/stylesheets/ignore-test.scss +4 -4
  28. package/init/test/src/stylesheets/nested-calc-test.scss +3 -3
  29. package/init/test/src/stylesheets/sub-folder/import-test.scss +2 -2
  30. package/lib/camelize-file-name.js +21 -21
  31. package/lib/generate-gulp-tasks.js +85 -85
  32. package/lib/get-config.js +203 -204
  33. package/lib/get-file-names.js +23 -23
  34. package/lib/get-path.js +102 -102
  35. package/lib/globs-helper.js +243 -243
  36. package/lib/gulp/dynamic-task.js +8 -8
  37. package/lib/gulp/resolve-dynamic-task.js +11 -11
  38. package/lib/gulp/task-before-dest.js +8 -8
  39. package/lib/gulp/task-end.js +10 -10
  40. package/lib/gulp/task-start.js +12 -12
  41. package/lib/gulp/task-watch.js +66 -66
  42. package/lib/init/copy-folder.js +50 -50
  43. package/lib/init/folder-exists.js +10 -10
  44. package/lib/init/get-folder-list.js +16 -16
  45. package/lib/init/merge-package.js +17 -17
  46. package/lib/init/read-package.js +17 -17
  47. package/lib/log-error.js +15 -15
  48. package/lib/merge.js +27 -27
  49. package/lib/run-preprocess.js +32 -32
  50. package/lib/task-order.js +19 -19
  51. package/package.json +68 -68
  52. package/plugins/example/preprocess-config.js +17 -17
  53. package/plugins/example/task.js +55 -55
  54. package/plugins/example.js +38 -38
  55. package/plugins/sass-engine/preprocess-config.js +59 -59
  56. package/plugins/sass.js +41 -41
  57. package/plugins/twig/lodash-filters/filters.js +91 -91
  58. package/plugins/twig/lodash-filters.js +14 -14
  59. package/plugins/twig/symfony-filters/filters.js +102 -102
  60. package/plugins/twig/symfony-filters/preposition_nbsp.js +77 -77
  61. package/plugins/twig/symfony-filters.js +14 -14
  62. package/plugins/twig/symfony-functions/functions.js +31 -31
  63. package/plugins/twig/symfony-functions.js +14 -14
  64. package/plugins/twig-engine/preprocess-config.js +53 -53
  65. package/plugins/twig.js +74 -74
  66. package/tasks/browser-sync/config.js +39 -39
  67. package/tasks/browser-sync/preprocess-config.js +32 -32
  68. package/tasks/browser-sync/task.js +9 -9
  69. package/tasks/clean/config.js +20 -20
  70. package/tasks/clean/preprocess-config.js +19 -19
  71. package/tasks/clean/task.js +7 -7
  72. package/tasks/data/config.js +34 -34
  73. package/tasks/data/data-loader-js.js +14 -14
  74. package/tasks/data/data-loader-json.js +5 -5
  75. package/tasks/data/get-data.js +96 -96
  76. package/tasks/env/config.js +26 -23
  77. package/tasks/env/get-env.js +113 -81
  78. package/tasks/fonts/config.js +24 -24
  79. package/tasks/fonts/task.js +47 -47
  80. package/tasks/global/config.js +7 -7
  81. package/tasks/html/config.js +42 -42
  82. package/tasks/html/task.js +91 -91
  83. package/tasks/icons/config.js +47 -47
  84. package/tasks/icons/preprocess-config.js +60 -60
  85. package/tasks/icons/task.js +56 -56
  86. package/tasks/images/config.js +27 -27
  87. package/tasks/images/task.js +46 -46
  88. package/tasks/javascripts/config.js +69 -69
  89. package/tasks/javascripts/preprocess-config.js +109 -109
  90. package/tasks/javascripts/task.js +86 -86
  91. package/tasks/sitemap/config.js +48 -48
  92. package/tasks/sitemap/preprocess-config.js +18 -18
  93. package/tasks/sitemap/task.js +69 -69
  94. package/tasks/sizereport/config.js +23 -23
  95. package/tasks/sizereport/task.js +16 -16
  96. package/tasks/static/config.js +27 -27
  97. package/tasks/static/task.js +46 -46
  98. package/tasks/stylesheets/config.js +85 -85
  99. package/tasks/stylesheets/preprocess-config.js +41 -41
  100. package/tasks/stylesheets/task.js +73 -73
  101. package/tests/build/build.test.js +153 -153
  102. package/tests/camelize-file-name.test.js +11 -11
  103. package/tests/generate-gulp-tasks.test.js +78 -78
  104. package/tests/glob-helper.test.js +99 -99
  105. package/tests/merge.test.js +10 -10
  106. package/tests/preposition_nbsp.test.js +50 -50
  107. package/tests/run-preprocess.test.js +90 -90
  108. package/tests/sass-stringify.test.js +24 -24
  109. package/tests/sitemap.test.js +12 -12
  110. package/vendor/gulp-rolldown/index.js +151 -151
  111. package/vendor/gulp-rolldown/plugin-raw.js +17 -17
  112. package/vendor/gulp-rolldown/plugin-virtual-entry.js +30 -30
  113. package/vendor/gulp-sass/CHANGELOG.md +168 -168
  114. package/vendor/gulp-sass/LICENSE +20 -20
  115. package/vendor/gulp-sass/README.md +187 -187
  116. package/vendor/gulp-sass/index.js +208 -208
  117. package/vendor/gulp-sass/package.json +61 -61
  118. package/vendor/gulp-sass/sass-stringify.js +32 -32
  119. package/vendor/gulp-twig/LICENSE +20 -20
  120. package/vendor/gulp-twig/README.md +167 -167
  121. package/vendor/gulp-twig/index.js +138 -138
  122. package/vendor/gulp-twig/package.json +44 -44
package/.prettierrc CHANGED
@@ -1,11 +1,11 @@
1
- {
2
- "trailingComma": "all",
3
- "useTabs": false,
4
- "tabWidth": 4,
5
- "semi": true,
6
- "singleQuote": true,
7
- "printWidth": 280,
8
- "bracketSpacing": true,
9
- "bracketSameLine": false,
10
- "arrowParens": "always"
11
- }
1
+ {
2
+ "trailingComma": "all",
3
+ "useTabs": false,
4
+ "tabWidth": 4,
5
+ "semi": true,
6
+ "singleQuote": true,
7
+ "printWidth": 280,
8
+ "bracketSpacing": true,
9
+ "bracketSameLine": false,
10
+ "arrowParens": "always"
11
+ }
package/CHANGELOG.md CHANGED
@@ -1,210 +1,214 @@
1
- # Change Log
2
- All notable changes to this project will be documented in this file.
3
-
4
- The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
- and this project adheres to [Semantic Versioning](http://semver.org/).
6
-
7
- ## [2.0.0] - 2026-01-27
8
- ### Added
9
- - Replaced webpack with rolldown
10
-
11
- ## [1.17.1] - 2026-01-23
12
- ### Added
13
- - Sitemap generation in watch mode too
14
-
15
- ## [1.17.0] - 2026-01-15
16
- ### Added
17
- - Added sitemap task
18
-
19
- ## [1.16.3] - 2025-10-29
20
- ### Updated
21
- - Added `embed` to TWIG dependency tracking
22
-
23
- ## [1.16.2] - 2025-10-29
24
- ### Updated
25
- - Changed `sass` to sync for better performance
26
-
27
- ## [1.16.0] - 2025-10-22
28
- ### Updated
29
- - Removed `node-sass` and use `sass` module
30
-
31
- ## [1.15.11] - 2025-10-08
32
- - Updated "preposition_nbsp" TWIG filter
33
-
34
- ## [1.15.10] - 2025-09-26
35
- - Updated "preposition_nbsp" TWIG filter
36
-
37
- ## [1.15.9] - 2025-09-10
38
- - Added dashes to the "preposition_nbsp" TWIG filter
39
-
40
- ## [1.15.7] - 2025-07-31
41
- ### Added
42
- - Optional chaining to the JS
43
-
44
- ## [1.15.5] - 2025-05-16
45
- ### Added
46
- - "preposition_nbsp" TWIG filter
47
-
48
- ## [1.15.0] - 2025-01-20
49
- ### Added
50
- - Env file support
51
-
52
- ## [1.14.0] - 2025-01-16
53
- ### Added
54
- - Fail build process when TWIG task fails
55
-
56
- ## [1.13.4] - 2024-10-08
57
- ### Fixed
58
- - Fail gulp process when htmlmin task fails
59
-
60
- ## [1.13.1] - 2024-09-19
61
- ### Added
62
- - Fail whole gulp process when one of the tasks fail
63
-
64
- ## [1.13.0] - 2024-08-23
65
- ### Added
66
- - Added 'outpuSubFolder' property to entries configuration
67
-
68
- ## [1.12.1] - 2024-08-19
69
- ### Added
70
- - Version string to the dynamically loaded JS files
71
-
72
- ## [1.12.0] - 2024-02-25
73
- ### Added
74
- - Support for multiple entry lists which each has its own "shared" chunk file
75
-
76
- ## [1.11.1] - 2024-02-24
77
- ### Fixed
78
- - Fixed dependencies
79
-
80
- ## [1.11.0] - 2024-02-24
81
- ### Updated
82
- - Added dynamic entries, webpack will rebuild when entries change
83
-
84
- ## [1.10.1] - 2024-02-13
85
- ### Fixed
86
- - TWIG config
87
-
88
- ## [1.10.0] - 2024-02-13
89
- ### Updated
90
- - Changed TWIG to use async mode by default, added option
91
- - Enabled TWIG cache for improved production builds
92
-
93
- ## [1.9.1] - 2023-11-01
94
- ### Fixed
95
- - Fixed public path for dynamic imports
96
-
97
- ## [1.9.0] - 2023-08-16
98
- ### Updated
99
- - Downgraded nano-memoize version
100
-
101
- ## [1.8.0] - 2023-08-10
102
- ### Updated
103
- - Dependencies
104
- ### Removed
105
- - postcss-ignore-plugin
106
- ### Added
107
- - CSS tests
108
-
109
- ## [1.7.0] - 2023-05-25
110
- ### Updated
111
- - Depedencies
112
- - Added autoprefixer test
113
-
114
- ## [1.6.4] - 2023-03-29
115
- ### Updated
116
- - Added stylesheet source path to the default include paths
117
-
118
- ## [1.6.3] - 2022-10-25
119
- ### Fixed
120
- - Error fix for OSX when changing any HTML file
121
-
122
- ## [1.6.1] - 2022-10-21
123
- ### Fixed
124
- - `false` task config being overwritten by empty array resulting in task being performed
125
-
126
- ## [1.6.0] - 2022-06-20
127
- ### Updated
128
- - gulp-sass to use latest node-sass version
129
- ### Added
130
- - `stylesheets.legacy` configuration option to turn off `node-sass` and use `sass`
131
-
132
- ## [1.5.2] - 2022-06-17
133
- ### Updated
134
- - In build mode prevent data from being read more than once
135
-
136
- ## [1.5.1] - 2022-04-14
137
- ### Fixed
138
- - Dependency update
139
-
140
- ## [1.5.0] - 2022-04-13
141
- ### Fixed
142
- - Read files in `data` folder recursively
143
-
144
- ## [1.4.3] - 2022-03-08
145
- ### Fixed
146
- - Fixed negative glob paths not working
147
-
148
- ## [1.4.2] - 2021-08-27
149
- ### Fixed
150
- - Fixed postcss-ignore-plugin only removing and adding content in unrelated files
151
-
152
- ## [1.4.1] - 2021-05-20
153
- ### Fixed
154
- - Enabled postcss-ignore-plugin only when cssnano is used
155
-
156
- ## [1.4.0] - 2021-05-20
157
- ### Added
158
- - Added postcss-ignore-plugin
159
-
160
- ## [1.3.2] - 2021-04-07
161
- ### Added
162
- - Added gulp-dependents plugin to the .scss files for faster builds
163
-
164
- ## [1.3.1] - 2021-02-22
165
- ### Fixed
166
- - data JS files not being usable with "require"
167
-
168
- ## [1.3.0] - 2021-01-27
169
- ### Changed
170
- - Replaced gulp.watch with latest chokidar which is more reliable
171
-
172
- ## [1.2.8] - 2020-11-12
173
- ### Changed
174
- - Updated dependencies
175
-
176
- ## [1.2.7] - 2020-11-03
177
- ### Added
178
- - Command `--tasks` to list available tasks
179
-
180
- ## [1.2.6] - 2020-10-28
181
- ### Removed
182
- - gulp-util dependency
183
-
184
- ## [1.2.5] - 2020-09-24
185
- ### Fixed
186
- - cssnano configuration
187
- - disabled `calc()` minification which minifies them incorrectly
188
-
189
- ## [1.2.4] - 2020-09-16
190
- ### Added
191
- - 'ignore' to data task configuration
192
-
193
- ## [1.2.3] - 2020-09-07
194
- ### Fixed
195
- - fixed gulp not working if there is an error when starting watch command
196
-
197
- ## [1.2.2] - 2020-08-18
198
- ### Fixed
199
- - fixed production mode detection being triggered in development mode
200
-
201
- ## [1.2.1] - 2020-07-13
202
- ### Added
203
- - gulp-util to the dependencies
204
-
205
-
206
- ## [1.2.0] - 2020-07-13
207
- ### Removes
208
- - .browserlistrc which was overriding per-project browser list
209
- ### Changed
210
- - Any task with `-build` in the name will now trigger `production` mode
1
+ # Change Log
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
+ and this project adheres to [Semantic Versioning](http://semver.org/).
6
+
7
+ ## [2.0.3] - 2026-02-03
8
+ ### Added
9
+ - Allow writing ASSETS_VERSION to .env file
10
+
11
+ ## [2.0.0] - 2026-01-27
12
+ ### Added
13
+ - Replaced webpack with rolldown
14
+
15
+ ## [1.17.1] - 2026-01-23
16
+ ### Added
17
+ - Sitemap generation in watch mode too
18
+
19
+ ## [1.17.0] - 2026-01-15
20
+ ### Added
21
+ - Added sitemap task
22
+
23
+ ## [1.16.3] - 2025-10-29
24
+ ### Updated
25
+ - Added `embed` to TWIG dependency tracking
26
+
27
+ ## [1.16.2] - 2025-10-29
28
+ ### Updated
29
+ - Changed `sass` to sync for better performance
30
+
31
+ ## [1.16.0] - 2025-10-22
32
+ ### Updated
33
+ - Removed `node-sass` and use `sass` module
34
+
35
+ ## [1.15.11] - 2025-10-08
36
+ - Updated "preposition_nbsp" TWIG filter
37
+
38
+ ## [1.15.10] - 2025-09-26
39
+ - Updated "preposition_nbsp" TWIG filter
40
+
41
+ ## [1.15.9] - 2025-09-10
42
+ - Added dashes to the "preposition_nbsp" TWIG filter
43
+
44
+ ## [1.15.7] - 2025-07-31
45
+ ### Added
46
+ - Optional chaining to the JS
47
+
48
+ ## [1.15.5] - 2025-05-16
49
+ ### Added
50
+ - "preposition_nbsp" TWIG filter
51
+
52
+ ## [1.15.0] - 2025-01-20
53
+ ### Added
54
+ - Env file support
55
+
56
+ ## [1.14.0] - 2025-01-16
57
+ ### Added
58
+ - Fail build process when TWIG task fails
59
+
60
+ ## [1.13.4] - 2024-10-08
61
+ ### Fixed
62
+ - Fail gulp process when htmlmin task fails
63
+
64
+ ## [1.13.1] - 2024-09-19
65
+ ### Added
66
+ - Fail whole gulp process when one of the tasks fail
67
+
68
+ ## [1.13.0] - 2024-08-23
69
+ ### Added
70
+ - Added 'outpuSubFolder' property to entries configuration
71
+
72
+ ## [1.12.1] - 2024-08-19
73
+ ### Added
74
+ - Version string to the dynamically loaded JS files
75
+
76
+ ## [1.12.0] - 2024-02-25
77
+ ### Added
78
+ - Support for multiple entry lists which each has its own "shared" chunk file
79
+
80
+ ## [1.11.1] - 2024-02-24
81
+ ### Fixed
82
+ - Fixed dependencies
83
+
84
+ ## [1.11.0] - 2024-02-24
85
+ ### Updated
86
+ - Added dynamic entries, webpack will rebuild when entries change
87
+
88
+ ## [1.10.1] - 2024-02-13
89
+ ### Fixed
90
+ - TWIG config
91
+
92
+ ## [1.10.0] - 2024-02-13
93
+ ### Updated
94
+ - Changed TWIG to use async mode by default, added option
95
+ - Enabled TWIG cache for improved production builds
96
+
97
+ ## [1.9.1] - 2023-11-01
98
+ ### Fixed
99
+ - Fixed public path for dynamic imports
100
+
101
+ ## [1.9.0] - 2023-08-16
102
+ ### Updated
103
+ - Downgraded nano-memoize version
104
+
105
+ ## [1.8.0] - 2023-08-10
106
+ ### Updated
107
+ - Dependencies
108
+ ### Removed
109
+ - postcss-ignore-plugin
110
+ ### Added
111
+ - CSS tests
112
+
113
+ ## [1.7.0] - 2023-05-25
114
+ ### Updated
115
+ - Depedencies
116
+ - Added autoprefixer test
117
+
118
+ ## [1.6.4] - 2023-03-29
119
+ ### Updated
120
+ - Added stylesheet source path to the default include paths
121
+
122
+ ## [1.6.3] - 2022-10-25
123
+ ### Fixed
124
+ - Error fix for OSX when changing any HTML file
125
+
126
+ ## [1.6.1] - 2022-10-21
127
+ ### Fixed
128
+ - `false` task config being overwritten by empty array resulting in task being performed
129
+
130
+ ## [1.6.0] - 2022-06-20
131
+ ### Updated
132
+ - gulp-sass to use latest node-sass version
133
+ ### Added
134
+ - `stylesheets.legacy` configuration option to turn off `node-sass` and use `sass`
135
+
136
+ ## [1.5.2] - 2022-06-17
137
+ ### Updated
138
+ - In build mode prevent data from being read more than once
139
+
140
+ ## [1.5.1] - 2022-04-14
141
+ ### Fixed
142
+ - Dependency update
143
+
144
+ ## [1.5.0] - 2022-04-13
145
+ ### Fixed
146
+ - Read files in `data` folder recursively
147
+
148
+ ## [1.4.3] - 2022-03-08
149
+ ### Fixed
150
+ - Fixed negative glob paths not working
151
+
152
+ ## [1.4.2] - 2021-08-27
153
+ ### Fixed
154
+ - Fixed postcss-ignore-plugin only removing and adding content in unrelated files
155
+
156
+ ## [1.4.1] - 2021-05-20
157
+ ### Fixed
158
+ - Enabled postcss-ignore-plugin only when cssnano is used
159
+
160
+ ## [1.4.0] - 2021-05-20
161
+ ### Added
162
+ - Added postcss-ignore-plugin
163
+
164
+ ## [1.3.2] - 2021-04-07
165
+ ### Added
166
+ - Added gulp-dependents plugin to the .scss files for faster builds
167
+
168
+ ## [1.3.1] - 2021-02-22
169
+ ### Fixed
170
+ - data JS files not being usable with "require"
171
+
172
+ ## [1.3.0] - 2021-01-27
173
+ ### Changed
174
+ - Replaced gulp.watch with latest chokidar which is more reliable
175
+
176
+ ## [1.2.8] - 2020-11-12
177
+ ### Changed
178
+ - Updated dependencies
179
+
180
+ ## [1.2.7] - 2020-11-03
181
+ ### Added
182
+ - Command `--tasks` to list available tasks
183
+
184
+ ## [1.2.6] - 2020-10-28
185
+ ### Removed
186
+ - gulp-util dependency
187
+
188
+ ## [1.2.5] - 2020-09-24
189
+ ### Fixed
190
+ - cssnano configuration
191
+ - disabled `calc()` minification which minifies them incorrectly
192
+
193
+ ## [1.2.4] - 2020-09-16
194
+ ### Added
195
+ - 'ignore' to data task configuration
196
+
197
+ ## [1.2.3] - 2020-09-07
198
+ ### Fixed
199
+ - fixed gulp not working if there is an error when starting watch command
200
+
201
+ ## [1.2.2] - 2020-08-18
202
+ ### Fixed
203
+ - fixed production mode detection being triggered in development mode
204
+
205
+ ## [1.2.1] - 2020-07-13
206
+ ### Added
207
+ - gulp-util to the dependencies
208
+
209
+
210
+ ## [1.2.0] - 2020-07-13
211
+ ### Removes
212
+ - .browserlistrc which was overriding per-project browser list
213
+ ### Changed
214
+ - Any task with `-build` in the name will now trigger `production` mode
package/README.md CHANGED
@@ -1,102 +1,102 @@
1
- [npm-url]: https://npmjs.org/package/@videinfra/static-website-builder
2
- [npm-image]: http://img.shields.io/npm/v/@videinfra/static-website-builder.svg
3
- [travis-url]: https://travis-ci.org/videinfra/static-website-builder
4
- [travis-image]: https://travis-ci.org/videinfra/static-website-builder.svg?branch=master
5
-
6
- [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]
7
-
8
- `static-website-builder` is a customizable static site project builder powered by Gulp, Rolldown, SASS, PostCSS, TwigJS, BrowserSync
9
-
10
- ## Requirements
11
-
12
- - Node.js >= 20.0.0
13
-
14
- ## Features
15
-
16
- - Gulp: built using gulp
17
- - Built-in Server: Local development server with hot reloading
18
- - Templates: HTML templates with minification
19
- - TWIG: Optional TwigJS template engine with optional plugins for additional functions and filters
20
- - Stylesheets: Autoprefixing and minification with PostCSS support
21
- - SASS: Optional SASS / SCSS compilation
22
- - Javascript/Typescript: Transpilation, bundling and minification with rolldown
23
- - SVG icons: Sprite generation from individual SVG files
24
-
25
-
26
- * Paths: Source and destinations paths are configurable
27
- * Features: All features can be configured or disabled
28
- * Plugins: create additional plugins / gulp tasks
29
-
30
- ## Quick start
31
-
32
- ```
33
- npm init
34
- npm install @videinfra/static-website-builder --save
35
- npx builder init
36
- ```
37
-
38
- Start development server
39
- ```
40
- npm run start
41
- ```
42
-
43
- Build production files
44
- ```
45
- npm run start
46
- ```
47
-
48
- Note: these commands are added to the project during `npm init`.
49
-
50
- ## Commands
51
-
52
- ### Development server
53
-
54
- ```npx run builder watch```
55
-
56
- ### Generate production ready files
57
-
58
- ```npx run builder build```
59
-
60
- ### List all available tasks
61
-
62
- ```npx run builder --tasks```
63
-
64
- ## Project templates
65
-
66
- As used in quick start, project templates are used to generate boilerplate / starter files and add commands to the project:
67
-
68
- - [`default`](https://github.com/videinfra/static-website-builder/tree/master/init/default) - simple template with normalize.scss
69
-
70
-
71
- ## Plugins
72
-
73
- Built-in plugins:
74
- - `sass` - adds `.sass` and `.scss` file rendering using SASS
75
- - `twig` - adds `.twig` file rendering using TwigJS
76
- - `twig/symfony-filters` - adds `humanize` filter as found in Symfony
77
- - `twig/symfony-functions` - adds `asset` function as found in Symfony
78
- - `twig/lodash-filters` - adds `omit`, `pick`, `filter`, `reject` and `find` filters as in lodash
79
-
80
- Plugins can be enabled by adding them to the `config/config.js`, eg.
81
-
82
- ```js
83
- export const plugins = [
84
- // Enables SASS engine and .sass and .scss file compilation
85
- require('@videinfra/static-website-builder/plugins/sass'),
86
-
87
- // Enables TwigJS engine .twig file compilation
88
- require('@videinfra/static-website-builder/plugins/twig'),
89
- require('@videinfra/static-website-builder/plugins/twig/symfony-filters'),
90
- require('@videinfra/static-website-builder/plugins/twig/symfony-functions'),
91
- require('@videinfra/static-website-builder/plugins/twig/lodash-filters'),
92
- ];
93
- ```
94
-
95
- ## Wiki
96
-
97
- See [our wiki](https://github.com/videinfra/static-website-builder/wiki) for additional information.
98
-
99
- [npm-url]: https://npmjs.org/package/@videinfra/static-website-builder
100
- [npm-image]: http://img.shields.io/npm/v/@videinfra/static-website-builder.svg
101
- [travis-url]: https://travis-ci.org/videinfra/static-website-builder
102
- [travis-image]: https://travis-ci.org/videinfra/static-website-builder.svg?branch=master
1
+ [npm-url]: https://npmjs.org/package/@videinfra/static-website-builder
2
+ [npm-image]: http://img.shields.io/npm/v/@videinfra/static-website-builder.svg
3
+ [travis-url]: https://travis-ci.org/videinfra/static-website-builder
4
+ [travis-image]: https://travis-ci.org/videinfra/static-website-builder.svg?branch=master
5
+
6
+ [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]
7
+
8
+ `static-website-builder` is a customizable static site project builder powered by Gulp, Rolldown, SASS, PostCSS, TwigJS, BrowserSync
9
+
10
+ ## Requirements
11
+
12
+ - Node.js >= 20.0.0
13
+
14
+ ## Features
15
+
16
+ - Gulp: built using gulp
17
+ - Built-in Server: Local development server with hot reloading
18
+ - Templates: HTML templates with minification
19
+ - TWIG: Optional TwigJS template engine with optional plugins for additional functions and filters
20
+ - Stylesheets: Autoprefixing and minification with PostCSS support
21
+ - SASS: Optional SASS / SCSS compilation
22
+ - Javascript/Typescript: Transpilation, bundling and minification with rolldown
23
+ - SVG icons: Sprite generation from individual SVG files
24
+
25
+
26
+ * Paths: Source and destinations paths are configurable
27
+ * Features: All features can be configured or disabled
28
+ * Plugins: create additional plugins / gulp tasks
29
+
30
+ ## Quick start
31
+
32
+ ```
33
+ npm init
34
+ npm install @videinfra/static-website-builder --save
35
+ npx builder init
36
+ ```
37
+
38
+ Start development server
39
+ ```
40
+ npm run start
41
+ ```
42
+
43
+ Build production files
44
+ ```
45
+ npm run start
46
+ ```
47
+
48
+ Note: these commands are added to the project during `npm init`.
49
+
50
+ ## Commands
51
+
52
+ ### Development server
53
+
54
+ ```npx run builder watch```
55
+
56
+ ### Generate production ready files
57
+
58
+ ```npx run builder build```
59
+
60
+ ### List all available tasks
61
+
62
+ ```npx run builder --tasks```
63
+
64
+ ## Project templates
65
+
66
+ As used in quick start, project templates are used to generate boilerplate / starter files and add commands to the project:
67
+
68
+ - [`default`](https://github.com/videinfra/static-website-builder/tree/master/init/default) - simple template with normalize.scss
69
+
70
+
71
+ ## Plugins
72
+
73
+ Built-in plugins:
74
+ - `sass` - adds `.sass` and `.scss` file rendering using SASS
75
+ - `twig` - adds `.twig` file rendering using TwigJS
76
+ - `twig/symfony-filters` - adds `humanize` filter as found in Symfony
77
+ - `twig/symfony-functions` - adds `asset` function as found in Symfony
78
+ - `twig/lodash-filters` - adds `omit`, `pick`, `filter`, `reject` and `find` filters as in lodash
79
+
80
+ Plugins can be enabled by adding them to the `config/config.js`, eg.
81
+
82
+ ```js
83
+ export const plugins = [
84
+ // Enables SASS engine and .sass and .scss file compilation
85
+ require('@videinfra/static-website-builder/plugins/sass'),
86
+
87
+ // Enables TwigJS engine .twig file compilation
88
+ require('@videinfra/static-website-builder/plugins/twig'),
89
+ require('@videinfra/static-website-builder/plugins/twig/symfony-filters'),
90
+ require('@videinfra/static-website-builder/plugins/twig/symfony-functions'),
91
+ require('@videinfra/static-website-builder/plugins/twig/lodash-filters'),
92
+ ];
93
+ ```
94
+
95
+ ## Wiki
96
+
97
+ See [our wiki](https://github.com/videinfra/static-website-builder/wiki) for additional information.
98
+
99
+ [npm-url]: https://npmjs.org/package/@videinfra/static-website-builder
100
+ [npm-image]: http://img.shields.io/npm/v/@videinfra/static-website-builder.svg
101
+ [travis-url]: https://travis-ci.org/videinfra/static-website-builder
102
+ [travis-image]: https://travis-ci.org/videinfra/static-website-builder.svg?branch=master