generator-white-label 3.0.0 → 5.0.0

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 (334) hide show
  1. package/README.md +140 -81
  2. package/app/404.hbs +20 -0
  3. package/app/README.md +19 -0
  4. package/app/assets/data/view/toolkit/colors.json +17 -0
  5. package/app/assets/data/view/toolkit/components.json +39 -0
  6. package/app/assets/data/view/toolkit/elements.json +119 -0
  7. package/app/assets/data/view/toolkit/grids.json +17 -0
  8. package/app/assets/data/view/toolkit/icons.json +17 -0
  9. package/app/assets/data/view/toolkit/index.json +17 -0
  10. package/app/assets/data/view/toolkit/type.json +17 -0
  11. package/app/assets/font/opensans/stylesheet.css +20 -60
  12. package/app/assets/image/demo/fallback.avif +0 -0
  13. package/app/assets/image/demo/fallback.jpg +0 -0
  14. package/app/assets/image/demo/fallback.webp +0 -0
  15. package/app/assets/image/demo/large.avif +0 -0
  16. package/app/assets/image/demo/large.webp +0 -0
  17. package/app/assets/image/demo/small.avif +0 -0
  18. package/app/assets/image/demo/small.webp +0 -0
  19. package/app/assets/markup/element/a.hbs +29 -0
  20. package/app/assets/markup/element/button.hbs +30 -0
  21. package/app/assets/markup/element/div.hbs +11 -0
  22. package/app/assets/markup/element/head.hbs +78 -0
  23. package/app/assets/markup/element/iframe.hbs +20 -0
  24. package/app/assets/markup/element/img.hbs +30 -0
  25. package/app/assets/markup/element/input.hbs +43 -0
  26. package/app/assets/markup/element/label.hbs +14 -0
  27. package/app/assets/markup/element/legend.hbs +5 -0
  28. package/app/assets/markup/element/meta.hbs +11 -0
  29. package/app/assets/markup/element/nav.hbs +13 -0
  30. package/app/assets/markup/element/p.hbs +8 -0
  31. package/app/assets/markup/element/picture.hbs +58 -0
  32. package/app/assets/markup/element/script.hbs +3 -0
  33. package/app/assets/markup/element/select.hbs +35 -0
  34. package/app/assets/markup/element/span.hbs +8 -0
  35. package/app/assets/markup/element/svg.hbs +11 -0
  36. package/app/assets/markup/element/table.hbs +50 -0
  37. package/app/assets/markup/element/textarea.hbs +24 -0
  38. package/app/assets/markup/element/ul.hbs +13 -0
  39. package/app/assets/markup/modal/modal-example-1.handlebars +8 -0
  40. package/app/assets/markup/toolkit/accessibility-skip-to-element-1.handlebars +1 -0
  41. package/app/assets/markup/toolkit/accessibility-speaker-1.handlebars +1 -0
  42. package/app/assets/markup/toolkit/anchor-1.handlebars +1 -0
  43. package/app/assets/markup/toolkit/button-1.handlebars +1 -0
  44. package/app/assets/markup/toolkit/footer-1.handlebars +3 -0
  45. package/app/assets/markup/toolkit/header-1.handlebars +1 -0
  46. package/app/assets/markup/toolkit/heading-1.handlebars +1 -0
  47. package/app/assets/markup/toolkit/heading-2.handlebars +1 -0
  48. package/app/assets/markup/toolkit/heading-3.handlebars +1 -0
  49. package/app/assets/markup/toolkit/heading-4.handlebars +1 -0
  50. package/app/assets/markup/toolkit/image-1.handlebars +1 -0
  51. package/app/assets/markup/toolkit/input-checkbox-1.handlebars +1 -0
  52. package/app/assets/markup/toolkit/input-error-1.handlebars +8 -0
  53. package/app/assets/markup/toolkit/input-radio-1.handlebars +1 -0
  54. package/app/assets/markup/toolkit/input-text-1.handlebars +1 -0
  55. package/app/assets/markup/toolkit/label-1.handlebars +1 -0
  56. package/app/assets/markup/toolkit/legend-1.handlebars +1 -0
  57. package/app/assets/markup/toolkit/list-1.handlebars +1 -0
  58. package/app/assets/markup/toolkit/modal-1.handlebars +4 -0
  59. package/app/assets/markup/toolkit/nav-1.handlebars +1 -0
  60. package/app/assets/markup/toolkit/picture-1.handlebars +1 -0
  61. package/app/assets/markup/toolkit/select-1.handlebars +1 -0
  62. package/app/assets/markup/toolkit/table-1.handlebars +1 -0
  63. package/app/assets/markup/toolkit/text-1.handlebars +1 -0
  64. package/app/assets/markup/toolkit/textarea-1.handlebars +1 -0
  65. package/app/assets/markup/toolkit/youtube-player-1.handlebars +1 -0
  66. package/app/assets/script/api/facebook.ts +41 -0
  67. package/app/assets/script/api/youtube.ts +22 -0
  68. package/app/assets/script/index.ts +2 -0
  69. package/app/assets/script/mediator/global.ts +4 -0
  70. package/app/assets/script/model/singletons/countries.ts +5 -0
  71. package/app/assets/script/model/singletons/global.ts +5 -0
  72. package/app/assets/script/model/singletons/states.ts +5 -0
  73. package/app/assets/script/model/user.ts +4 -0
  74. package/app/assets/script/toolkit.ts +11 -0
  75. package/app/assets/script/types.d.ts +16 -0
  76. package/app/assets/script/utility/ajax.ts +15 -0
  77. package/app/assets/script/utility/form.ts +119 -0
  78. package/app/assets/script/utility/{regex.js → regex.ts} +15 -6
  79. package/app/assets/script/utility/share.ts +77 -0
  80. package/app/assets/script/utility/string.ts +148 -0
  81. package/app/assets/script/view/default.tsx +14 -0
  82. package/app/assets/script/view/toolkit/youtube-player-1.ts +31 -0
  83. package/app/assets/style/base/_toolkit.scss +31 -15
  84. package/app/assets/style/base/components/_modal-1.scss +80 -0
  85. package/app/assets/style/base/components/_sticky-1.scss +19 -0
  86. package/app/assets/style/base/components/_tabpanel-1.scss +115 -0
  87. package/app/assets/style/base/components/_tabpanel-2.scss +64 -0
  88. package/app/assets/style/base/components/_tabpanel-base-1.scss +13 -0
  89. package/app/assets/style/base/components/_youtube-player-1.scss +16 -0
  90. package/app/assets/style/base/elements/_anchors.scss +12 -0
  91. package/app/assets/style/base/elements/_buttons.scss +15 -0
  92. package/app/assets/style/base/elements/_fieldsets.scss +9 -0
  93. package/app/assets/style/base/elements/_images.scss +6 -2
  94. package/app/assets/style/base/elements/_inputs.scss +70 -0
  95. package/app/assets/style/base/elements/_labels.scss +8 -0
  96. package/app/assets/style/base/elements/_landmarks.scss +3 -0
  97. package/app/assets/style/base/elements/_legends.scss +11 -0
  98. package/app/assets/style/base/elements/_lists.scss +8 -1
  99. package/app/assets/style/base/elements/_tables.scss +32 -1
  100. package/app/assets/style/base/layouts/_staggered-1.scss +29 -0
  101. package/app/assets/style/base/type/_fonts.scss +39 -1
  102. package/app/assets/style/base/type/_headings.scss +29 -0
  103. package/app/assets/style/base/type/_text.scss +2 -0
  104. package/app/assets/style/base/utilities/_accessibility.scss +5 -2
  105. package/app/assets/style/base/utilities/_functions.scss +62 -9
  106. package/app/assets/style/global.scss +108 -10
  107. package/app/assets/style/print.scss +2 -3
  108. package/app/assets/style/toolkit.scss +387 -0
  109. package/app/index.hbs +21 -0
  110. package/app/package.json +1 -0
  111. package/app/toolkit/colors.hbs +102 -0
  112. package/app/toolkit/components.hbs +261 -0
  113. package/app/toolkit/elements.hbs +497 -0
  114. package/app/toolkit/grids.hbs +413 -0
  115. package/app/toolkit/icons.hbs +87 -0
  116. package/app/toolkit/index.hbs +144 -0
  117. package/app/toolkit/type.hbs +120 -0
  118. package/dist/app/assets/data/coutries.json +992 -0
  119. package/dist/app/assets/data/states.json +204 -0
  120. package/dist/app/assets/script/api/facebook.d.ts +8 -0
  121. package/dist/app/assets/script/api/facebook.js +42 -0
  122. package/dist/app/assets/script/api/facebook.js.map +1 -0
  123. package/dist/app/assets/script/api/youtube.d.ts +8 -0
  124. package/dist/app/assets/script/api/youtube.js +22 -0
  125. package/dist/app/assets/script/api/youtube.js.map +1 -0
  126. package/dist/app/assets/script/index.d.ts +2 -0
  127. package/dist/app/assets/script/index.js +2 -0
  128. package/dist/app/assets/script/index.js.map +1 -0
  129. package/dist/app/assets/script/mediator/global.d.ts +4 -0
  130. package/dist/app/assets/script/mediator/global.js +4 -0
  131. package/dist/app/assets/script/mediator/global.js.map +1 -0
  132. package/dist/app/assets/script/model/singletons/countries.d.ts +20 -0
  133. package/dist/app/assets/script/model/singletons/countries.js +5 -0
  134. package/dist/app/assets/script/model/singletons/countries.js.map +1 -0
  135. package/dist/app/assets/script/model/singletons/global.d.ts +20 -0
  136. package/dist/app/assets/script/model/singletons/global.js +5 -0
  137. package/dist/app/assets/script/model/singletons/global.js.map +1 -0
  138. package/dist/app/assets/script/model/singletons/states.d.ts +20 -0
  139. package/dist/app/assets/script/model/singletons/states.js +5 -0
  140. package/dist/app/assets/script/model/singletons/states.js.map +1 -0
  141. package/dist/app/assets/script/model/user.d.ts +4 -0
  142. package/dist/app/assets/script/model/user.js +6 -0
  143. package/dist/app/assets/script/model/user.js.map +1 -0
  144. package/dist/app/assets/script/toolkit.d.ts +1 -0
  145. package/dist/app/assets/script/toolkit.js +7 -0
  146. package/dist/app/assets/script/toolkit.js.map +1 -0
  147. package/dist/app/assets/script/utility/ajax.d.ts +8 -0
  148. package/dist/app/assets/script/utility/ajax.js +17 -0
  149. package/dist/app/assets/script/utility/ajax.js.map +1 -0
  150. package/dist/app/assets/script/utility/form.d.ts +64 -0
  151. package/dist/app/assets/script/utility/form.js +111 -0
  152. package/dist/app/assets/script/utility/form.js.map +1 -0
  153. package/dist/app/assets/script/utility/regex.d.ts +14 -0
  154. package/dist/app/assets/script/utility/regex.js +27 -0
  155. package/dist/app/assets/script/utility/regex.js.map +1 -0
  156. package/dist/app/assets/script/utility/share.d.ts +68 -0
  157. package/dist/app/assets/script/utility/share.js +81 -0
  158. package/dist/app/assets/script/utility/share.js.map +1 -0
  159. package/dist/app/assets/script/utility/string.d.ts +64 -0
  160. package/dist/app/assets/script/utility/string.js +135 -0
  161. package/dist/app/assets/script/utility/string.js.map +1 -0
  162. package/dist/app/assets/script/view/default.d.ts +11 -0
  163. package/dist/app/assets/script/view/default.js +15 -0
  164. package/dist/app/assets/script/view/default.js.map +1 -0
  165. package/dist/app/assets/script/view/toolkit/youtube-player-1.d.ts +23 -0
  166. package/dist/app/assets/script/view/toolkit/youtube-player-1.js +32 -0
  167. package/dist/app/assets/script/view/toolkit/youtube-player-1.js.map +1 -0
  168. package/dist/generators/app/index.d.ts +18 -0
  169. package/dist/generators/app/index.js +59 -0
  170. package/dist/generators/app/index.js.map +1 -0
  171. package/dist/scripts/build.d.ts +22 -0
  172. package/dist/scripts/build.js +158 -0
  173. package/dist/scripts/build.js.map +1 -0
  174. package/generators/app/index.js +2 -43
  175. package/generators/app/index.ts +61 -0
  176. package/package.json +78 -109
  177. package/scripts/build.ts +175 -0
  178. package/tsconfig.site.json +26 -0
  179. package/.babelrc +0 -7
  180. package/.editorconfig +0 -13
  181. package/.eslintrc +0 -64
  182. package/.htmllintrc +0 -6
  183. package/.npmignore +0 -12
  184. package/.sass-lint.yml +0 -16
  185. package/.travis.yml +0 -18
  186. package/app/assets/font/opensans/generator_config.txt +0 -5
  187. package/app/assets/font/opensans/opensans-bold-webfont.eot +0 -0
  188. package/app/assets/font/opensans/opensans-bold-webfont.svg +0 -1824
  189. package/app/assets/font/opensans/opensans-bold-webfont.ttf +0 -0
  190. package/app/assets/font/opensans/opensans-bold-webfont.woff +0 -0
  191. package/app/assets/font/opensans/opensans-bolditalic-webfont.eot +0 -0
  192. package/app/assets/font/opensans/opensans-bolditalic-webfont.svg +0 -1824
  193. package/app/assets/font/opensans/opensans-bolditalic-webfont.ttf +0 -0
  194. package/app/assets/font/opensans/opensans-bolditalic-webfont.woff +0 -0
  195. package/app/assets/font/opensans/opensans-extrabold-webfont.eot +0 -0
  196. package/app/assets/font/opensans/opensans-extrabold-webfont.svg +0 -1824
  197. package/app/assets/font/opensans/opensans-extrabold-webfont.ttf +0 -0
  198. package/app/assets/font/opensans/opensans-extrabold-webfont.woff +0 -0
  199. package/app/assets/font/opensans/opensans-extrabolditalic-webfont.eot +0 -0
  200. package/app/assets/font/opensans/opensans-extrabolditalic-webfont.svg +0 -1824
  201. package/app/assets/font/opensans/opensans-extrabolditalic-webfont.ttf +0 -0
  202. package/app/assets/font/opensans/opensans-extrabolditalic-webfont.woff +0 -0
  203. package/app/assets/font/opensans/opensans-italic-webfont.eot +0 -0
  204. package/app/assets/font/opensans/opensans-italic-webfont.svg +0 -1824
  205. package/app/assets/font/opensans/opensans-italic-webfont.ttf +0 -0
  206. package/app/assets/font/opensans/opensans-italic-webfont.woff +0 -0
  207. package/app/assets/font/opensans/opensans-light-webfont.eot +0 -0
  208. package/app/assets/font/opensans/opensans-light-webfont.svg +0 -1824
  209. package/app/assets/font/opensans/opensans-light-webfont.ttf +0 -0
  210. package/app/assets/font/opensans/opensans-light-webfont.woff +0 -0
  211. package/app/assets/font/opensans/opensans-lightitalic-webfont.eot +0 -0
  212. package/app/assets/font/opensans/opensans-lightitalic-webfont.svg +0 -1824
  213. package/app/assets/font/opensans/opensans-lightitalic-webfont.ttf +0 -0
  214. package/app/assets/font/opensans/opensans-lightitalic-webfont.woff +0 -0
  215. package/app/assets/font/opensans/opensans-regular-webfont.eot +0 -0
  216. package/app/assets/font/opensans/opensans-regular-webfont.svg +0 -1824
  217. package/app/assets/font/opensans/opensans-regular-webfont.ttf +0 -0
  218. package/app/assets/font/opensans/opensans-regular-webfont.woff +0 -0
  219. package/app/assets/font/opensans/opensans-semibold-webfont.eot +0 -0
  220. package/app/assets/font/opensans/opensans-semibold-webfont.svg +0 -1824
  221. package/app/assets/font/opensans/opensans-semibold-webfont.ttf +0 -0
  222. package/app/assets/font/opensans/opensans-semibold-webfont.woff +0 -0
  223. package/app/assets/font/opensans/opensans-semibolditalic-webfont.eot +0 -0
  224. package/app/assets/font/opensans/opensans-semibolditalic-webfont.svg +0 -1824
  225. package/app/assets/font/opensans/opensans-semibolditalic-webfont.ttf +0 -0
  226. package/app/assets/font/opensans/opensans-semibolditalic-webfont.woff +0 -0
  227. package/app/assets/font/opensans/specimen_files/grid_12-825-55-15.css +0 -129
  228. package/app/assets/font/opensans/specimen_files/specimen_stylesheet.css +0 -396
  229. package/app/assets/script/index.js +0 -11
  230. package/app/assets/script/mediator/global.js +0 -5
  231. package/app/assets/script/model/singletons/countries.js +0 -6
  232. package/app/assets/script/model/singletons/global.js +0 -6
  233. package/app/assets/script/model/singletons/states.js +0 -6
  234. package/app/assets/script/model/user.js +0 -5
  235. package/app/assets/script/utility/form.js +0 -86
  236. package/app/assets/script/utility/share.js +0 -52
  237. package/app/assets/script/utility/string.js +0 -70
  238. package/app/assets/script/view/default.js +0 -11
  239. package/app/assets/style/base/vendor/_foundation.scss +0 -2
  240. package/app/assets/test/spec/shareSpec.js +0 -137
  241. package/app/index.html +0 -43
  242. package/app/report/istanbul/base.css +0 -213
  243. package/app/report/istanbul/index.html +0 -93
  244. package/app/report/istanbul/prettify.css +0 -1
  245. package/app/report/istanbul/prettify.js +0 -1
  246. package/app/report/istanbul/sort-arrow-sprite.png +0 -0
  247. package/app/report/istanbul/sorter.js +0 -158
  248. package/app/report/istanbul/utility/form.js.html +0 -524
  249. package/app/report/istanbul/utility/index.html +0 -132
  250. package/app/report/istanbul/utility/regex.js.html +0 -203
  251. package/app/report/istanbul/utility/share.js.html +0 -401
  252. package/app/report/istanbul/utility/string.js.html +0 -446
  253. package/app/report/jsdoc/DragEvent.html +0 -303
  254. package/app/report/jsdoc/Event.html +0 -773
  255. package/app/report/jsdoc/EventPropagators.html +0 -336
  256. package/app/report/jsdoc/FocusEvent.html +0 -303
  257. package/app/report/jsdoc/ForEachBookKeeping.html +0 -425
  258. package/app/report/jsdoc/KeyboardEvent.html +0 -303
  259. package/app/report/jsdoc/MapBookKeeping.html +0 -457
  260. package/app/report/jsdoc/MouseEvent.html +0 -303
  261. package/app/report/jsdoc/ReactClass.html +0 -330
  262. package/app/report/jsdoc/ReactClassInterface.html +0 -311
  263. package/app/report/jsdoc/ReactDOMComponent.html +0 -349
  264. package/app/report/jsdoc/ReactDOMTextComponent.html +0 -348
  265. package/app/report/jsdoc/ReactMountReady.html +0 -340
  266. package/app/report/jsdoc/ReactMultiChild.html +0 -330
  267. package/app/report/jsdoc/ReactOwner.html +0 -351
  268. package/app/report/jsdoc/ReactReconcileTransaction.html +0 -342
  269. package/app/report/jsdoc/ReactServerRenderingTransaction.html +0 -376
  270. package/app/report/jsdoc/ReactServerUpdateQueue.html +0 -382
  271. package/app/report/jsdoc/TouchEvent.html +0 -303
  272. package/app/report/jsdoc/Transaction.html +0 -459
  273. package/app/report/jsdoc/UIEvent.html +0 -303
  274. package/app/report/jsdoc/WheelEvent.html +0 -303
  275. package/app/report/jsdoc/classes.list.html +0 -339
  276. package/app/report/jsdoc/fonts/glyphicons-halflings-regular.eot +0 -0
  277. package/app/report/jsdoc/fonts/glyphicons-halflings-regular.svg +0 -288
  278. package/app/report/jsdoc/fonts/glyphicons-halflings-regular.ttf +0 -0
  279. package/app/report/jsdoc/fonts/glyphicons-halflings-regular.woff +0 -0
  280. package/app/report/jsdoc/fonts/glyphicons-halflings-regular.woff2 +0 -0
  281. package/app/report/jsdoc/global.html +0 -1653
  282. package/app/report/jsdoc/img/glyphicons-halflings-white.png +0 -0
  283. package/app/report/jsdoc/img/glyphicons-halflings.png +0 -0
  284. package/app/report/jsdoc/index.html +0 -236
  285. package/app/report/jsdoc/interfaces.list.html +0 -339
  286. package/app/report/jsdoc/quicksearch.html +0 -31
  287. package/app/report/jsdoc/scripts/docstrap.lib.js +0 -11
  288. package/app/report/jsdoc/scripts/fulltext-search-ui.js +0 -89
  289. package/app/report/jsdoc/scripts/fulltext-search.js +0 -36
  290. package/app/report/jsdoc/scripts/lunr.min.js +0 -6
  291. package/app/report/jsdoc/scripts/prettify/Apache-License-2.0.txt +0 -202
  292. package/app/report/jsdoc/scripts/prettify/jquery.min.js +0 -6
  293. package/app/report/jsdoc/scripts/prettify/lang-css.js +0 -21
  294. package/app/report/jsdoc/scripts/prettify/prettify.js +0 -496
  295. package/app/report/jsdoc/scripts/sunlight.js +0 -1157
  296. package/app/report/jsdoc/scripts/toc.js +0 -203
  297. package/app/report/jsdoc/styles/darkstrap.css +0 -960
  298. package/app/report/jsdoc/styles/prettify-tomorrow.css +0 -132
  299. package/app/report/jsdoc/styles/site.cerulean.css +0 -7008
  300. package/app/report/jsdoc/styles/site.cosmo.css +0 -7061
  301. package/app/report/jsdoc/styles/site.cyborg.css +0 -7048
  302. package/app/report/jsdoc/styles/site.darkly.css +0 -7171
  303. package/app/report/jsdoc/styles/site.darkstrap.css +0 -5638
  304. package/app/report/jsdoc/styles/site.dibs-bootstrap.css +0 -5899
  305. package/app/report/jsdoc/styles/site.flatly.css +0 -7147
  306. package/app/report/jsdoc/styles/site.journal.css +0 -6973
  307. package/app/report/jsdoc/styles/site.lumen.css +0 -7298
  308. package/app/report/jsdoc/styles/site.paper.css +0 -7623
  309. package/app/report/jsdoc/styles/site.readable.css +0 -6997
  310. package/app/report/jsdoc/styles/site.sandstone.css +0 -7035
  311. package/app/report/jsdoc/styles/site.simplex.css +0 -7023
  312. package/app/report/jsdoc/styles/site.slate.css +0 -7343
  313. package/app/report/jsdoc/styles/site.spacelab.css +0 -7055
  314. package/app/report/jsdoc/styles/site.superhero.css +0 -7131
  315. package/app/report/jsdoc/styles/site.united.css +0 -6895
  316. package/app/report/jsdoc/styles/site.yeti.css +0 -7195
  317. package/app/report/jsdoc/styles/sunlight.dark.css +0 -345
  318. package/app/report/jsdoc/styles/sunlight.default.css +0 -344
  319. package/gulp/config.js +0 -207
  320. package/gulp/tasks/accessibility.js +0 -34
  321. package/gulp/tasks/build.js +0 -18
  322. package/gulp/tasks/clean.js +0 -18
  323. package/gulp/tasks/data.js +0 -22
  324. package/gulp/tasks/default.js +0 -9
  325. package/gulp/tasks/deploy.js +0 -222
  326. package/gulp/tasks/documentation.js +0 -28
  327. package/gulp/tasks/markup.js +0 -26
  328. package/gulp/tasks/script.js +0 -92
  329. package/gulp/tasks/style.js +0 -42
  330. package/gulp/tasks/unit.js +0 -38
  331. package/gulp/tasks/watch.js +0 -77
  332. package/gulpfile.js +0 -8
  333. package/jsdoc.json +0 -23
  334. package/karma.conf.js +0 -58
@@ -0,0 +1,18 @@
1
+ import Generator from 'yeoman-generator';
2
+ export default class extends Generator {
3
+ /**
4
+ * Describe the scaffold operation through Yeoman's output adapter.
5
+ * @returns No value.
6
+ */
7
+ prompting(): void;
8
+ /**
9
+ * Copy the site sources and write a strict TypeScript build manifest into the destination.
10
+ * @returns No value; Yeoman stages the generated files.
11
+ */
12
+ writing(): void;
13
+ /**
14
+ * Explain the dependency-install step after Yeoman commits the scaffold.
15
+ * @returns No value.
16
+ */
17
+ end(): void;
18
+ }
@@ -0,0 +1,59 @@
1
+ /** @module generators/app/index */
2
+ import path from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../..');
5
+ import Generator from 'yeoman-generator';
6
+ import chalk from 'chalk';
7
+ import yosay from 'yosay';
8
+ export default class extends Generator {
9
+ /**
10
+ * Describe the scaffold operation through Yeoman's output adapter.
11
+ * @returns No value.
12
+ */
13
+ prompting() {
14
+ this.log(yosay(`Setting up the ${chalk.red('white-label')} project.`));
15
+ }
16
+ /**
17
+ * Copy the site sources and write a strict TypeScript build manifest into the destination.
18
+ * @returns No value; Yeoman stages the generated files.
19
+ */
20
+ writing() {
21
+ this.fs.copy(path.join(root, 'app'), this.destinationPath('app'));
22
+ this.fs.copy(path.join(root, 'app/README.md'), this.destinationPath('README.md'));
23
+ this.fs.copy(path.join(root, 'scripts'), this.destinationPath('scripts'));
24
+ this.fs.copy(path.join(root, 'tsconfig.site.json'), this.destinationPath('tsconfig.json'));
25
+ this.fs.writeJSON(this.destinationPath('package.json'), {
26
+ name: 'white-label-site',
27
+ version: '1.0.0',
28
+ private: true,
29
+ type: 'module',
30
+ engines: { node: '>=20.0', npm: '>=10.0' },
31
+ scripts: {
32
+ build: 'tsc -p tsconfig.json && node dist/scripts/build.js',
33
+ typecheck: 'tsc -p tsconfig.json --noEmit',
34
+ test: 'npm run build',
35
+ audit: 'npm audit --audit-level=low'
36
+ },
37
+ devDependencies: { typescript: '7.0.2', '@types/node': '24.13.3', '@types/react': '^19.0.0' },
38
+ dependencies: {
39
+ esbuild: '0.28.2',
40
+ events: '3.3.0',
41
+ 'bootstrap': '5.3.8',
42
+ handlebars: '4.7.9',
43
+ react: '19.2.8',
44
+ 'react-dom': '19.2.8',
45
+ sass: '1.104.0',
46
+ 'white-label-model': '1.0.37',
47
+ 'white-label-view': '2.0.3'
48
+ }
49
+ });
50
+ }
51
+ /**
52
+ * Explain the dependency-install step after Yeoman commits the scaffold.
53
+ * @returns No value.
54
+ */
55
+ end() {
56
+ this.log('Project created. Review package.json, then run npm install.');
57
+ }
58
+ }
59
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../generators/app/index.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AACvC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;AACpF,OAAO,SAAS,MAAM,kBAAkB,CAAC;AACzC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,OAAO,MAAO,SAAQ,SAAS;IAClC;;;OAGG;IACH,SAAS;QACL,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,kBAAkB,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC;IAC3E,CAAC;IAED;;;OAGG;IACH,OAAO;QACH,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;QAClE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC;QAClF,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC;QAC1E,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,oBAAoB,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC,CAAC;QAC3F,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,EAAE;YACpD,IAAI,EAAE,kBAAkB;YACxB,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAC;YACxC,OAAO,EAAE;gBACL,KAAK,EAAE,oDAAoD;gBAC3D,SAAS,EAAE,+BAA+B;gBAC1C,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,6BAA6B;aACvC;YACD,eAAe,EAAE,EAAC,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAC;YAC3F,YAAY,EAAE;gBACV,OAAO,EAAE,QAAQ;gBACjB,MAAM,EAAE,OAAO;gBACf,WAAW,EAAE,OAAO;gBACpB,UAAU,EAAE,OAAO;gBACnB,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,SAAS;gBACf,mBAAmB,EAAE,QAAQ;gBAC7B,kBAAkB,EAAE,OAAO;aAC9B;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;;OAGG;IACH,GAAG;QACC,IAAI,CAAC,GAAG,CAAC,6DAA6D,CAAC,CAAC;IAC5E,CAAC;CACJ","sourcesContent":["/** @module generators/app/index */\nimport path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nconst root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../..');\nimport Generator from 'yeoman-generator';\nimport chalk from 'chalk';\nimport yosay from 'yosay';\n\nexport default class extends Generator {\n /**\n * Describe the scaffold operation through Yeoman's output adapter.\n * @returns No value.\n */\n prompting() {\n this.log(yosay(`Setting up the ${chalk.red('white-label')} project.`));\n }\n\n /**\n * Copy the site sources and write a strict TypeScript build manifest into the destination.\n * @returns No value; Yeoman stages the generated files.\n */\n writing() {\n this.fs.copy(path.join(root, 'app'), this.destinationPath('app'));\n this.fs.copy(path.join(root, 'app/README.md'), this.destinationPath('README.md'));\n this.fs.copy(path.join(root, 'scripts'), this.destinationPath('scripts'));\n this.fs.copy(path.join(root, 'tsconfig.site.json'), this.destinationPath('tsconfig.json'));\n this.fs.writeJSON(this.destinationPath('package.json'), {\n name: 'white-label-site',\n version: '1.0.0',\n private: true,\n type: 'module',\n engines: {node: '>=20.0', npm: '>=10.0'},\n scripts: {\n build: 'tsc -p tsconfig.json && node dist/scripts/build.js',\n typecheck: 'tsc -p tsconfig.json --noEmit',\n test: 'npm run build',\n audit: 'npm audit --audit-level=low'\n },\n devDependencies: {typescript: '7.0.2', '@types/node': '24.13.3', '@types/react': '^19.0.0'},\n dependencies: {\n esbuild: '0.28.2',\n events: '3.3.0',\n 'bootstrap': '5.3.8',\n handlebars: '4.7.9',\n react: '19.2.8',\n 'react-dom': '19.2.8',\n sass: '1.104.0',\n 'white-label-model': '1.0.37',\n 'white-label-view': '2.0.3'\n }\n });\n }\n\n /**\n * Explain the dependency-install step after Yeoman commits the scaffold.\n * @returns No value.\n */\n end() {\n this.log('Project created. Review package.json, then run npm install.');\n }\n}\n"]}
@@ -0,0 +1,22 @@
1
+ /** Values injected into page templates and the generated config file. */
2
+ export interface BuildConfig {
3
+ cdn: string;
4
+ production: boolean;
5
+ service: string;
6
+ version: string;
7
+ www: string;
8
+ }
9
+ /**
10
+ * Read deployment flags and reject version strings that contain path separators.
11
+ * @param argumentsList - Command-line arguments excluding the Node executable and script.
12
+ * @returns Deployment configuration with defaults for omitted flags.
13
+ * @throws When input does not satisfy the documented contract.
14
+ */
15
+ export declare function parseArguments(argumentsList: string[]): BuildConfig;
16
+ /**
17
+ * Replace the project deployment directory with compiled pages, scripts, styles, and static assets.
18
+ * @param config - Validated deployment or database configuration.
19
+ * @param projectRoot - Project containing app sources and installed dependencies.
20
+ * @returns A promise resolving after the deployment directory has been rebuilt.
21
+ */
22
+ export declare function build(config?: BuildConfig, projectRoot?: string): Promise<void>;
@@ -0,0 +1,158 @@
1
+ import fs from 'node:fs/promises';
2
+ import path from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ import { build as buildJavaScript } from 'esbuild';
5
+ import Handlebars from 'handlebars';
6
+ import * as sass from 'sass';
7
+ const defaultProjectRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..');
8
+ /**
9
+ * Read deployment flags and reject version strings that contain path separators.
10
+ * @param argumentsList - Command-line arguments excluding the Node executable and script.
11
+ * @returns Deployment configuration with defaults for omitted flags.
12
+ * @throws When input does not satisfy the documented contract.
13
+ */
14
+ export function parseArguments(argumentsList) {
15
+ const values = Object.fromEntries(argumentsList.map((argument) => {
16
+ const [key, ...value] = argument.replace(/^--/, '').split('=');
17
+ return [key, value.join('=')];
18
+ }));
19
+ const version = values.version || String(Math.floor(Date.now() / 1000));
20
+ if (!/^[A-Za-z0-9._-]+$/.test(version)) {
21
+ throw new Error('Version may contain only letters, numbers, dots, underscores, and hyphens');
22
+ }
23
+ return {
24
+ cdn: values.cdn || '/',
25
+ production: values.production === 'true',
26
+ service: values.service || '/service-endpoint',
27
+ version,
28
+ www: values.www || '/'
29
+ };
30
+ }
31
+ /**
32
+ * Recursively collect files below a directory, propagating filesystem failures.
33
+ * @param directory - Directory to traverse recursively.
34
+ * @returns A promise resolving to all descendant file paths.
35
+ */
36
+ async function filesUnder(directory) {
37
+ const entries = await fs.readdir(directory, { withFileTypes: true });
38
+ const files = await Promise.all(entries.map(async (entry) => {
39
+ const location = path.join(directory, entry.name);
40
+ return entry.isDirectory() ? filesUnder(location) : [location];
41
+ }));
42
+ return files.flat();
43
+ }
44
+ /**
45
+ * Register partials and render pages using global, page-specific, and deployment data.
46
+ * @param config - Validated deployment or database configuration.
47
+ * @param outputRoot - Destination for rendered pages.
48
+ * @param projectRoot - Project containing app sources and installed dependencies.
49
+ * @returns A promise resolving after all pages have been written.
50
+ */
51
+ async function renderMarkup(config, outputRoot, projectRoot) {
52
+ const markupRoot = path.join(projectRoot, 'app/assets/markup');
53
+ for (const partialPath of await filesUnder(markupRoot)) {
54
+ if (/\.(hbs|handlebars)$/.test(partialPath)) {
55
+ const name = path.relative(markupRoot, partialPath).replace(/\\/g, '/').replace(/\.(hbs|handlebars)$/, '');
56
+ Handlebars.registerPartial(name, await fs.readFile(partialPath, 'utf8'));
57
+ }
58
+ }
59
+ const globalData = JSON.parse(await fs.readFile(path.join(projectRoot, 'app/assets/data/view/global.json'), 'utf8'));
60
+ const pages = (await filesUnder(path.join(projectRoot, 'app')))
61
+ .filter((file) => file.endsWith('.hbs') && !file.includes(`${path.sep}assets${path.sep}`));
62
+ await Promise.all(pages.map(async (page) => {
63
+ const relative = path.relative(path.join(projectRoot, 'app'), page);
64
+ const pageDataPath = path.join(projectRoot, 'app/assets/data/view', relative.replace(/\.hbs$/, '.json'));
65
+ let pageData = {};
66
+ try {
67
+ pageData = JSON.parse(await fs.readFile(pageDataPath, 'utf8'));
68
+ }
69
+ catch (error) {
70
+ if (!(error instanceof Error && 'code' in error && error.code === 'ENOENT')) {
71
+ throw error;
72
+ }
73
+ }
74
+ const template = Handlebars.compile(await fs.readFile(page, 'utf8'));
75
+ const destination = path.join(outputRoot, relative.replace(/\.hbs$/, '.html'));
76
+ await fs.mkdir(path.dirname(destination), { recursive: true });
77
+ await fs.writeFile(destination, template({ ...globalData, ...pageData, ...config }));
78
+ }));
79
+ }
80
+ /**
81
+ * Compile project Sass and include the full published Bootstrap stylesheet.
82
+ * @param outputAssets - Destination for compiled asset directories.
83
+ * @param production - Enable compressed output and omit development source maps.
84
+ * @param projectRoot - Project containing app sources and installed dependencies.
85
+ * @returns A promise resolving after all stylesheets have been written.
86
+ */
87
+ async function compileStyles(outputAssets, production, projectRoot) {
88
+ const styleRoot = path.join(projectRoot, 'app/assets/style');
89
+ await Promise.all(['global', 'print', 'toolkit'].map(async (name) => {
90
+ const result = sass.compile(path.join(styleRoot, `${name}.scss`), {
91
+ loadPaths: [path.join(projectRoot, 'node_modules')],
92
+ style: production ? 'compressed' : 'expanded'
93
+ });
94
+ const destination = path.join(outputAssets, 'style', `${name}.css`);
95
+ await fs.mkdir(path.dirname(destination), { recursive: true });
96
+ // Bootstrap publishes compiled CSS, so consuming it avoids recompiling third-party
97
+ // Sass and keeps dependency deprecation warnings out of project builds.
98
+ const bootstrapSource = name === 'global'
99
+ ? (await fs.readFile(path.join(projectRoot, 'node_modules/bootstrap/dist/css/bootstrap.css'), 'utf8')).replace(/\/\*# sourceMappingURL=bootstrap\.css\.map \*\//, '')
100
+ : '';
101
+ const bootstrapCss = production && bootstrapSource
102
+ ? sass.compileString(bootstrapSource, { style: 'compressed', syntax: 'css' }).css
103
+ : bootstrapSource;
104
+ await fs.writeFile(destination, `${bootstrapCss}${bootstrapCss ? '\n' : ''}${result.css}`);
105
+ }));
106
+ }
107
+ /**
108
+ * Bundle TypeScript entry points for browsers, excluding declaration-only files.
109
+ * @param outputAssets - Destination for compiled asset directories.
110
+ * @param production - Enable compressed output and omit development source maps.
111
+ * @param projectRoot - Project containing app sources and installed dependencies.
112
+ * @returns A promise resolving after all script bundles have been written.
113
+ */
114
+ async function compileScripts(outputAssets, production, projectRoot) {
115
+ const scriptRoot = path.join(projectRoot, 'app/assets/script');
116
+ const entries = (await fs.readdir(scriptRoot, { withFileTypes: true }))
117
+ .filter((entry) => entry.isFile() && !entry.name.endsWith('.d.ts') && /\.tsx?$/.test(entry.name))
118
+ .map((entry) => path.join(scriptRoot, entry.name));
119
+ await fs.mkdir(path.join(outputAssets, 'script'), { recursive: true });
120
+ await buildJavaScript({
121
+ bundle: true,
122
+ entryNames: '[name].compiled',
123
+ entryPoints: entries,
124
+ format: 'iife',
125
+ loader: { '.ts': 'ts', '.tsx': 'tsx' },
126
+ minify: production,
127
+ outdir: path.join(outputAssets, 'script'),
128
+ sourcemap: !production,
129
+ target: ['es2018']
130
+ });
131
+ await fs.writeFile(path.join(outputAssets, 'script/global.compiled.js'), '');
132
+ }
133
+ /**
134
+ * Replace the project deployment directory with compiled pages, scripts, styles, and static assets.
135
+ * @param config - Validated deployment or database configuration.
136
+ * @param projectRoot - Project containing app sources and installed dependencies.
137
+ * @returns A promise resolving after the deployment directory has been rebuilt.
138
+ */
139
+ export async function build(config = parseArguments(process.argv.slice(2)), projectRoot = defaultProjectRoot) {
140
+ const outputRoot = path.join(projectRoot, '_deploy');
141
+ const outputAssets = path.join(outputRoot, 'release', config.version, 'assets');
142
+ await fs.rm(outputRoot, { recursive: true, force: true });
143
+ await fs.mkdir(outputAssets, { recursive: true });
144
+ await Promise.all([
145
+ fs.cp(path.join(projectRoot, 'app/assets/data'), path.join(outputAssets, 'data'), { recursive: true }),
146
+ fs.cp(path.join(projectRoot, 'app/assets/font'), path.join(outputAssets, 'font'), { recursive: true }),
147
+ fs.cp(path.join(projectRoot, 'app/assets/image'), path.join(outputAssets, 'image'), { recursive: true })
148
+ ]);
149
+ await fs.writeFile(path.join(outputAssets, 'data/config.json'), JSON.stringify(config));
150
+ await renderMarkup(config, outputRoot, projectRoot);
151
+ await compileStyles(outputAssets, config.production, projectRoot);
152
+ await compileScripts(outputAssets, config.production, projectRoot);
153
+ await fs.copyFile(path.join(projectRoot, 'app/robots.txt'), path.join(outputRoot, 'robots.txt'));
154
+ }
155
+ if (path.resolve(process.argv[1] || '') === fileURLToPath(import.meta.url)) {
156
+ await build();
157
+ }
158
+ //# sourceMappingURL=build.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.js","sourceRoot":"","sources":["../../scripts/build.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AACvC,OAAO,EAAC,KAAK,IAAI,eAAe,EAAC,MAAM,SAAS,CAAC;AACjD,OAAO,UAA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dn: string; production: boolean; service: string; version: string; www: string}\nimport fs from 'node:fs/promises';\nimport path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport {build as buildJavaScript} from 'esbuild';\nimport Handlebars from 'handlebars';\nimport * as sass from 'sass';\n\nconst defaultProjectRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..');\n\n/**\n * Read deployment flags and reject version strings that contain path separators.\n * @param argumentsList - Command-line arguments excluding the Node executable and script.\n * @returns Deployment configuration with defaults for omitted flags.\n * @throws When input does not satisfy the documented contract.\n */\nexport function parseArguments(argumentsList: string[]): BuildConfig {\n const values = Object.fromEntries(argumentsList.map((argument) => {\n const [key, ...value] = argument.replace(/^--/, '').split('=');\n return [key, value.join('=')];\n }));\n const version = values.version || String(Math.floor(Date.now() / 1000));\n if (!/^[A-Za-z0-9._-]+$/.test(version)) {\n throw new Error('Version may contain only letters, numbers, dots, underscores, and hyphens');\n }\n return {\n cdn: values.cdn || '/',\n production: values.production === 'true',\n service: values.service || '/service-endpoint',\n version,\n www: values.www || '/'\n };\n}\n\n/**\n * Recursively collect files below a directory, propagating filesystem failures.\n * @param directory - Directory to traverse recursively.\n * @returns A promise resolving to all descendant file paths.\n */\nasync function filesUnder(directory: string): Promise<string[]> {\n const entries = await fs.readdir(directory, {withFileTypes: true});\n const files = await Promise.all(entries.map(async (entry) => {\n const location = path.join(directory, entry.name);\n return entry.isDirectory() ? filesUnder(location) : [location];\n }));\n return files.flat();\n}\n\n/**\n * Register partials and render pages using global, page-specific, and deployment data.\n * @param config - Validated deployment or database configuration.\n * @param outputRoot - Destination for rendered pages.\n * @param projectRoot - Project containing app sources and installed dependencies.\n * @returns A promise resolving after all pages have been written.\n */\nasync function renderMarkup(config: BuildConfig, outputRoot: string, projectRoot: string) {\n const markupRoot = path.join(projectRoot, 'app/assets/markup');\n for (const partialPath of await filesUnder(markupRoot)) {\n if (/\\.(hbs|handlebars)$/.test(partialPath)) {\n const name = path.relative(markupRoot, partialPath).replace(/\\\\/g, '/').replace(/\\.(hbs|handlebars)$/, '');\n Handlebars.registerPartial(name, await fs.readFile(partialPath, 'utf8'));\n }\n }\n\n const globalData = JSON.parse(await fs.readFile(\n path.join(projectRoot, 'app/assets/data/view/global.json'), 'utf8'\n ));\n const pages = (await filesUnder(path.join(projectRoot, 'app')))\n .filter((file) => file.endsWith('.hbs') && !file.includes(`${path.sep}assets${path.sep}`));\n\n await Promise.all(pages.map(async (page) => {\n const relative = path.relative(path.join(projectRoot, 'app'), page);\n const pageDataPath = path.join(\n projectRoot, 'app/assets/data/view', relative.replace(/\\.hbs$/, '.json')\n );\n let pageData = {};\n try {\n pageData = JSON.parse(await fs.readFile(pageDataPath, 'utf8'));\n } catch (error) {\n if (!(error instanceof Error && 'code' in error && error.code === 'ENOENT')) {\n throw error;\n }\n }\n const template = Handlebars.compile(await fs.readFile(page, 'utf8'));\n const destination = path.join(outputRoot, relative.replace(/\\.hbs$/, '.html'));\n await fs.mkdir(path.dirname(destination), {recursive: true});\n await fs.writeFile(destination, template({...globalData, ...pageData, ...config}));\n }));\n}\n\n/**\n * Compile project Sass and include the full published Bootstrap stylesheet.\n * @param outputAssets - Destination for compiled asset directories.\n * @param production - Enable compressed output and omit development source maps.\n * @param projectRoot - Project containing app sources and installed dependencies.\n * @returns A promise resolving after all stylesheets have been written.\n */\nasync function compileStyles(outputAssets: string, production: boolean, projectRoot: string) {\n const styleRoot = path.join(projectRoot, 'app/assets/style');\n await Promise.all(['global', 'print', 'toolkit'].map(async (name) => {\n const result = sass.compile(path.join(styleRoot, `${name}.scss`), {\n loadPaths: [path.join(projectRoot, 'node_modules')],\n style: production ? 'compressed' : 'expanded'\n });\n const destination = path.join(outputAssets, 'style', `${name}.css`);\n await fs.mkdir(path.dirname(destination), {recursive: true});\n // Bootstrap publishes compiled CSS, so consuming it avoids recompiling third-party\n // Sass and keeps dependency deprecation warnings out of project builds.\n const bootstrapSource = name === 'global'\n ? (await fs.readFile(\n path.join(projectRoot, 'node_modules/bootstrap/dist/css/bootstrap.css'), 'utf8'\n )).replace(/\\/\\*# sourceMappingURL=bootstrap\\.css\\.map \\*\\//, '')\n : '';\n const bootstrapCss = production && bootstrapSource\n ? sass.compileString(bootstrapSource, {style: 'compressed', syntax: 'css'}).css\n : bootstrapSource;\n await fs.writeFile(destination, `${bootstrapCss}${bootstrapCss ? '\\n' : ''}${result.css}`);\n }));\n}\n\n/**\n * Bundle TypeScript entry points for browsers, excluding declaration-only files.\n * @param outputAssets - Destination for compiled asset directories.\n * @param production - Enable compressed output and omit development source maps.\n * @param projectRoot - Project containing app sources and installed dependencies.\n * @returns A promise resolving after all script bundles have been written.\n */\nasync function compileScripts(outputAssets: string, production: boolean, projectRoot: string) {\n const scriptRoot = path.join(projectRoot, 'app/assets/script');\n const entries = (await fs.readdir(scriptRoot, {withFileTypes: true}))\n .filter((entry) => entry.isFile() && !entry.name.endsWith('.d.ts') && /\\.tsx?$/.test(entry.name))\n .map((entry) => path.join(scriptRoot, entry.name));\n await fs.mkdir(path.join(outputAssets, 'script'), {recursive: true});\n await buildJavaScript({\n bundle: true,\n entryNames: '[name].compiled',\n entryPoints: entries,\n format: 'iife',\n loader: {'.ts': 'ts', '.tsx': 'tsx'},\n minify: production,\n outdir: path.join(outputAssets, 'script'),\n sourcemap: !production,\n target: ['es2018']\n });\n await fs.writeFile(path.join(outputAssets, 'script/global.compiled.js'), '');\n}\n\n/**\n * Replace the project deployment directory with compiled pages, scripts, styles, and static assets.\n * @param config - Validated deployment or database configuration.\n * @param projectRoot - Project containing app sources and installed dependencies.\n * @returns A promise resolving after the deployment directory has been rebuilt.\n */\nexport async function build(config = parseArguments(process.argv.slice(2)), projectRoot = defaultProjectRoot) {\n const outputRoot = path.join(projectRoot, '_deploy');\n const outputAssets = path.join(outputRoot, 'release', config.version, 'assets');\n await fs.rm(outputRoot, {recursive: true, force: true});\n await fs.mkdir(outputAssets, {recursive: true});\n\n await Promise.all([\n fs.cp(path.join(projectRoot, 'app/assets/data'), path.join(outputAssets, 'data'), {recursive: true}),\n fs.cp(path.join(projectRoot, 'app/assets/font'), path.join(outputAssets, 'font'), {recursive: true}),\n fs.cp(path.join(projectRoot, 'app/assets/image'), path.join(outputAssets, 'image'), {recursive: true})\n ]);\n await fs.writeFile(path.join(outputAssets, 'data/config.json'), JSON.stringify(config));\n await renderMarkup(config, outputRoot, projectRoot);\n await compileStyles(outputAssets, config.production, projectRoot);\n await compileScripts(outputAssets, config.production, projectRoot);\n await fs.copyFile(path.join(projectRoot, 'app/robots.txt'), path.join(outputRoot, 'robots.txt'));\n}\n\nif (path.resolve(process.argv[1] || '') === fileURLToPath(import.meta.url)) {\n await build();\n}\n"]}
@@ -1,43 +1,2 @@
1
- 'use strict';
2
-
3
- // ## Load Modules
4
- const Generator = require('yeoman-generator');
5
- const chalk = require('chalk');
6
- const yosay = require('yosay');
7
-
8
- // ## Setup
9
- module.exports = class extends Generator {
10
- prompting() {
11
- this.log(yosay(
12
- 'Setting up ' + chalk.red('generator-shackstack') + ' generator.'
13
- ));
14
- }
15
- writing() {
16
- //copy over the site files
17
- this.fs.copy(
18
- this.templatePath('../../../app/**'),
19
- this.destinationPath('./app')
20
- );
21
- //copy over the tasks
22
- this.fs.copy(
23
- this.templatePath('../../../gulp/**'),
24
- this.destinationPath('./gulp')
25
- );
26
- //copy over the root files
27
- this.fs.copy(
28
- this.templatePath('../../../*.*'),
29
- this.destinationPath('./')
30
- );
31
- //copy over hidden files
32
- this.fs.copy(
33
- this.templatePath('../../../.*'),
34
- this.destinationPath('./')
35
- );
36
- }
37
- install() {
38
- this.installDependencies({
39
- bower: false,
40
- npm: true
41
- });
42
- }
43
- };
1
+ /** Yeoman's conventional discovery entry; implementation and declarations are compiled from TypeScript. */
2
+ export {default} from '../../dist/generators/app/index.js';
@@ -0,0 +1,61 @@
1
+ /** @module generators/app/index */
2
+ import path from 'node:path';
3
+ import {fileURLToPath} from 'node:url';
4
+ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../..');
5
+ import Generator from 'yeoman-generator';
6
+ import chalk from 'chalk';
7
+ import yosay from 'yosay';
8
+
9
+ export default class extends Generator {
10
+ /**
11
+ * Describe the scaffold operation through Yeoman's output adapter.
12
+ * @returns No value.
13
+ */
14
+ prompting() {
15
+ this.log(yosay(`Setting up the ${chalk.red('white-label')} project.`));
16
+ }
17
+
18
+ /**
19
+ * Copy the site sources and write a strict TypeScript build manifest into the destination.
20
+ * @returns No value; Yeoman stages the generated files.
21
+ */
22
+ writing() {
23
+ this.fs.copy(path.join(root, 'app'), this.destinationPath('app'));
24
+ this.fs.copy(path.join(root, 'app/README.md'), this.destinationPath('README.md'));
25
+ this.fs.copy(path.join(root, 'scripts'), this.destinationPath('scripts'));
26
+ this.fs.copy(path.join(root, 'tsconfig.site.json'), this.destinationPath('tsconfig.json'));
27
+ this.fs.writeJSON(this.destinationPath('package.json'), {
28
+ name: 'white-label-site',
29
+ version: '1.0.0',
30
+ private: true,
31
+ type: 'module',
32
+ engines: {node: '>=20.0', npm: '>=10.0'},
33
+ scripts: {
34
+ build: 'tsc -p tsconfig.json && node dist/scripts/build.js',
35
+ typecheck: 'tsc -p tsconfig.json --noEmit',
36
+ test: 'npm run build',
37
+ audit: 'npm audit --audit-level=low'
38
+ },
39
+ devDependencies: {typescript: '7.0.2', '@types/node': '24.13.3', '@types/react': '^19.0.0'},
40
+ dependencies: {
41
+ esbuild: '0.28.2',
42
+ events: '3.3.0',
43
+ 'bootstrap': '5.3.8',
44
+ handlebars: '4.7.9',
45
+ react: '19.2.8',
46
+ 'react-dom': '19.2.8',
47
+ sass: '1.104.0',
48
+ 'white-label-model': '1.0.37',
49
+ 'white-label-view': '2.0.3'
50
+ }
51
+ });
52
+ }
53
+
54
+ /**
55
+ * Explain the dependency-install step after Yeoman commits the scaffold.
56
+ * @returns No value.
57
+ */
58
+ end() {
59
+ this.log('Project created. Review package.json, then run npm install.');
60
+ }
61
+ }
package/package.json CHANGED
@@ -1,39 +1,39 @@
1
1
  {
2
2
  "name": "generator-white-label",
3
- "homepage": "https://github.com/bshack/white-label",
4
- "version": "3.0.0",
5
- "contributors": [
6
- {
7
- "name": "Bill Shackelford",
8
- "email": "bshackelford@gmail.com",
9
- "url": "https://github.com/bshack"
10
- }
11
- ],
3
+ "version": "5.0.0",
4
+ "description": "Scaffolding for developing and building static sites.",
5
+ "type": "module",
6
+ "main": "dist/generators/app/index.js",
12
7
  "engines": {
13
- "node": ">=4.0",
14
- "npm": ">=2.0"
8
+ "node": ">=20.0",
9
+ "npm": ">=10.0"
15
10
  },
16
- "description": "Scaffolding for developing and deploying sites.",
17
- "main": "app/index.html",
18
- "keywords": [
19
- "browserify",
20
- "gulp",
21
- "jasmine",
22
- "karma",
23
- "yeoman-generator",
24
- "shackstack",
25
- "es6",
26
- "es2015",
27
- "handelbars"
28
- ],
29
11
  "scripts": {
30
- "test": "gulp deploy --www=//www.example.com --cdn=//cdn.example.com --service=//service.example.com --version=123456789 --production=true;"
31
- },
32
- "author": {
33
- "name": "Bill Shackelford",
34
- "email": "bshackelford@gmail.com",
35
- "url": "https://github.com/bshack"
12
+ "build": "tsc -p tsconfig.json && node dist/scripts/build.js",
13
+ "test": "npm run compile && npm run test:types && npm run test:unit",
14
+ "audit": "npm audit --audit-level=low",
15
+ "compile": "tsc -p tsconfig.json",
16
+ "typecheck": "tsc -p tsconfig.json --noEmit",
17
+ "test:unit": "node --test test/*.test.js",
18
+ "coverage": "npm run compile && npm run test:types && c8 npm run test:unit",
19
+ "prepack": "npm run compile",
20
+ "test:types": "tsc -p tsconfig.consumer.json"
36
21
  },
22
+ "files": [
23
+ "app",
24
+ "generators",
25
+ "scripts",
26
+ "README.md",
27
+ "dist",
28
+ "tsconfig.site.json"
29
+ ],
30
+ "keywords": [
31
+ "handlebars",
32
+ "sass",
33
+ "esbuild",
34
+ "yeoman-generator"
35
+ ],
36
+ "author": "Bill Shackelford",
37
37
  "license": "MIT",
38
38
  "repository": {
39
39
  "type": "git",
@@ -42,87 +42,56 @@
42
42
  "bugs": {
43
43
  "url": "https://github.com/bshack/white-label/issues"
44
44
  },
45
- "browser": {
46
- "modernizr": "./node_modules/modernizr/modernizr.js"
47
- },
48
- "browserify-shim": {
49
- "modernizr": "Modernizr"
50
- },
51
- "browserify": {
52
- "transform": [
53
- "browserify-shim"
54
- ]
55
- },
45
+ "homepage": "https://github.com/bshack/white-label",
56
46
  "dependencies": {
57
- "babel-plugin-transform-es2015-modules-commonjs": "x.x.x",
58
- "babel-plugin-transform-es2015-modules-umd": "x.x.x",
59
- "babel-polyfill": "x.x.x",
60
- "babel-preset-es2015": "x.x.x",
61
- "babel-preset-react": "x.x.x",
62
- "babelify": "x.x.x",
63
- "browser-sync": "x.x.x",
64
- "browserify": "x.x.x",
65
- "browserify-istanbul": "x.x.x",
66
- "browserify-shim": "x.x.x",
67
- "chalk": "x.x.x",
68
- "dom-delegate": "x.x.x",
69
- "eslint": "x.x.x",
70
- "eslint-plugin-react": "x.x.x",
71
- "events": "x.x.x",
72
- "factor-bundle": "x.x.x",
73
- "foundation-sites": "x.x.x",
74
- "glob": "x.x.x",
75
- "gulp": "x.x.x",
76
- "gulp-accessibility": "x.x.x",
77
- "gulp-autoprefixer": "x.x.x",
78
- "gulp-callback": "x.x.x",
79
- "gulp-concat": "x.x.x",
80
- "gulp-cssnano": "x.x.x",
81
- "gulp-debug": "x.x.x",
82
- "gulp-directory-map": "x.x.x",
83
- "gulp-eslint": "x.x.x",
84
- "gulp-htmllint": "x.x.x",
85
- "gulp-htmlmin": "x.x.x",
86
- "gulp-imagemin": "2.x.x",
87
- "gulp-jsdoc3": "x.x.x",
88
- "gulp-notify": "x.x.x",
89
- "gulp-plumber": "x.x.x",
90
- "gulp-rimraf": "x.x.x",
91
- "gulp-sass": "x.x.x",
92
- "gulp-sass-lint": "x.x.x",
93
- "gulp-sitemap": "x.x.x",
94
- "gulp-sizereport": "x.x.x",
95
- "gulp-sourcemaps": "x.x.x",
96
- "gulp-uglify": "x.x.x",
97
- "gulp-watch": "x.x.x",
98
- "http-proxy-middleware": "x.x.x",
99
- "istanbul": "x.x.x",
100
- "jasmine-core": "x.x.x",
101
- "karma": "x.x.x",
102
- "karma-browserify": "x.x.x",
103
- "karma-chrome-launcher": "x.x.x",
104
- "karma-coverage": "x.x.x",
105
- "karma-firefox-launcher": "x.x.x",
106
- "karma-ie-launcher": "x.x.x",
107
- "karma-jasmine": "x.x.x",
108
- "karma-phantomjs-launcher": "x.x.x",
109
- "karma-safari-launcher": "x.x.x",
110
- "modernizr": "x.x.x",
111
- "moment": "x.x.x",
112
- "numeraljs": "x.x.x",
113
- "path": "x.x.x",
114
- "phantomjs-prebuilt": "x.x.x",
115
- "react": "x.x.x",
116
- "react-dom": "x.x.x",
117
- "require-dir": "x.x.x",
118
- "run-sequence": "x.x.x",
119
- "shrinkwrap": "x.x.x",
120
- "watchify": "x.x.x",
121
- "white-label-model": "x.x.x",
122
- "yargs": "x.x.x",
123
- "yeoman-generator": "x.x.x",
124
- "yosay": "x.x.x"
47
+ "bootstrap": "5.3.8",
48
+ "chalk": "6.0.0",
49
+ "esbuild": "0.28.2",
50
+ "events": "3.3.0",
51
+ "handlebars": "4.7.9",
52
+ "react": "19.2.8",
53
+ "react-dom": "19.2.8",
54
+ "sass": "1.104.0",
55
+ "white-label-model": "1.0.37",
56
+ "white-label-view": "2.0.3",
57
+ "yeoman-generator": "8.3.1",
58
+ "yosay": "3.0.0",
59
+ "@types/node": "24.13.3",
60
+ "@yeoman/adapter": "5.0.0"
125
61
  },
126
62
  "devDependencies": {
63
+ "@types/react": "19.2.18",
64
+ "@types/react-dom": "19.2.7",
65
+ "@types/yosay": "2.0.3",
66
+ "c8": "12.0.0",
67
+ "jsdom": "30.0.1",
68
+ "typescript": "7.0.2",
69
+ "yeoman-environment": "7.0.0"
70
+ },
71
+ "types": "dist/generators/app/index.d.ts",
72
+ "c8": {
73
+ "all": true,
74
+ "include": [
75
+ "scripts/**/*.ts",
76
+ "generators/**/*.ts",
77
+ "app/assets/script/**/*.ts",
78
+ "app/assets/script/**/*.tsx"
79
+ ],
80
+ "reporter": [
81
+ "text",
82
+ "json",
83
+ "json-summary",
84
+ "lcov"
85
+ ],
86
+ "excludeAfterRemap": true,
87
+ "checkCoverage": true,
88
+ "lines": 100,
89
+ "functions": 100,
90
+ "branches": 100,
91
+ "statements": 100,
92
+ "perFile": true,
93
+ "exclude": [
94
+ "**/*.d.ts"
95
+ ]
127
96
  }
128
97
  }