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.
Files changed (253) hide show
  1. package/README.md +140 -81
  2. package/app/README.md +19 -0
  3. package/app/assets/font/opensans/stylesheet.css +20 -60
  4. package/app/assets/image/demo/fallback.avif +0 -0
  5. package/app/assets/image/demo/fallback.jpg +0 -0
  6. package/app/assets/image/demo/fallback.webp +0 -0
  7. package/app/assets/image/demo/large.avif +0 -0
  8. package/app/assets/image/demo/large.webp +0 -0
  9. package/app/assets/image/demo/small.avif +0 -0
  10. package/app/assets/image/demo/small.webp +0 -0
  11. package/app/assets/markup/element/iframe.hbs +4 -1
  12. package/app/assets/markup/element/img.hbs +16 -1
  13. package/app/assets/markup/element/picture.hbs +30 -0
  14. package/app/assets/markup/modal/modal-example-1.handlebars +1 -1
  15. package/app/assets/script/api/{facebook.js → facebook.ts} +17 -12
  16. package/app/assets/script/api/youtube.ts +22 -0
  17. package/app/assets/script/index.ts +2 -0
  18. package/app/assets/script/mediator/global.ts +4 -0
  19. package/app/assets/script/model/singletons/countries.ts +5 -0
  20. package/app/assets/script/model/singletons/global.ts +5 -0
  21. package/app/assets/script/model/singletons/states.ts +5 -0
  22. package/app/assets/script/model/user.ts +4 -0
  23. package/app/assets/script/toolkit.ts +11 -0
  24. package/app/assets/script/types.d.ts +16 -0
  25. package/app/assets/script/utility/ajax.ts +15 -0
  26. package/app/assets/script/utility/form.ts +119 -0
  27. package/app/assets/script/utility/{regex.js → regex.ts} +15 -6
  28. package/app/assets/script/utility/share.ts +77 -0
  29. package/app/assets/script/utility/string.ts +148 -0
  30. package/app/assets/script/view/default.tsx +14 -0
  31. package/app/assets/script/view/toolkit/youtube-player-1.ts +31 -0
  32. package/app/assets/style/base/_toolkit.scss +25 -25
  33. package/app/assets/style/base/components/_modal-1.scss +8 -3
  34. package/app/assets/style/base/components/_tabpanel-1.scss +21 -16
  35. package/app/assets/style/base/components/_tabpanel-2.scss +11 -6
  36. package/app/assets/style/base/components/_youtube-player-1.scss +3 -2
  37. package/app/assets/style/base/elements/_anchors.scss +2 -0
  38. package/app/assets/style/base/elements/_buttons.scss +7 -3
  39. package/app/assets/style/base/elements/_fieldsets.scss +2 -0
  40. package/app/assets/style/base/elements/_inputs.scss +6 -2
  41. package/app/assets/style/base/elements/_labels.scss +2 -0
  42. package/app/assets/style/base/elements/_legends.scss +2 -0
  43. package/app/assets/style/base/elements/_lists.scss +2 -0
  44. package/app/assets/style/base/elements/_tables.scss +10 -6
  45. package/app/assets/style/base/layouts/_staggered-1.scss +4 -1
  46. package/app/assets/style/base/type/_fonts.scss +4 -1
  47. package/app/assets/style/base/type/_headings.scss +3 -0
  48. package/app/assets/style/base/type/_text.scss +2 -0
  49. package/app/assets/style/base/utilities/_accessibility.scss +5 -2
  50. package/app/assets/style/base/utilities/_functions.scss +62 -9
  51. package/app/assets/style/global.scss +4 -11
  52. package/app/assets/style/print.scss +1 -4
  53. package/app/assets/style/toolkit.scss +37 -37
  54. package/app/package.json +1 -0
  55. package/app/toolkit/colors.hbs +11 -11
  56. package/app/toolkit/components.hbs +16 -16
  57. package/app/toolkit/elements.hbs +52 -43
  58. package/app/toolkit/grids.hbs +111 -111
  59. package/app/toolkit/icons.hbs +2 -2
  60. package/app/toolkit/index.hbs +6 -6
  61. package/app/toolkit/type.hbs +4 -4
  62. package/dist/app/assets/data/coutries.json +992 -0
  63. package/dist/app/assets/data/states.json +204 -0
  64. package/dist/app/assets/script/api/facebook.d.ts +8 -0
  65. package/dist/app/assets/script/api/facebook.js +42 -0
  66. package/dist/app/assets/script/api/facebook.js.map +1 -0
  67. package/dist/app/assets/script/api/youtube.d.ts +8 -0
  68. package/dist/app/assets/script/api/youtube.js +22 -0
  69. package/dist/app/assets/script/api/youtube.js.map +1 -0
  70. package/dist/app/assets/script/index.d.ts +2 -0
  71. package/dist/app/assets/script/index.js +2 -0
  72. package/dist/app/assets/script/index.js.map +1 -0
  73. package/dist/app/assets/script/mediator/global.d.ts +4 -0
  74. package/dist/app/assets/script/mediator/global.js +4 -0
  75. package/dist/app/assets/script/mediator/global.js.map +1 -0
  76. package/dist/app/assets/script/model/singletons/countries.d.ts +20 -0
  77. package/dist/app/assets/script/model/singletons/countries.js +5 -0
  78. package/dist/app/assets/script/model/singletons/countries.js.map +1 -0
  79. package/dist/app/assets/script/model/singletons/global.d.ts +20 -0
  80. package/dist/app/assets/script/model/singletons/global.js +5 -0
  81. package/dist/app/assets/script/model/singletons/global.js.map +1 -0
  82. package/dist/app/assets/script/model/singletons/states.d.ts +20 -0
  83. package/dist/app/assets/script/model/singletons/states.js +5 -0
  84. package/dist/app/assets/script/model/singletons/states.js.map +1 -0
  85. package/dist/app/assets/script/model/user.d.ts +4 -0
  86. package/dist/app/assets/script/model/user.js +6 -0
  87. package/dist/app/assets/script/model/user.js.map +1 -0
  88. package/dist/app/assets/script/toolkit.d.ts +1 -0
  89. package/dist/app/assets/script/toolkit.js +7 -0
  90. package/dist/app/assets/script/toolkit.js.map +1 -0
  91. package/dist/app/assets/script/utility/ajax.d.ts +8 -0
  92. package/dist/app/assets/script/utility/ajax.js +17 -0
  93. package/dist/app/assets/script/utility/ajax.js.map +1 -0
  94. package/dist/app/assets/script/utility/form.d.ts +64 -0
  95. package/dist/app/assets/script/utility/form.js +111 -0
  96. package/dist/app/assets/script/utility/form.js.map +1 -0
  97. package/dist/app/assets/script/utility/regex.d.ts +14 -0
  98. package/dist/app/assets/script/utility/regex.js +27 -0
  99. package/dist/app/assets/script/utility/regex.js.map +1 -0
  100. package/dist/app/assets/script/utility/share.d.ts +68 -0
  101. package/dist/app/assets/script/utility/share.js +81 -0
  102. package/dist/app/assets/script/utility/share.js.map +1 -0
  103. package/dist/app/assets/script/utility/string.d.ts +64 -0
  104. package/dist/app/assets/script/utility/string.js +135 -0
  105. package/dist/app/assets/script/utility/string.js.map +1 -0
  106. package/dist/app/assets/script/view/default.d.ts +11 -0
  107. package/dist/app/assets/script/view/default.js +15 -0
  108. package/dist/app/assets/script/view/default.js.map +1 -0
  109. package/dist/app/assets/script/view/toolkit/youtube-player-1.d.ts +23 -0
  110. package/dist/app/assets/script/view/toolkit/youtube-player-1.js +32 -0
  111. package/dist/app/assets/script/view/toolkit/youtube-player-1.js.map +1 -0
  112. package/dist/generators/app/index.d.ts +18 -0
  113. package/dist/generators/app/index.js +59 -0
  114. package/dist/generators/app/index.js.map +1 -0
  115. package/dist/scripts/build.d.ts +22 -0
  116. package/dist/scripts/build.js +158 -0
  117. package/dist/scripts/build.js.map +1 -0
  118. package/generators/app/index.js +2 -43
  119. package/generators/app/index.ts +61 -0
  120. package/package.json +79 -129
  121. package/scripts/build.ts +175 -0
  122. package/tsconfig.site.json +26 -0
  123. package/.babelrc +0 -14
  124. package/.editorconfig +0 -13
  125. package/.eslintrc +0 -64
  126. package/.htmllintrc +0 -6
  127. package/.sass-lint.yml +0 -16
  128. package/.travis.yml +0 -18
  129. package/app/assets/font/opensans/generator_config.txt +0 -5
  130. package/app/assets/font/opensans/opensans-bold-webfont.eot +0 -0
  131. package/app/assets/font/opensans/opensans-bold-webfont.svg +0 -1824
  132. package/app/assets/font/opensans/opensans-bold-webfont.ttf +0 -0
  133. package/app/assets/font/opensans/opensans-bold-webfont.woff +0 -0
  134. package/app/assets/font/opensans/opensans-bolditalic-webfont.eot +0 -0
  135. package/app/assets/font/opensans/opensans-bolditalic-webfont.svg +0 -1824
  136. package/app/assets/font/opensans/opensans-bolditalic-webfont.ttf +0 -0
  137. package/app/assets/font/opensans/opensans-bolditalic-webfont.woff +0 -0
  138. package/app/assets/font/opensans/opensans-extrabold-webfont.eot +0 -0
  139. package/app/assets/font/opensans/opensans-extrabold-webfont.svg +0 -1824
  140. package/app/assets/font/opensans/opensans-extrabold-webfont.ttf +0 -0
  141. package/app/assets/font/opensans/opensans-extrabold-webfont.woff +0 -0
  142. package/app/assets/font/opensans/opensans-extrabolditalic-webfont.eot +0 -0
  143. package/app/assets/font/opensans/opensans-extrabolditalic-webfont.svg +0 -1824
  144. package/app/assets/font/opensans/opensans-extrabolditalic-webfont.ttf +0 -0
  145. package/app/assets/font/opensans/opensans-extrabolditalic-webfont.woff +0 -0
  146. package/app/assets/font/opensans/opensans-italic-webfont.eot +0 -0
  147. package/app/assets/font/opensans/opensans-italic-webfont.svg +0 -1824
  148. package/app/assets/font/opensans/opensans-italic-webfont.ttf +0 -0
  149. package/app/assets/font/opensans/opensans-italic-webfont.woff +0 -0
  150. package/app/assets/font/opensans/opensans-light-webfont.eot +0 -0
  151. package/app/assets/font/opensans/opensans-light-webfont.svg +0 -1824
  152. package/app/assets/font/opensans/opensans-light-webfont.ttf +0 -0
  153. package/app/assets/font/opensans/opensans-light-webfont.woff +0 -0
  154. package/app/assets/font/opensans/opensans-lightitalic-webfont.eot +0 -0
  155. package/app/assets/font/opensans/opensans-lightitalic-webfont.svg +0 -1824
  156. package/app/assets/font/opensans/opensans-lightitalic-webfont.ttf +0 -0
  157. package/app/assets/font/opensans/opensans-lightitalic-webfont.woff +0 -0
  158. package/app/assets/font/opensans/opensans-regular-webfont.eot +0 -0
  159. package/app/assets/font/opensans/opensans-regular-webfont.svg +0 -1824
  160. package/app/assets/font/opensans/opensans-regular-webfont.ttf +0 -0
  161. package/app/assets/font/opensans/opensans-regular-webfont.woff +0 -0
  162. package/app/assets/font/opensans/opensans-semibold-webfont.eot +0 -0
  163. package/app/assets/font/opensans/opensans-semibold-webfont.svg +0 -1824
  164. package/app/assets/font/opensans/opensans-semibold-webfont.ttf +0 -0
  165. package/app/assets/font/opensans/opensans-semibold-webfont.woff +0 -0
  166. package/app/assets/font/opensans/opensans-semibolditalic-webfont.eot +0 -0
  167. package/app/assets/font/opensans/opensans-semibolditalic-webfont.svg +0 -1824
  168. package/app/assets/font/opensans/opensans-semibolditalic-webfont.ttf +0 -0
  169. package/app/assets/font/opensans/opensans-semibolditalic-webfont.woff +0 -0
  170. package/app/assets/font/opensans/specimen_files/grid_12-825-55-15.css +0 -129
  171. package/app/assets/font/opensans/specimen_files/specimen_stylesheet.css +0 -396
  172. package/app/assets/image/demo/large.jpg +0 -0
  173. package/app/assets/image/demo/medium.jpg +0 -0
  174. package/app/assets/image/demo/small.jpg +0 -0
  175. package/app/assets/image/demo/xlarge.jpg +0 -0
  176. package/app/assets/image/demo/xxlarge.jpg +0 -0
  177. package/app/assets/script/api/youtube.js +0 -18
  178. package/app/assets/script/index.js +0 -6
  179. package/app/assets/script/mediator/global.js +0 -5
  180. package/app/assets/script/model/singletons/countries.js +0 -6
  181. package/app/assets/script/model/singletons/global.js +0 -6
  182. package/app/assets/script/model/singletons/states.js +0 -6
  183. package/app/assets/script/model/user.js +0 -5
  184. package/app/assets/script/toolkit.js +0 -12
  185. package/app/assets/script/utility/ajax.js +0 -11
  186. package/app/assets/script/utility/form.js +0 -86
  187. package/app/assets/script/utility/share.js +0 -52
  188. package/app/assets/script/utility/string.js +0 -70
  189. package/app/assets/script/view/default.js +0 -11
  190. package/app/assets/script/view/toolkit/youtube-player-1.js +0 -17
  191. package/app/assets/style/base/vendor/_foundation.scss +0 -2
  192. package/app/assets/test/spec/shareSpec.js +0 -137
  193. package/app/index.html +0 -40
  194. package/app/report/istanbul/base.css +0 -213
  195. package/app/report/istanbul/prettify.css +0 -1
  196. package/app/report/istanbul/prettify.js +0 -1
  197. package/app/report/istanbul/sort-arrow-sprite.png +0 -0
  198. package/app/report/istanbul/sorter.js +0 -158
  199. package/app/report/jsdoc/fonts/glyphicons-halflings-regular.eot +0 -0
  200. package/app/report/jsdoc/fonts/glyphicons-halflings-regular.svg +0 -288
  201. package/app/report/jsdoc/fonts/glyphicons-halflings-regular.ttf +0 -0
  202. package/app/report/jsdoc/fonts/glyphicons-halflings-regular.woff +0 -0
  203. package/app/report/jsdoc/fonts/glyphicons-halflings-regular.woff2 +0 -0
  204. package/app/report/jsdoc/img/glyphicons-halflings-white.png +0 -0
  205. package/app/report/jsdoc/img/glyphicons-halflings.png +0 -0
  206. package/app/report/jsdoc/scripts/docstrap.lib.js +0 -11
  207. package/app/report/jsdoc/scripts/fulltext-search-ui.js +0 -89
  208. package/app/report/jsdoc/scripts/fulltext-search.js +0 -36
  209. package/app/report/jsdoc/scripts/lunr.min.js +0 -6
  210. package/app/report/jsdoc/scripts/prettify/Apache-License-2.0.txt +0 -202
  211. package/app/report/jsdoc/scripts/prettify/jquery.min.js +0 -6
  212. package/app/report/jsdoc/scripts/prettify/lang-css.js +0 -21
  213. package/app/report/jsdoc/scripts/prettify/prettify.js +0 -496
  214. package/app/report/jsdoc/scripts/sunlight.js +0 -1157
  215. package/app/report/jsdoc/scripts/toc.js +0 -203
  216. package/app/report/jsdoc/styles/darkstrap.css +0 -960
  217. package/app/report/jsdoc/styles/prettify-tomorrow.css +0 -132
  218. package/app/report/jsdoc/styles/site.cerulean.css +0 -7008
  219. package/app/report/jsdoc/styles/site.cosmo.css +0 -7061
  220. package/app/report/jsdoc/styles/site.cyborg.css +0 -7048
  221. package/app/report/jsdoc/styles/site.darkly.css +0 -7171
  222. package/app/report/jsdoc/styles/site.darkstrap.css +0 -5638
  223. package/app/report/jsdoc/styles/site.dibs-bootstrap.css +0 -5899
  224. package/app/report/jsdoc/styles/site.flatly.css +0 -7147
  225. package/app/report/jsdoc/styles/site.journal.css +0 -6973
  226. package/app/report/jsdoc/styles/site.lumen.css +0 -7298
  227. package/app/report/jsdoc/styles/site.paper.css +0 -7623
  228. package/app/report/jsdoc/styles/site.readable.css +0 -6997
  229. package/app/report/jsdoc/styles/site.sandstone.css +0 -7035
  230. package/app/report/jsdoc/styles/site.simplex.css +0 -7023
  231. package/app/report/jsdoc/styles/site.slate.css +0 -7343
  232. package/app/report/jsdoc/styles/site.spacelab.css +0 -7055
  233. package/app/report/jsdoc/styles/site.superhero.css +0 -7131
  234. package/app/report/jsdoc/styles/site.united.css +0 -6895
  235. package/app/report/jsdoc/styles/site.yeti.css +0 -7195
  236. package/app/report/jsdoc/styles/sunlight.dark.css +0 -345
  237. package/app/report/jsdoc/styles/sunlight.default.css +0 -344
  238. package/gulp/config.js +0 -224
  239. package/gulp/tasks/accessibility.js +0 -34
  240. package/gulp/tasks/build.js +0 -19
  241. package/gulp/tasks/clean.js +0 -34
  242. package/gulp/tasks/data.js +0 -22
  243. package/gulp/tasks/default.js +0 -9
  244. package/gulp/tasks/deploy.js +0 -225
  245. package/gulp/tasks/documentation.js +0 -25
  246. package/gulp/tasks/markup.js +0 -121
  247. package/gulp/tasks/script.js +0 -92
  248. package/gulp/tasks/style.js +0 -42
  249. package/gulp/tasks/unit.js +0 -38
  250. package/gulp/tasks/watch.js +0 -83
  251. package/gulpfile.js +0 -8
  252. package/jsdoc.json +0 -23
  253. package/karma.conf.js +0 -58
package/gulp/config.js DELETED
@@ -1,224 +0,0 @@
1
- (() => {
2
-
3
- 'use strict';
4
-
5
- // ## Load Modules
6
-
7
- const yargs = require('yargs').argv;
8
-
9
- // ## Environment Config
10
-
11
- let isProduction;
12
- if (yargs.production) {
13
- isProduction = yargs.production;
14
- } else {
15
- isProduction = false;
16
- }
17
-
18
- // setting the build version
19
- let version;
20
- if (yargs.version) {
21
- version = yargs.version;
22
- } else {
23
- //by default set the version to a timestamp
24
- version = Math.floor(new Date() / 1000);
25
- }
26
-
27
- //setting a www domain for build
28
- let www;
29
- //test if www is defined
30
- if (yargs.www) {
31
- www = yargs.www + '/';
32
- } else {
33
- www = '/';
34
- }
35
-
36
- //setting a cdn domain for build
37
- let cdn;
38
- //test if cdn is defined
39
- if (yargs.cdn) {
40
- cdn = yargs.cdn + '/release/' + version + '/';
41
- } else {
42
- cdn = '/';
43
- }
44
-
45
- //setting a service domain for build
46
- let service;
47
- //test if www is defined
48
- if (yargs.service) {
49
- service = yargs.service + '/';
50
- } else {
51
- service = '/service-endpoint/';
52
- }
53
-
54
- // ## paths
55
- module.exports = {
56
- // ## Path Variables
57
- path: {
58
- // ### build
59
- // where to save deployable files
60
- build: '_deploy',
61
- root: 'app/',
62
- version: version,
63
- www: www,
64
- cdn: cdn,
65
- service: service,
66
- proxy: {
67
- target: 'http://127.0.0.1:8000/service-endpoint',
68
- rewrite: {
69
- '/service-endpoint': '/'
70
- }
71
- },
72
- // is this a production build?
73
- isProduction: isProduction,
74
- // ### image
75
- image: {
76
- // glob of all image files and directories
77
- source: [
78
- 'app/assets/image/**'
79
- ],
80
- // location to save processed images by tasks
81
- destination: 'assets/image'
82
- },
83
- // ### markup
84
- markup: {
85
- // htmllint config file
86
- htmlLint: '.htmllintrc',
87
- // glob of handlebars templates
88
- source: [
89
- 'app/**/*.hbs',
90
- 'app/**/*.handlebars',
91
- '!app/assets/**',
92
- '!app/report/**',
93
- '!app/service/**'
94
- ],
95
- // glob of generated html files
96
- destination: [
97
- 'app/**/*.html',
98
- '!app/assets/**',
99
- '!app/report/**',
100
- '!app/service/**'
101
- ],
102
- partials: {
103
- //glob of handlebars partials
104
- source: [
105
- 'app/assets/markup'
106
- ],
107
- // glob of handlebars partials, needed for watch task
108
- watch: 'app/assets/markup/**',
109
- // where to save generated js templates
110
- destination: 'app/assets/script/template'
111
- }
112
- },
113
- // ### font
114
- font: {
115
- // glob of fonts
116
- source: 'app/assets/font/**',
117
- // where to save fonts
118
- destination: 'assets/font'
119
- },
120
- // ### script
121
- script: {
122
- // karma test runner conig file
123
- karma: __dirname + '/../karma.conf.js',
124
- // where to save out the modernizr built file
125
- modernizr: 'node_modules/modernizr/modernizr.js',
126
- // glob of all js files including gulp and application
127
- all: [
128
- '*.js',
129
- 'gulp/tasks/*.js',
130
- 'gulp/*.js',
131
- 'app/assets/script/**',
132
- 'app/assets/test/spec/*.js',
133
- 'app/assets/test/*.js',
134
- '!app/assets/script/template/**',
135
- '!app/assets/script/*.compiled.js'
136
- ],
137
- // glob of only gulp js files for documentation task
138
- gulp: [
139
- '*.js',
140
- 'gulp/tasks/*.js',
141
- 'gulp/*.js'
142
- ],
143
- // glob of only application files for documentation task
144
- source: [
145
- 'app/assets/script/*.js',
146
- 'app/assets/script/**',
147
- '!app/assets/script/template/**',
148
- '!app/assets/script/*.compiled.js'
149
- ],
150
- // glob js files to be delployed duirng release
151
- release: 'app/assets/script/*.compiled.js',
152
- // file to be compliled by browserify
153
- compile: {
154
- source: 'app/assets/script/global.js',
155
- destination: 'app/assets/script',
156
- filename: 'global.compiled.js'
157
- },
158
- // where to save script files in release task
159
- destination: 'assets/script',
160
- // common libraries found when browserify builds entries
161
- entriesGlobal: 'app/assets/script/global.compiled.js',
162
- // browserify entries
163
- entries: 'app/assets/script/*.js'
164
- },
165
- // ### style
166
- style: {
167
- // scsslint config file
168
- scssLint: '.scss-lint.yml',
169
- source: {
170
- // glob of all scss files
171
- scss: [
172
- 'app/assets/style/*.scss',
173
- 'app/assets/style/**/*.scss'
174
- ],
175
- // glob of all css files
176
- css: [
177
- 'app/assets/style/*.css'
178
- ]
179
- },
180
- // where to save style files
181
- destination: {
182
- watch: 'app/assets/style',
183
- release: 'assets/style'
184
- }
185
- },
186
- // ### font
187
- data: {
188
- // where to save data returns glob
189
- sourceGlob: 'app/assets/data/**',
190
- // where to save data
191
- source: 'app/assets/data',
192
- // where to save data
193
- destination: 'assets/data',
194
- // global config data
195
- globalConfig: {
196
- 'www': www,
197
- 'cdn': cdn,
198
- 'service': service,
199
- 'version': version
200
- },
201
- // global config file name
202
- globalConfigFile: 'app/assets/data/config.json',
203
- pageDirectory: 'view/',
204
- pageDefaultData: 'global.json'
205
- },
206
- // ### release
207
- release: {
208
- destination: '/release/',
209
- copy: [
210
- 'app/sitemap.xml',
211
- 'app/robots.txt',
212
- 'app/favicon.ico'
213
- ]
214
- },
215
- // ### report
216
- report: {
217
- // where to save code complexity report
218
- source: 'app/report/**',
219
- destination: 'report'
220
- }
221
- }
222
- };
223
-
224
- })();
@@ -1,34 +0,0 @@
1
- 'use strict';
2
-
3
- // ## Load Modules
4
-
5
- const gulp = require('gulp');
6
- const accessibility = require('gulp-accessibility');
7
- const plumber = require('gulp-plumber');
8
- const notify = require('gulp-notify');
9
-
10
- // ## Environment Config
11
-
12
- const config = require('../config');
13
-
14
- // ## Accessibility Task
15
- // dependacy on markup task to have markup compiled
16
-
17
- gulp.task('accessibility', () => {
18
-
19
- return gulp.src(config.path.markup.destination)
20
- //support for better error handling
21
- .pipe(plumber())
22
- //show only errors for AAA spec
23
- .pipe(accessibility({
24
- accessibilityLevel: 'WCAG2AAA',
25
- reportLevels: {
26
- notice: false,
27
- warning: false,
28
- error: true,
29
- verbose: true
30
- }
31
- }))
32
- .on('error', notify.onError('accessibility: <%= error.message %>'));
33
-
34
- });
@@ -1,19 +0,0 @@
1
- 'use strict';
2
-
3
- // ## Load Modules
4
-
5
- const gulp = require('gulp');
6
- const runSequence = require('run-sequence');
7
-
8
- // ## Build Task
9
-
10
- gulp.task('build', callback => {
11
- //runSequence support is only for gulp 3.x, 4.x natively support this functionalty
12
- return runSequence(
13
- ['cleanTemplate'],
14
- ['data'],
15
- ['markup', 'style', 'script', 'documentation'],
16
- ['accessibility'],
17
- callback
18
- );
19
- });
@@ -1,34 +0,0 @@
1
- 'use strict';
2
-
3
- // ## Load Modules
4
-
5
- const gulp = require('gulp');
6
- const rimraf = require('gulp-rimraf');
7
-
8
- // ## Environment Config
9
-
10
- const config = require('../config');
11
-
12
- // ## cleanDeploy Task
13
-
14
- gulp.task('cleanDeploy', (done) => {
15
- 'use strict';
16
- return gulp.src(config.path.build, {read: false})
17
- .pipe(rimraf());
18
- });
19
-
20
- // ## cleanTemplate Task
21
-
22
- gulp.task('cleanTemplate', (done) => {
23
- 'use strict';
24
- return gulp.src(config.path.markup.partials.destination, {read: false})
25
- .pipe(rimraf());
26
- });
27
-
28
- // ## cleanHTML Task
29
-
30
- gulp.task('cleanHTML', (done) => {
31
- 'use strict';
32
- return gulp.src(config.path.markup.destination, {read: false})
33
- .pipe(rimraf());
34
- });
@@ -1,22 +0,0 @@
1
- 'use strict';
2
-
3
- // ## Load Modules
4
-
5
- const gulp = require('gulp');
6
- const fs = require('fs');
7
-
8
- // ## Environment Config
9
-
10
- const config = require('../config');
11
-
12
- // ## Data Write Config json Task
13
-
14
- gulp.task('data', callback => {
15
-
16
- fs.writeFile(
17
- config.path.data.globalConfigFile,
18
- JSON.stringify(config.path.data.globalConfig),
19
- callback
20
- );
21
-
22
- });
@@ -1,9 +0,0 @@
1
- 'use strict';
2
-
3
- // ## Load Modules
4
-
5
- const gulp = require('gulp');
6
-
7
- // ## Default Task
8
- // this is just a proxy for watch
9
- gulp.task('default', ['watch']);
@@ -1,225 +0,0 @@
1
- 'use strict';
2
-
3
- // ## Load Modules
4
-
5
- const gulp = require('gulp');
6
- const htmlmin = require('gulp-htmlmin');
7
- const sourcemaps = require('gulp-sourcemaps');
8
- const imagemin = require('gulp-imagemin');
9
- const stripDebug = require('gulp-strip-debug');
10
- const uglify = require('gulp-uglify');
11
- const plumber = require('gulp-plumber');
12
- const sitemap = require('gulp-sitemap');
13
- const runSequence = require('run-sequence');
14
- const cssnano = require('gulp-cssnano');
15
- const sizereport = require('gulp-sizereport');
16
-
17
- // ## Environment Config
18
-
19
- const config = require('../config');
20
-
21
- // ## Release Task
22
- // release task dependent on tasks to do code quality checks and build documentation
23
-
24
- gulp.task('deploy', callback => {
25
- //runSequence support is only for gulp 3.x, 4.x natively support this functionalty
26
- return runSequence(
27
- ['cleanDeploy', 'cleanTemplate'],
28
- ['data'],
29
- ['markup', 'style', 'script', 'documentation'],
30
- ['accessibility'],
31
- ['copyRoot', 'copyReport', 'copyFonts', 'minifyMarkup', 'copyData', 'minifyStyle', 'minifyScript',
32
- 'minifyImage', 'sitemap'],
33
- ['sizeReportCSS', 'sizeReportJS', 'sizeReportImage'],
34
- callback
35
- );
36
- });
37
-
38
- // ## Copy Root Task
39
- // copy root dependency files to deploy directory
40
- gulp.task('copyRoot', () => {
41
- return gulp.src(config.path.release.copy)
42
- //support for better error handling
43
- .pipe(plumber())
44
- .pipe(gulp.dest(config.path.build));
45
-
46
- });
47
-
48
- // ## Copy Report Task
49
- // copy report dependency files to deploy directory
50
- gulp.task('copyReport', () => {
51
- return gulp.src(config.path.report.source)
52
- //support for better error handling
53
- .pipe(plumber())
54
- .pipe(gulp.dest(config.path.build + '/' + config.path.report.destination));
55
-
56
- });
57
-
58
- // ## Copy Fonts Task
59
- // copy Font dependency files to deploy directory
60
- gulp.task('copyFonts', () => {
61
- return gulp.src(config.path.font.source)
62
- //support for better error handling
63
- .pipe(plumber())
64
- .pipe(gulp.dest(config.path.build + config.path.release.destination + config.path.version + '/' +
65
- config.path.font.destination));
66
-
67
- });
68
-
69
- // ## Minify Markup Task
70
- // minify and copy markup files to deploy directory
71
- gulp.task('minifyMarkup', () => {
72
- return gulp.src(config.path.markup.destination)
73
- //support for better error handling
74
- .pipe(plumber())
75
- //minify
76
- .pipe(htmlmin({
77
- collapseWhitespace: true,
78
- minifyJS: true
79
- }))
80
- .pipe(gulp.dest(config.path.build));
81
-
82
- });
83
-
84
- // ## Copy Data Task
85
- // copy data dependency files to deploy directory
86
- gulp.task('copyData', () => {
87
- return gulp.src(config.path.data.sourceGlob)
88
- //support for better error handling
89
- .pipe(plumber())
90
- .pipe(gulp.dest(config.path.build + config.path.release.destination + config.path.version + '/' +
91
- config.path.data.destination));
92
-
93
- });
94
-
95
- // ## Sitemap Task
96
- // generate sitemap.xml
97
- gulp.task('sitemap', () => {
98
- return gulp.src(config.path.markup.destination)
99
- .pipe(sitemap({
100
- siteUrl: config.path.www
101
- }))
102
- .pipe(gulp.dest(config.path.build));
103
-
104
- });
105
-
106
- // ## Minify Style Task
107
- // minify and copy style files to deploy diretory
108
- gulp.task('minifyStyle', () => {
109
- return gulp.src(config.path.style.source.css)
110
- //support for better error handling
111
- .pipe(plumber())
112
- .pipe(sourcemaps.init())
113
- .pipe(cssnano({safe: true}))
114
- .pipe(sourcemaps.write('.'))
115
- .pipe(gulp.dest(config.path.build + config.path.release.destination + config.path.version + '/' +
116
- config.path.style.destination.release));
117
-
118
- });
119
-
120
- // ## Minify Script Task
121
- // minify and copy script files to deploy directory
122
- gulp.task('minifyScript', () => {
123
- return gulp.src(config.path.script.release)
124
- //support for better error handling
125
- .pipe(plumber())
126
- .pipe(sourcemaps.init())
127
- //remove console.log and alert
128
- .pipe(stripDebug())
129
- //minify
130
- .pipe(uglify())
131
- //write sourcemaps
132
- .pipe(sourcemaps.write('.'))
133
- .pipe(gulp.dest(config.path.build + config.path.release.destination + config.path.version + '/' +
134
- config.path.script.destination));
135
-
136
- });
137
-
138
- // ## Minify Image Task
139
- // minify and copy images to deploy directory
140
- gulp.task('minifyImage', () => {
141
- return gulp.src(config.path.image.source)
142
- //support for better error handling
143
- .pipe(plumber())
144
- //minify
145
- .pipe(imagemin({
146
- progressive: true,
147
- multipass: true,
148
- plugins: [
149
- {cleanupAttrs: true},
150
- {cleanupEnableBackground: true},
151
- {cleanupIDs: true},
152
- {cleanupNumericValues: true},
153
- {collapseGroup: true},
154
- {convertColors: true},
155
- {convertPathData: true},
156
- {convertShapeToPath: true},
157
- {convertStyleToAttrs: true},
158
- {convertTransform: true},
159
- {mergePaths: true},
160
- {moveElemsAttrsToGroup: true},
161
- {moveGroupAttrsToElems: true},
162
- {removeComments: true},
163
- {removeDoctype: true},
164
- {removeEditorsNSData: true},
165
- {removeEmptyAttrs: true},
166
- {removeEmptyContainers: true},
167
- {removeEmptyText: true},
168
- {removeHiddenElems: true},
169
- {removeMetadata: true},
170
- {removeNonInheritableGroupAttrs: true},
171
- {removeRasterImages: true},
172
- {removeTitle: true},
173
- {removeUnknownsAndDefaults: true},
174
- {removeUnusedNS: true},
175
- {removeUselessStrokeAndFill: true},
176
- {removeViewBox: true},
177
- {removeXMLProcInst: true},
178
- {sortAttrs: true},
179
- {transformsWithOnePath: true}
180
- ]
181
- }))
182
- .pipe(gulp.dest(config.path.build + config.path.release.destination + config.path.version + '/' +
183
- config.path.image.destination));
184
- });
185
-
186
- // ## CSS Size Report Task
187
- // check to see how big the files being created are
188
- gulp.task('sizeReportCSS', () => {
189
- return gulp.src(config.path.build + config.path.release.destination + config.path.version + '/' +
190
- config.path.style.destination.release + '/*.css')
191
- .pipe(sizereport({
192
- gzip: true,
193
- '*': {
194
- 'maxGzippedSize': 25000
195
- }
196
- }));
197
- });
198
-
199
- // ## JS Size Report Task
200
- // check to see how big the files being created are
201
- gulp.task('sizeReportJS', () => {
202
- return gulp.src(config.path.build + config.path.release.destination + config.path.version + '/' +
203
- config.path.script.destination + '/*.js')
204
- .pipe(sizereport({
205
- gzip: true,
206
- '*': {
207
- 'maxGzippedSize': 200000
208
- }
209
- }));
210
- });
211
-
212
- // ## Markup Size Report Task
213
- // check to see how big the files being created are
214
- gulp.task('sizeReportImage', () => {
215
- return gulp.src(config.path.build + config.path.release.destination + config.path.version + '/' +
216
- config.path.image.destination + '/**')
217
- .pipe(plumber())
218
- .pipe(sizereport({
219
- gzip: true,
220
- '*': {
221
- 'maxSize': 1000000,
222
- 'maxGzippedSize': 1000000
223
- }
224
- }));
225
- });
@@ -1,25 +0,0 @@
1
- 'use strict';
2
-
3
- // ## Load Modules
4
-
5
- const gulp = require('gulp');
6
- const jsdoc = require('gulp-jsdoc3');
7
-
8
- // ## Environment Config
9
-
10
- const config = require('../config');
11
- const jsdocConfig = require('../../jsdoc');
12
-
13
- // ## jsdoc Task
14
- // runs jsdoc
15
- gulp.task('jsdoc', (callback) => {
16
- gulp.src(config.path.script.all, {read: false})
17
- .pipe(jsdoc(jsdocConfig, callback));
18
- });
19
-
20
- // ## Documenation Task
21
- // documentation task runs unit testing coverage and also js documentation
22
- gulp.task('documentation', [
23
- 'jsdoc',
24
- 'unit'
25
- ]);