@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.
- package/.prettierrc +11 -11
- package/CHANGELOG.md +214 -210
- package/README.md +102 -102
- package/bin/builder.js +40 -40
- package/eslint.config.js +39 -39
- package/gulpfile.js +63 -63
- package/init/default/config/config.js +44 -44
- package/init/default/src/html/data/global.js +9 -9
- package/init/default/src/javascripts/_entries.js +14 -14
- package/init/index.js +63 -63
- package/init/test/.env +6 -6
- package/init/test/.env.local +3 -2
- package/init/test/config/config.js +71 -67
- package/init/test/src/html/404.twig +12 -12
- package/init/test/src/html/data/global.js +10 -10
- package/init/test/src/html/env.twig +21 -21
- package/init/test/src/html/layouts/base.twig +1 -1
- package/init/test/src/html/other.twig +9 -9
- package/init/test/src/html/preposition.twig +4 -4
- package/init/test/src/javascripts/_entries-alt.js +10 -10
- package/init/test/src/javascripts/_entries.js +19 -19
- package/init/test/src/javascripts/common.js +13 -13
- package/init/test/src/javascripts/main.js +8 -8
- package/init/test/src/javascripts/something.ts +9 -9
- package/init/test/src/stylesheets/autoprefixer-test.scss +3 -3
- package/init/test/src/stylesheets/env-test.scss +28 -28
- package/init/test/src/stylesheets/ignore-test.scss +4 -4
- package/init/test/src/stylesheets/nested-calc-test.scss +3 -3
- package/init/test/src/stylesheets/sub-folder/import-test.scss +2 -2
- package/lib/camelize-file-name.js +21 -21
- package/lib/generate-gulp-tasks.js +85 -85
- package/lib/get-config.js +203 -204
- package/lib/get-file-names.js +23 -23
- package/lib/get-path.js +102 -102
- package/lib/globs-helper.js +243 -243
- package/lib/gulp/dynamic-task.js +8 -8
- package/lib/gulp/resolve-dynamic-task.js +11 -11
- package/lib/gulp/task-before-dest.js +8 -8
- package/lib/gulp/task-end.js +10 -10
- package/lib/gulp/task-start.js +12 -12
- package/lib/gulp/task-watch.js +66 -66
- package/lib/init/copy-folder.js +50 -50
- package/lib/init/folder-exists.js +10 -10
- package/lib/init/get-folder-list.js +16 -16
- package/lib/init/merge-package.js +17 -17
- package/lib/init/read-package.js +17 -17
- package/lib/log-error.js +15 -15
- package/lib/merge.js +27 -27
- package/lib/run-preprocess.js +32 -32
- package/lib/task-order.js +19 -19
- package/package.json +68 -68
- package/plugins/example/preprocess-config.js +17 -17
- package/plugins/example/task.js +55 -55
- package/plugins/example.js +38 -38
- package/plugins/sass-engine/preprocess-config.js +59 -59
- package/plugins/sass.js +41 -41
- package/plugins/twig/lodash-filters/filters.js +91 -91
- package/plugins/twig/lodash-filters.js +14 -14
- package/plugins/twig/symfony-filters/filters.js +102 -102
- package/plugins/twig/symfony-filters/preposition_nbsp.js +77 -77
- package/plugins/twig/symfony-filters.js +14 -14
- package/plugins/twig/symfony-functions/functions.js +31 -31
- package/plugins/twig/symfony-functions.js +14 -14
- package/plugins/twig-engine/preprocess-config.js +53 -53
- package/plugins/twig.js +74 -74
- package/tasks/browser-sync/config.js +39 -39
- package/tasks/browser-sync/preprocess-config.js +32 -32
- package/tasks/browser-sync/task.js +9 -9
- package/tasks/clean/config.js +20 -20
- package/tasks/clean/preprocess-config.js +19 -19
- package/tasks/clean/task.js +7 -7
- package/tasks/data/config.js +34 -34
- package/tasks/data/data-loader-js.js +14 -14
- package/tasks/data/data-loader-json.js +5 -5
- package/tasks/data/get-data.js +96 -96
- package/tasks/env/config.js +26 -23
- package/tasks/env/get-env.js +113 -81
- package/tasks/fonts/config.js +24 -24
- package/tasks/fonts/task.js +47 -47
- package/tasks/global/config.js +7 -7
- package/tasks/html/config.js +42 -42
- package/tasks/html/task.js +91 -91
- package/tasks/icons/config.js +47 -47
- package/tasks/icons/preprocess-config.js +60 -60
- package/tasks/icons/task.js +56 -56
- package/tasks/images/config.js +27 -27
- package/tasks/images/task.js +46 -46
- package/tasks/javascripts/config.js +69 -69
- package/tasks/javascripts/preprocess-config.js +109 -109
- package/tasks/javascripts/task.js +86 -86
- package/tasks/sitemap/config.js +48 -48
- package/tasks/sitemap/preprocess-config.js +18 -18
- package/tasks/sitemap/task.js +69 -69
- package/tasks/sizereport/config.js +23 -23
- package/tasks/sizereport/task.js +16 -16
- package/tasks/static/config.js +27 -27
- package/tasks/static/task.js +46 -46
- package/tasks/stylesheets/config.js +85 -85
- package/tasks/stylesheets/preprocess-config.js +41 -41
- package/tasks/stylesheets/task.js +73 -73
- package/tests/build/build.test.js +153 -153
- package/tests/camelize-file-name.test.js +11 -11
- package/tests/generate-gulp-tasks.test.js +78 -78
- package/tests/glob-helper.test.js +99 -99
- package/tests/merge.test.js +10 -10
- package/tests/preposition_nbsp.test.js +50 -50
- package/tests/run-preprocess.test.js +90 -90
- package/tests/sass-stringify.test.js +24 -24
- package/tests/sitemap.test.js +12 -12
- package/vendor/gulp-rolldown/index.js +151 -151
- package/vendor/gulp-rolldown/plugin-raw.js +17 -17
- package/vendor/gulp-rolldown/plugin-virtual-entry.js +30 -30
- package/vendor/gulp-sass/CHANGELOG.md +168 -168
- package/vendor/gulp-sass/LICENSE +20 -20
- package/vendor/gulp-sass/README.md +187 -187
- package/vendor/gulp-sass/index.js +208 -208
- package/vendor/gulp-sass/package.json +61 -61
- package/vendor/gulp-sass/sass-stringify.js +32 -32
- package/vendor/gulp-twig/LICENSE +20 -20
- package/vendor/gulp-twig/README.md +167 -167
- package/vendor/gulp-twig/index.js +138 -138
- 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.
|
|
8
|
-
### Added
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
## [
|
|
12
|
-
### Added
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
## [1.17.
|
|
16
|
-
### Added
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
## [1.
|
|
20
|
-
###
|
|
21
|
-
- Added
|
|
22
|
-
|
|
23
|
-
## [1.16.
|
|
24
|
-
### Updated
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
## [1.16.
|
|
28
|
-
### Updated
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
## [1.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
## [1.15.
|
|
45
|
-
### Added
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
## [1.15.
|
|
49
|
-
### Added
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
## [1.
|
|
53
|
-
### Added
|
|
54
|
-
-
|
|
55
|
-
|
|
56
|
-
## [1.
|
|
57
|
-
###
|
|
58
|
-
- Fail
|
|
59
|
-
|
|
60
|
-
## [1.13.
|
|
61
|
-
###
|
|
62
|
-
- Fail
|
|
63
|
-
|
|
64
|
-
## [1.13.
|
|
65
|
-
### Added
|
|
66
|
-
-
|
|
67
|
-
|
|
68
|
-
## [1.
|
|
69
|
-
### Added
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
## [1.12.
|
|
73
|
-
### Added
|
|
74
|
-
-
|
|
75
|
-
|
|
76
|
-
## [1.
|
|
77
|
-
###
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
## [1.11.
|
|
81
|
-
###
|
|
82
|
-
-
|
|
83
|
-
|
|
84
|
-
## [1.
|
|
85
|
-
###
|
|
86
|
-
-
|
|
87
|
-
|
|
88
|
-
## [1.10.
|
|
89
|
-
###
|
|
90
|
-
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
-
|
|
96
|
-
|
|
97
|
-
## [1.9.
|
|
98
|
-
###
|
|
99
|
-
-
|
|
100
|
-
|
|
101
|
-
## [1.
|
|
102
|
-
### Updated
|
|
103
|
-
-
|
|
104
|
-
|
|
105
|
-
-
|
|
106
|
-
###
|
|
107
|
-
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
###
|
|
111
|
-
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
- Added
|
|
117
|
-
|
|
118
|
-
## [1.6.
|
|
119
|
-
###
|
|
120
|
-
-
|
|
121
|
-
|
|
122
|
-
## [1.6.
|
|
123
|
-
### Fixed
|
|
124
|
-
-
|
|
125
|
-
|
|
126
|
-
## [1.6.
|
|
127
|
-
###
|
|
128
|
-
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
###
|
|
134
|
-
-
|
|
135
|
-
|
|
136
|
-
## [1.5.
|
|
137
|
-
###
|
|
138
|
-
-
|
|
139
|
-
|
|
140
|
-
## [1.5.
|
|
141
|
-
### Fixed
|
|
142
|
-
-
|
|
143
|
-
|
|
144
|
-
## [1.
|
|
145
|
-
### Fixed
|
|
146
|
-
-
|
|
147
|
-
|
|
148
|
-
## [1.4.
|
|
149
|
-
### Fixed
|
|
150
|
-
- Fixed
|
|
151
|
-
|
|
152
|
-
## [1.4.
|
|
153
|
-
### Fixed
|
|
154
|
-
-
|
|
155
|
-
|
|
156
|
-
## [1.4.
|
|
157
|
-
###
|
|
158
|
-
-
|
|
159
|
-
|
|
160
|
-
## [1.
|
|
161
|
-
### Added
|
|
162
|
-
- Added
|
|
163
|
-
|
|
164
|
-
## [1.3.
|
|
165
|
-
###
|
|
166
|
-
-
|
|
167
|
-
|
|
168
|
-
## [1.3.
|
|
169
|
-
###
|
|
170
|
-
-
|
|
171
|
-
|
|
172
|
-
## [1.
|
|
173
|
-
### Changed
|
|
174
|
-
-
|
|
175
|
-
|
|
176
|
-
## [1.2.
|
|
177
|
-
###
|
|
178
|
-
-
|
|
179
|
-
|
|
180
|
-
## [1.2.
|
|
181
|
-
###
|
|
182
|
-
-
|
|
183
|
-
|
|
184
|
-
## [1.2.
|
|
185
|
-
###
|
|
186
|
-
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
-
|
|
192
|
-
|
|
193
|
-
## [1.2.
|
|
194
|
-
###
|
|
195
|
-
-
|
|
196
|
-
|
|
197
|
-
## [1.2.
|
|
198
|
-
### Fixed
|
|
199
|
-
- fixed
|
|
200
|
-
|
|
201
|
-
## [1.2.
|
|
202
|
-
###
|
|
203
|
-
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
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
|