generator-white-label 3.2.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.
- package/README.md +140 -81
- package/app/README.md +19 -0
- package/app/assets/font/opensans/stylesheet.css +20 -60
- package/app/assets/image/demo/fallback.avif +0 -0
- package/app/assets/image/demo/fallback.jpg +0 -0
- package/app/assets/image/demo/fallback.webp +0 -0
- package/app/assets/image/demo/large.avif +0 -0
- package/app/assets/image/demo/large.webp +0 -0
- package/app/assets/image/demo/small.avif +0 -0
- package/app/assets/image/demo/small.webp +0 -0
- package/app/assets/markup/element/iframe.hbs +4 -1
- package/app/assets/markup/element/img.hbs +16 -1
- package/app/assets/markup/element/picture.hbs +30 -0
- package/app/assets/markup/modal/modal-example-1.handlebars +1 -1
- package/app/assets/script/api/{facebook.js → facebook.ts} +17 -12
- package/app/assets/script/api/youtube.ts +22 -0
- package/app/assets/script/index.ts +2 -0
- package/app/assets/script/mediator/global.ts +4 -0
- package/app/assets/script/model/singletons/countries.ts +5 -0
- package/app/assets/script/model/singletons/global.ts +5 -0
- package/app/assets/script/model/singletons/states.ts +5 -0
- package/app/assets/script/model/user.ts +4 -0
- package/app/assets/script/toolkit.ts +11 -0
- package/app/assets/script/types.d.ts +16 -0
- package/app/assets/script/utility/ajax.ts +15 -0
- package/app/assets/script/utility/form.ts +119 -0
- package/app/assets/script/utility/{regex.js → regex.ts} +15 -6
- package/app/assets/script/utility/share.ts +77 -0
- package/app/assets/script/utility/string.ts +148 -0
- package/app/assets/script/view/default.tsx +14 -0
- package/app/assets/script/view/toolkit/youtube-player-1.ts +31 -0
- package/app/assets/style/base/_toolkit.scss +25 -25
- package/app/assets/style/base/components/_modal-1.scss +8 -3
- package/app/assets/style/base/components/_tabpanel-1.scss +21 -16
- package/app/assets/style/base/components/_tabpanel-2.scss +11 -6
- package/app/assets/style/base/components/_youtube-player-1.scss +3 -2
- package/app/assets/style/base/elements/_anchors.scss +2 -0
- package/app/assets/style/base/elements/_buttons.scss +7 -3
- package/app/assets/style/base/elements/_fieldsets.scss +2 -0
- package/app/assets/style/base/elements/_inputs.scss +6 -2
- package/app/assets/style/base/elements/_labels.scss +2 -0
- package/app/assets/style/base/elements/_legends.scss +2 -0
- package/app/assets/style/base/elements/_lists.scss +2 -0
- package/app/assets/style/base/elements/_tables.scss +10 -6
- package/app/assets/style/base/layouts/_staggered-1.scss +4 -1
- package/app/assets/style/base/type/_fonts.scss +4 -1
- package/app/assets/style/base/type/_headings.scss +3 -0
- package/app/assets/style/base/type/_text.scss +2 -0
- package/app/assets/style/base/utilities/_accessibility.scss +5 -2
- package/app/assets/style/base/utilities/_functions.scss +62 -9
- package/app/assets/style/global.scss +4 -11
- package/app/assets/style/print.scss +1 -4
- package/app/assets/style/toolkit.scss +37 -37
- package/app/package.json +1 -0
- package/app/toolkit/colors.hbs +11 -11
- package/app/toolkit/components.hbs +16 -16
- package/app/toolkit/elements.hbs +52 -43
- package/app/toolkit/grids.hbs +111 -111
- package/app/toolkit/icons.hbs +2 -2
- package/app/toolkit/index.hbs +6 -6
- package/app/toolkit/type.hbs +4 -4
- package/dist/app/assets/data/coutries.json +992 -0
- package/dist/app/assets/data/states.json +204 -0
- package/dist/app/assets/script/api/facebook.d.ts +8 -0
- package/dist/app/assets/script/api/facebook.js +42 -0
- package/dist/app/assets/script/api/facebook.js.map +1 -0
- package/dist/app/assets/script/api/youtube.d.ts +8 -0
- package/dist/app/assets/script/api/youtube.js +22 -0
- package/dist/app/assets/script/api/youtube.js.map +1 -0
- package/dist/app/assets/script/index.d.ts +2 -0
- package/dist/app/assets/script/index.js +2 -0
- package/dist/app/assets/script/index.js.map +1 -0
- package/dist/app/assets/script/mediator/global.d.ts +4 -0
- package/dist/app/assets/script/mediator/global.js +4 -0
- package/dist/app/assets/script/mediator/global.js.map +1 -0
- package/dist/app/assets/script/model/singletons/countries.d.ts +20 -0
- package/dist/app/assets/script/model/singletons/countries.js +5 -0
- package/dist/app/assets/script/model/singletons/countries.js.map +1 -0
- package/dist/app/assets/script/model/singletons/global.d.ts +20 -0
- package/dist/app/assets/script/model/singletons/global.js +5 -0
- package/dist/app/assets/script/model/singletons/global.js.map +1 -0
- package/dist/app/assets/script/model/singletons/states.d.ts +20 -0
- package/dist/app/assets/script/model/singletons/states.js +5 -0
- package/dist/app/assets/script/model/singletons/states.js.map +1 -0
- package/dist/app/assets/script/model/user.d.ts +4 -0
- package/dist/app/assets/script/model/user.js +6 -0
- package/dist/app/assets/script/model/user.js.map +1 -0
- package/dist/app/assets/script/toolkit.d.ts +1 -0
- package/dist/app/assets/script/toolkit.js +7 -0
- package/dist/app/assets/script/toolkit.js.map +1 -0
- package/dist/app/assets/script/utility/ajax.d.ts +8 -0
- package/dist/app/assets/script/utility/ajax.js +17 -0
- package/dist/app/assets/script/utility/ajax.js.map +1 -0
- package/dist/app/assets/script/utility/form.d.ts +64 -0
- package/dist/app/assets/script/utility/form.js +111 -0
- package/dist/app/assets/script/utility/form.js.map +1 -0
- package/dist/app/assets/script/utility/regex.d.ts +14 -0
- package/dist/app/assets/script/utility/regex.js +27 -0
- package/dist/app/assets/script/utility/regex.js.map +1 -0
- package/dist/app/assets/script/utility/share.d.ts +68 -0
- package/dist/app/assets/script/utility/share.js +81 -0
- package/dist/app/assets/script/utility/share.js.map +1 -0
- package/dist/app/assets/script/utility/string.d.ts +64 -0
- package/dist/app/assets/script/utility/string.js +135 -0
- package/dist/app/assets/script/utility/string.js.map +1 -0
- package/dist/app/assets/script/view/default.d.ts +11 -0
- package/dist/app/assets/script/view/default.js +15 -0
- package/dist/app/assets/script/view/default.js.map +1 -0
- package/dist/app/assets/script/view/toolkit/youtube-player-1.d.ts +23 -0
- package/dist/app/assets/script/view/toolkit/youtube-player-1.js +32 -0
- package/dist/app/assets/script/view/toolkit/youtube-player-1.js.map +1 -0
- package/dist/generators/app/index.d.ts +18 -0
- package/dist/generators/app/index.js +59 -0
- package/dist/generators/app/index.js.map +1 -0
- package/dist/scripts/build.d.ts +22 -0
- package/dist/scripts/build.js +158 -0
- package/dist/scripts/build.js.map +1 -0
- package/generators/app/index.js +2 -43
- package/generators/app/index.ts +61 -0
- package/package.json +79 -129
- package/scripts/build.ts +175 -0
- package/tsconfig.site.json +26 -0
- package/.babelrc +0 -14
- package/.editorconfig +0 -13
- package/.eslintrc +0 -64
- package/.htmllintrc +0 -6
- package/.sass-lint.yml +0 -16
- package/.travis.yml +0 -18
- package/app/assets/font/opensans/generator_config.txt +0 -5
- package/app/assets/font/opensans/opensans-bold-webfont.eot +0 -0
- package/app/assets/font/opensans/opensans-bold-webfont.svg +0 -1824
- package/app/assets/font/opensans/opensans-bold-webfont.ttf +0 -0
- package/app/assets/font/opensans/opensans-bold-webfont.woff +0 -0
- package/app/assets/font/opensans/opensans-bolditalic-webfont.eot +0 -0
- package/app/assets/font/opensans/opensans-bolditalic-webfont.svg +0 -1824
- package/app/assets/font/opensans/opensans-bolditalic-webfont.ttf +0 -0
- package/app/assets/font/opensans/opensans-bolditalic-webfont.woff +0 -0
- package/app/assets/font/opensans/opensans-extrabold-webfont.eot +0 -0
- package/app/assets/font/opensans/opensans-extrabold-webfont.svg +0 -1824
- package/app/assets/font/opensans/opensans-extrabold-webfont.ttf +0 -0
- package/app/assets/font/opensans/opensans-extrabold-webfont.woff +0 -0
- package/app/assets/font/opensans/opensans-extrabolditalic-webfont.eot +0 -0
- package/app/assets/font/opensans/opensans-extrabolditalic-webfont.svg +0 -1824
- package/app/assets/font/opensans/opensans-extrabolditalic-webfont.ttf +0 -0
- package/app/assets/font/opensans/opensans-extrabolditalic-webfont.woff +0 -0
- package/app/assets/font/opensans/opensans-italic-webfont.eot +0 -0
- package/app/assets/font/opensans/opensans-italic-webfont.svg +0 -1824
- package/app/assets/font/opensans/opensans-italic-webfont.ttf +0 -0
- package/app/assets/font/opensans/opensans-italic-webfont.woff +0 -0
- package/app/assets/font/opensans/opensans-light-webfont.eot +0 -0
- package/app/assets/font/opensans/opensans-light-webfont.svg +0 -1824
- package/app/assets/font/opensans/opensans-light-webfont.ttf +0 -0
- package/app/assets/font/opensans/opensans-light-webfont.woff +0 -0
- package/app/assets/font/opensans/opensans-lightitalic-webfont.eot +0 -0
- package/app/assets/font/opensans/opensans-lightitalic-webfont.svg +0 -1824
- package/app/assets/font/opensans/opensans-lightitalic-webfont.ttf +0 -0
- package/app/assets/font/opensans/opensans-lightitalic-webfont.woff +0 -0
- package/app/assets/font/opensans/opensans-regular-webfont.eot +0 -0
- package/app/assets/font/opensans/opensans-regular-webfont.svg +0 -1824
- package/app/assets/font/opensans/opensans-regular-webfont.ttf +0 -0
- package/app/assets/font/opensans/opensans-regular-webfont.woff +0 -0
- package/app/assets/font/opensans/opensans-semibold-webfont.eot +0 -0
- package/app/assets/font/opensans/opensans-semibold-webfont.svg +0 -1824
- package/app/assets/font/opensans/opensans-semibold-webfont.ttf +0 -0
- package/app/assets/font/opensans/opensans-semibold-webfont.woff +0 -0
- package/app/assets/font/opensans/opensans-semibolditalic-webfont.eot +0 -0
- package/app/assets/font/opensans/opensans-semibolditalic-webfont.svg +0 -1824
- package/app/assets/font/opensans/opensans-semibolditalic-webfont.ttf +0 -0
- package/app/assets/font/opensans/opensans-semibolditalic-webfont.woff +0 -0
- package/app/assets/font/opensans/specimen_files/grid_12-825-55-15.css +0 -129
- package/app/assets/font/opensans/specimen_files/specimen_stylesheet.css +0 -396
- package/app/assets/image/demo/large.jpg +0 -0
- package/app/assets/image/demo/medium.jpg +0 -0
- package/app/assets/image/demo/small.jpg +0 -0
- package/app/assets/image/demo/xlarge.jpg +0 -0
- package/app/assets/image/demo/xxlarge.jpg +0 -0
- package/app/assets/script/api/youtube.js +0 -18
- package/app/assets/script/index.js +0 -6
- package/app/assets/script/mediator/global.js +0 -5
- package/app/assets/script/model/singletons/countries.js +0 -6
- package/app/assets/script/model/singletons/global.js +0 -6
- package/app/assets/script/model/singletons/states.js +0 -6
- package/app/assets/script/model/user.js +0 -5
- package/app/assets/script/toolkit.js +0 -12
- package/app/assets/script/utility/ajax.js +0 -11
- package/app/assets/script/utility/form.js +0 -86
- package/app/assets/script/utility/share.js +0 -52
- package/app/assets/script/utility/string.js +0 -70
- package/app/assets/script/view/default.js +0 -11
- package/app/assets/script/view/toolkit/youtube-player-1.js +0 -17
- package/app/assets/style/base/vendor/_foundation.scss +0 -2
- package/app/assets/test/spec/shareSpec.js +0 -137
- package/app/index.html +0 -40
- package/app/report/istanbul/base.css +0 -213
- package/app/report/istanbul/prettify.css +0 -1
- package/app/report/istanbul/prettify.js +0 -1
- package/app/report/istanbul/sort-arrow-sprite.png +0 -0
- package/app/report/istanbul/sorter.js +0 -158
- package/app/report/jsdoc/fonts/glyphicons-halflings-regular.eot +0 -0
- package/app/report/jsdoc/fonts/glyphicons-halflings-regular.svg +0 -288
- package/app/report/jsdoc/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/app/report/jsdoc/fonts/glyphicons-halflings-regular.woff +0 -0
- package/app/report/jsdoc/fonts/glyphicons-halflings-regular.woff2 +0 -0
- package/app/report/jsdoc/img/glyphicons-halflings-white.png +0 -0
- package/app/report/jsdoc/img/glyphicons-halflings.png +0 -0
- package/app/report/jsdoc/scripts/docstrap.lib.js +0 -11
- package/app/report/jsdoc/scripts/fulltext-search-ui.js +0 -89
- package/app/report/jsdoc/scripts/fulltext-search.js +0 -36
- package/app/report/jsdoc/scripts/lunr.min.js +0 -6
- package/app/report/jsdoc/scripts/prettify/Apache-License-2.0.txt +0 -202
- package/app/report/jsdoc/scripts/prettify/jquery.min.js +0 -6
- package/app/report/jsdoc/scripts/prettify/lang-css.js +0 -21
- package/app/report/jsdoc/scripts/prettify/prettify.js +0 -496
- package/app/report/jsdoc/scripts/sunlight.js +0 -1157
- package/app/report/jsdoc/scripts/toc.js +0 -203
- package/app/report/jsdoc/styles/darkstrap.css +0 -960
- package/app/report/jsdoc/styles/prettify-tomorrow.css +0 -132
- package/app/report/jsdoc/styles/site.cerulean.css +0 -7008
- package/app/report/jsdoc/styles/site.cosmo.css +0 -7061
- package/app/report/jsdoc/styles/site.cyborg.css +0 -7048
- package/app/report/jsdoc/styles/site.darkly.css +0 -7171
- package/app/report/jsdoc/styles/site.darkstrap.css +0 -5638
- package/app/report/jsdoc/styles/site.dibs-bootstrap.css +0 -5899
- package/app/report/jsdoc/styles/site.flatly.css +0 -7147
- package/app/report/jsdoc/styles/site.journal.css +0 -6973
- package/app/report/jsdoc/styles/site.lumen.css +0 -7298
- package/app/report/jsdoc/styles/site.paper.css +0 -7623
- package/app/report/jsdoc/styles/site.readable.css +0 -6997
- package/app/report/jsdoc/styles/site.sandstone.css +0 -7035
- package/app/report/jsdoc/styles/site.simplex.css +0 -7023
- package/app/report/jsdoc/styles/site.slate.css +0 -7343
- package/app/report/jsdoc/styles/site.spacelab.css +0 -7055
- package/app/report/jsdoc/styles/site.superhero.css +0 -7131
- package/app/report/jsdoc/styles/site.united.css +0 -6895
- package/app/report/jsdoc/styles/site.yeti.css +0 -7195
- package/app/report/jsdoc/styles/sunlight.dark.css +0 -345
- package/app/report/jsdoc/styles/sunlight.default.css +0 -344
- package/gulp/config.js +0 -224
- package/gulp/tasks/accessibility.js +0 -34
- package/gulp/tasks/build.js +0 -19
- package/gulp/tasks/clean.js +0 -34
- package/gulp/tasks/data.js +0 -22
- package/gulp/tasks/default.js +0 -9
- package/gulp/tasks/deploy.js +0 -225
- package/gulp/tasks/documentation.js +0 -25
- package/gulp/tasks/markup.js +0 -121
- package/gulp/tasks/script.js +0 -92
- package/gulp/tasks/style.js +0 -42
- package/gulp/tasks/unit.js +0 -38
- package/gulp/tasks/watch.js +0 -83
- package/gulpfile.js +0 -8
- package/jsdoc.json +0 -23
- 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,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E,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,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,MAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;AAE/F;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,aAAuB;IAClD,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;QAC7D,MAA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,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,EAAC,SAAS,EAAE,IAAI,EAAC,CAAC;KACzG,CAAC,CAAC;IACH,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,kBAAkB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IACxF,MAAM,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;IACpD,MAAM,aAAa,CAAC,YAAY,EAAE,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IAClE,MAAM,cAAc,CAAC,YAAY,EAAE,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IACnE,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,gBAAgB,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC;AACrG,CAAC;AAED,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IACzE,MAAM,KAAK,EAAE,CAAC;AAClB,CAAC","sourcesContent":["/** Values injected into page templates and the generated config file. */\nexport interface BuildConfig {cdn: 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"]}
|
package/generators/app/index.js
CHANGED
|
@@ -1,43 +1,2 @@
|
|
|
1
|
-
'
|
|
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
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
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": ">=
|
|
14
|
-
"npm": ">=
|
|
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
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
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,106 +42,56 @@
|
|
|
42
42
|
"bugs": {
|
|
43
43
|
"url": "https://github.com/bshack/white-label/issues"
|
|
44
44
|
},
|
|
45
|
-
"
|
|
46
|
-
|
|
45
|
+
"homepage": "https://github.com/bshack/white-label",
|
|
46
|
+
"dependencies": {
|
|
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"
|
|
47
61
|
},
|
|
48
|
-
"
|
|
49
|
-
"
|
|
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"
|
|
50
70
|
},
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
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"
|
|
54
95
|
]
|
|
55
|
-
}
|
|
56
|
-
"dependencies": {
|
|
57
|
-
"aws-sdk": "x.x.x",
|
|
58
|
-
"babel-core": "^6.26.0",
|
|
59
|
-
"babel-plugin-transform-es2015-modules-commonjs": "x.x.x",
|
|
60
|
-
"babel-plugin-transform-es2015-modules-umd": "x.x.x",
|
|
61
|
-
"babel-polyfill": "x.x.x",
|
|
62
|
-
"babel-preset-env": "x.x.x",
|
|
63
|
-
"babel-preset-react": "x.x.x",
|
|
64
|
-
"babelify": "x.x.x",
|
|
65
|
-
"browser-sync": "x.x.x",
|
|
66
|
-
"browserify": "x.x.x",
|
|
67
|
-
"browserify-istanbul": "x.x.x",
|
|
68
|
-
"browserify-shim": "x.x.x",
|
|
69
|
-
"chalk": "x.x.x",
|
|
70
|
-
"dw-utils": "x.x.x",
|
|
71
|
-
"eslint": "x.x.x",
|
|
72
|
-
"eslint-plugin-react": "x.x.x",
|
|
73
|
-
"events": "x.x.x",
|
|
74
|
-
"factor-bundle": "x.x.x",
|
|
75
|
-
"fastclick": "x.x.x",
|
|
76
|
-
"foundation-sites": "x.x.x",
|
|
77
|
-
"glob": "x.x.x",
|
|
78
|
-
"gulp": "x.x.x",
|
|
79
|
-
"gulp-accessibility": "x.x.x",
|
|
80
|
-
"gulp-autoprefixer": "x.x.x",
|
|
81
|
-
"gulp-callback": "x.x.x",
|
|
82
|
-
"gulp-cli": "^1.4.0",
|
|
83
|
-
"gulp-compile-handlebars": "x.x.x",
|
|
84
|
-
"gulp-concat": "x.x.x",
|
|
85
|
-
"gulp-cssnano": "x.x.x",
|
|
86
|
-
"gulp-data": "x.x.x",
|
|
87
|
-
"gulp-debug": "x.x.x",
|
|
88
|
-
"gulp-directory-map": "x.x.x",
|
|
89
|
-
"gulp-eslint": "x.x.x",
|
|
90
|
-
"gulp-handlebars": "x.x.x",
|
|
91
|
-
"gulp-htmllint": "x.x.x",
|
|
92
|
-
"gulp-htmlmin": "x.x.x",
|
|
93
|
-
"gulp-imagemin": "2.x.x",
|
|
94
|
-
"gulp-jsdoc3": "x.x.x",
|
|
95
|
-
"gulp-notify": "x.x.x",
|
|
96
|
-
"gulp-plumber": "x.x.x",
|
|
97
|
-
"gulp-prettify": "x.x.x",
|
|
98
|
-
"gulp-rename": "x.x.x",
|
|
99
|
-
"gulp-rimraf": "x.x.x",
|
|
100
|
-
"gulp-sass": "x.x.x",
|
|
101
|
-
"gulp-sass-lint": "x.x.x",
|
|
102
|
-
"gulp-sitemap": "x.x.x",
|
|
103
|
-
"gulp-sizereport": "x.x.x",
|
|
104
|
-
"gulp-sourcemaps": "x.x.x",
|
|
105
|
-
"gulp-strip-debug": "x.x.x",
|
|
106
|
-
"gulp-uglify": "x.x.x",
|
|
107
|
-
"gulp-watch": "x.x.x",
|
|
108
|
-
"gulp-wrapper": "x.x.x",
|
|
109
|
-
"handlebars": "x.x.x",
|
|
110
|
-
"http-proxy-middleware": "x.x.x",
|
|
111
|
-
"imagesloaded": "x.x.x",
|
|
112
|
-
"istanbul": "x.x.x",
|
|
113
|
-
"jasmine-core": "x.x.x",
|
|
114
|
-
"jquery": "x.x.x",
|
|
115
|
-
"jquery-validation": "x.x.x",
|
|
116
|
-
"karma": "x.x.x",
|
|
117
|
-
"karma-browserify": "x.x.x",
|
|
118
|
-
"karma-chrome-launcher": "x.x.x",
|
|
119
|
-
"karma-coverage": "x.x.x",
|
|
120
|
-
"karma-firefox-launcher": "x.x.x",
|
|
121
|
-
"karma-ie-launcher": "x.x.x",
|
|
122
|
-
"karma-jasmine": "x.x.x",
|
|
123
|
-
"karma-phantomjs-launcher": "x.x.x",
|
|
124
|
-
"karma-safari-launcher": "x.x.x",
|
|
125
|
-
"lodash": "x.x.x",
|
|
126
|
-
"modernizr": "x.x.x",
|
|
127
|
-
"moment": "x.x.x",
|
|
128
|
-
"numeraljs": "x.x.x",
|
|
129
|
-
"path": "x.x.x",
|
|
130
|
-
"phantomjs-prebuilt": "x.x.x",
|
|
131
|
-
"picturefill": "x.x.x",
|
|
132
|
-
"raven-js": "x.x.x",
|
|
133
|
-
"react": "x.x.x",
|
|
134
|
-
"react-dom": "x.x.x",
|
|
135
|
-
"require-dir": "x.x.x",
|
|
136
|
-
"run-sequence": "x.x.x",
|
|
137
|
-
"slick-carousel": "1.6.x",
|
|
138
|
-
"watchify": "x.x.x",
|
|
139
|
-
"white-label-model": "x.x.x",
|
|
140
|
-
"white-label-view": "x.x.x",
|
|
141
|
-
"yargs": "x.x.x",
|
|
142
|
-
"yeoman-generator": "x.x.x",
|
|
143
|
-
"yosay": "x.x.x",
|
|
144
|
-
"zenscroll": "x.x.x"
|
|
145
|
-
},
|
|
146
|
-
"devDependencies": {}
|
|
96
|
+
}
|
|
147
97
|
}
|