@videinfra/static-website-builder 2.0.4 → 2.0.6

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 +226 -214
  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 -3
  13. package/init/test/config/config.js +71 -71
  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 -203
  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 +135 -96
  76. package/tasks/env/config.js +26 -26
  77. package/tasks/env/get-env.js +113 -113
  78. package/tasks/fonts/config.js +24 -24
  79. package/tasks/fonts/task.js +51 -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 +159 -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,214 +1,226 @@
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
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.6] - 2026-02-12
8
+ ### Fixed
9
+ - Broken fonts due to incorrect encoding
10
+
11
+ ## [2.0.5] - 2026-02-12
12
+ ### Added
13
+ - Expose `currentPagePath` to Twig templates
14
+
15
+ ## [2.0.4] - 2026-02-11
16
+ ### Fixed
17
+ - Path error on windows
18
+
19
+ ## [2.0.3] - 2026-02-03
20
+ ### Added
21
+ - Allow writing ASSETS_VERSION to .env file
22
+
23
+ ## [2.0.0] - 2026-01-27
24
+ ### Added
25
+ - Replaced webpack with rolldown
26
+
27
+ ## [1.17.1] - 2026-01-23
28
+ ### Added
29
+ - Sitemap generation in watch mode too
30
+
31
+ ## [1.17.0] - 2026-01-15
32
+ ### Added
33
+ - Added sitemap task
34
+
35
+ ## [1.16.3] - 2025-10-29
36
+ ### Updated
37
+ - Added `embed` to TWIG dependency tracking
38
+
39
+ ## [1.16.2] - 2025-10-29
40
+ ### Updated
41
+ - Changed `sass` to sync for better performance
42
+
43
+ ## [1.16.0] - 2025-10-22
44
+ ### Updated
45
+ - Removed `node-sass` and use `sass` module
46
+
47
+ ## [1.15.11] - 2025-10-08
48
+ - Updated "preposition_nbsp" TWIG filter
49
+
50
+ ## [1.15.10] - 2025-09-26
51
+ - Updated "preposition_nbsp" TWIG filter
52
+
53
+ ## [1.15.9] - 2025-09-10
54
+ - Added dashes to the "preposition_nbsp" TWIG filter
55
+
56
+ ## [1.15.7] - 2025-07-31
57
+ ### Added
58
+ - Optional chaining to the JS
59
+
60
+ ## [1.15.5] - 2025-05-16
61
+ ### Added
62
+ - "preposition_nbsp" TWIG filter
63
+
64
+ ## [1.15.0] - 2025-01-20
65
+ ### Added
66
+ - Env file support
67
+
68
+ ## [1.14.0] - 2025-01-16
69
+ ### Added
70
+ - Fail build process when TWIG task fails
71
+
72
+ ## [1.13.4] - 2024-10-08
73
+ ### Fixed
74
+ - Fail gulp process when htmlmin task fails
75
+
76
+ ## [1.13.1] - 2024-09-19
77
+ ### Added
78
+ - Fail whole gulp process when one of the tasks fail
79
+
80
+ ## [1.13.0] - 2024-08-23
81
+ ### Added
82
+ - Added 'outpuSubFolder' property to entries configuration
83
+
84
+ ## [1.12.1] - 2024-08-19
85
+ ### Added
86
+ - Version string to the dynamically loaded JS files
87
+
88
+ ## [1.12.0] - 2024-02-25
89
+ ### Added
90
+ - Support for multiple entry lists which each has its own "shared" chunk file
91
+
92
+ ## [1.11.1] - 2024-02-24
93
+ ### Fixed
94
+ - Fixed dependencies
95
+
96
+ ## [1.11.0] - 2024-02-24
97
+ ### Updated
98
+ - Added dynamic entries, webpack will rebuild when entries change
99
+
100
+ ## [1.10.1] - 2024-02-13
101
+ ### Fixed
102
+ - TWIG config
103
+
104
+ ## [1.10.0] - 2024-02-13
105
+ ### Updated
106
+ - Changed TWIG to use async mode by default, added option
107
+ - Enabled TWIG cache for improved production builds
108
+
109
+ ## [1.9.1] - 2023-11-01
110
+ ### Fixed
111
+ - Fixed public path for dynamic imports
112
+
113
+ ## [1.9.0] - 2023-08-16
114
+ ### Updated
115
+ - Downgraded nano-memoize version
116
+
117
+ ## [1.8.0] - 2023-08-10
118
+ ### Updated
119
+ - Dependencies
120
+ ### Removed
121
+ - postcss-ignore-plugin
122
+ ### Added
123
+ - CSS tests
124
+
125
+ ## [1.7.0] - 2023-05-25
126
+ ### Updated
127
+ - Depedencies
128
+ - Added autoprefixer test
129
+
130
+ ## [1.6.4] - 2023-03-29
131
+ ### Updated
132
+ - Added stylesheet source path to the default include paths
133
+
134
+ ## [1.6.3] - 2022-10-25
135
+ ### Fixed
136
+ - Error fix for OSX when changing any HTML file
137
+
138
+ ## [1.6.1] - 2022-10-21
139
+ ### Fixed
140
+ - `false` task config being overwritten by empty array resulting in task being performed
141
+
142
+ ## [1.6.0] - 2022-06-20
143
+ ### Updated
144
+ - gulp-sass to use latest node-sass version
145
+ ### Added
146
+ - `stylesheets.legacy` configuration option to turn off `node-sass` and use `sass`
147
+
148
+ ## [1.5.2] - 2022-06-17
149
+ ### Updated
150
+ - In build mode prevent data from being read more than once
151
+
152
+ ## [1.5.1] - 2022-04-14
153
+ ### Fixed
154
+ - Dependency update
155
+
156
+ ## [1.5.0] - 2022-04-13
157
+ ### Fixed
158
+ - Read files in `data` folder recursively
159
+
160
+ ## [1.4.3] - 2022-03-08
161
+ ### Fixed
162
+ - Fixed negative glob paths not working
163
+
164
+ ## [1.4.2] - 2021-08-27
165
+ ### Fixed
166
+ - Fixed postcss-ignore-plugin only removing and adding content in unrelated files
167
+
168
+ ## [1.4.1] - 2021-05-20
169
+ ### Fixed
170
+ - Enabled postcss-ignore-plugin only when cssnano is used
171
+
172
+ ## [1.4.0] - 2021-05-20
173
+ ### Added
174
+ - Added postcss-ignore-plugin
175
+
176
+ ## [1.3.2] - 2021-04-07
177
+ ### Added
178
+ - Added gulp-dependents plugin to the .scss files for faster builds
179
+
180
+ ## [1.3.1] - 2021-02-22
181
+ ### Fixed
182
+ - data JS files not being usable with "require"
183
+
184
+ ## [1.3.0] - 2021-01-27
185
+ ### Changed
186
+ - Replaced gulp.watch with latest chokidar which is more reliable
187
+
188
+ ## [1.2.8] - 2020-11-12
189
+ ### Changed
190
+ - Updated dependencies
191
+
192
+ ## [1.2.7] - 2020-11-03
193
+ ### Added
194
+ - Command `--tasks` to list available tasks
195
+
196
+ ## [1.2.6] - 2020-10-28
197
+ ### Removed
198
+ - gulp-util dependency
199
+
200
+ ## [1.2.5] - 2020-09-24
201
+ ### Fixed
202
+ - cssnano configuration
203
+ - disabled `calc()` minification which minifies them incorrectly
204
+
205
+ ## [1.2.4] - 2020-09-16
206
+ ### Added
207
+ - 'ignore' to data task configuration
208
+
209
+ ## [1.2.3] - 2020-09-07
210
+ ### Fixed
211
+ - fixed gulp not working if there is an error when starting watch command
212
+
213
+ ## [1.2.2] - 2020-08-18
214
+ ### Fixed
215
+ - fixed production mode detection being triggered in development mode
216
+
217
+ ## [1.2.1] - 2020-07-13
218
+ ### Added
219
+ - gulp-util to the dependencies
220
+
221
+
222
+ ## [1.2.0] - 2020-07-13
223
+ ### Removes
224
+ - .browserlistrc which was overriding per-project browser list
225
+ ### Changed
226
+ - Any task with `-build` in the name will now trigger `production` mode