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
package/gulp/config.js DELETED
@@ -1,207 +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 generated html files
88
- destination: [
89
- 'app/**/*.html',
90
- '!app/assets/**',
91
- '!app/report/**',
92
- '!app/service/**'
93
- ]
94
- },
95
- // ### font
96
- font: {
97
- // glob of fonts
98
- source: 'app/assets/font/**',
99
- // where to save fonts
100
- destination: 'assets/font'
101
- },
102
- // ### script
103
- script: {
104
- // karma test runner conig file
105
- karma: __dirname + '/../karma.conf.js',
106
- // where to save out the modernizr built file
107
- modernizr: 'node_modules/modernizr/modernizr.js',
108
- // glob of all js files including gulp and application
109
- all: [
110
- '*.js',
111
- 'gulp/tasks/*.js',
112
- 'gulp/*.js',
113
- 'gulp/options/.js',
114
- 'app/assets/script/**',
115
- 'app/assets/test/spec/*.js',
116
- 'app/assets/test/*.js',
117
- '!app/assets/script/template/**',
118
- '!app/assets/script/*.compiled.js'
119
- ],
120
- // glob of only gulp js files for documentation task
121
- gulp: [
122
- '*.js',
123
- 'gulp/tasks/*.js',
124
- 'gulp/*.js'
125
- ],
126
- // glob of only application files for documentation task
127
- source: [
128
- 'app/assets/script/*.js',
129
- 'app/assets/script/**',
130
- '!app/assets/script/template/**',
131
- '!app/assets/script/*.compiled.js'
132
- ],
133
- // glob js files to be delployed duirng release
134
- release: 'app/assets/script/*.compiled.js',
135
- // file to be compliled by browserify
136
- compile: {
137
- source: 'app/assets/script/global.js',
138
- destination: 'app/assets/script',
139
- filename: 'global.compiled.js'
140
- },
141
- // where to save script files in release task
142
- destination: 'assets/script',
143
- // common libraries found when browserify builds entries
144
- entriesGlobal: 'app/assets/script/global.compiled.js',
145
- // browserify entries
146
- entries: 'app/assets/script/*.js'
147
- },
148
- // ### style
149
- style: {
150
- // scsslint config file
151
- scssLint: '.scss-lint.yml',
152
- source: {
153
- // glob of all scss files
154
- scss: [
155
- 'app/assets/style/*.scss',
156
- 'app/assets/style/**/*.scss'
157
- ],
158
- // glob of all css files
159
- css: [
160
- 'app/assets/style/*.css'
161
- ]
162
- },
163
- // where to save style files
164
- destination: {
165
- watch: 'app/assets/style',
166
- release: 'assets/style'
167
- }
168
- },
169
- // ### font
170
- data: {
171
- // where to save data returns glob
172
- sourceGlob: 'app/assets/data/**',
173
- // where to save data
174
- source: 'app/assets/data',
175
- // where to save data
176
- destination: 'assets/data',
177
- // global config data
178
- globalConfig: {
179
- 'www': www,
180
- 'cdn': cdn,
181
- 'service': service,
182
- 'version': version
183
- },
184
- // global config file name
185
- globalConfigFile: 'app/assets/data/config.json',
186
- pageDirectory: 'view/',
187
- pageDefaultData: 'global.json'
188
- },
189
- // ### release
190
- release: {
191
- destination: '/release/',
192
- copy: [
193
- 'app/sitemap.xml',
194
- 'app/robots.txt',
195
- 'app/favicon.ico'
196
- ]
197
- },
198
- // ### report
199
- report: {
200
- // where to save code complexity report
201
- source: 'app/report/**',
202
- destination: 'report'
203
- }
204
- }
205
- };
206
-
207
- })();
@@ -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,18 +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
- ['data'],
14
- ['markup', 'style', 'script', 'documentation'],
15
- ['accessibility'],
16
- callback
17
- );
18
- });
@@ -1,18 +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
- });
@@ -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,222 +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 uglify = require('gulp-uglify');
10
- const plumber = require('gulp-plumber');
11
- const sitemap = require('gulp-sitemap');
12
- const runSequence = require('run-sequence');
13
- const cssnano = require('gulp-cssnano');
14
- const sizereport = require('gulp-sizereport');
15
-
16
- // ## Environment Config
17
-
18
- const config = require('../config');
19
-
20
- // ## Release Task
21
- // release task dependent on tasks to do code quality checks and build documentation
22
-
23
- gulp.task('deploy', callback => {
24
- //runSequence support is only for gulp 3.x, 4.x natively support this functionalty
25
- return runSequence(
26
- ['cleanDeploy'],
27
- ['data'],
28
- ['markup', 'style', 'script', 'documentation'],
29
- ['accessibility'],
30
- ['copyRoot', 'copyReport', 'copyFonts', 'minifyMarkup', 'copyData', 'minifyStyle', 'minifyScript',
31
- 'minifyImage', 'sitemap'],
32
- ['sizeReportCSS', 'sizeReportJS', 'sizeReportImage'],
33
- callback
34
- );
35
- });
36
-
37
- // ## Copy Root Task
38
- // copy root dependency files to deploy directory
39
- gulp.task('copyRoot', () => {
40
- return gulp.src(config.path.release.copy)
41
- //support for better error handling
42
- .pipe(plumber())
43
- .pipe(gulp.dest(config.path.build));
44
-
45
- });
46
-
47
- // ## Copy Report Task
48
- // copy report dependency files to deploy directory
49
- gulp.task('copyReport', () => {
50
- return gulp.src(config.path.report.source)
51
- //support for better error handling
52
- .pipe(plumber())
53
- .pipe(gulp.dest(config.path.build + '/' + config.path.report.destination));
54
-
55
- });
56
-
57
- // ## Copy Fonts Task
58
- // copy Font dependency files to deploy directory
59
- gulp.task('copyFonts', () => {
60
- return gulp.src(config.path.font.source)
61
- //support for better error handling
62
- .pipe(plumber())
63
- .pipe(gulp.dest(config.path.build + config.path.release.destination + config.path.version + '/' +
64
- config.path.font.destination));
65
-
66
- });
67
-
68
- // ## Minify Markup Task
69
- // minify and copy markup files to deploy directory
70
- gulp.task('minifyMarkup', () => {
71
- return gulp.src(config.path.markup.destination)
72
- //support for better error handling
73
- .pipe(plumber())
74
- //minify
75
- .pipe(htmlmin({
76
- collapseWhitespace: true,
77
- minifyJS: true
78
- }))
79
- .pipe(gulp.dest(config.path.build));
80
-
81
- });
82
-
83
- // ## Copy Data Task
84
- // copy data dependency files to deploy directory
85
- gulp.task('copyData', () => {
86
- return gulp.src(config.path.data.sourceGlob)
87
- //support for better error handling
88
- .pipe(plumber())
89
- .pipe(gulp.dest(config.path.build + config.path.release.destination + config.path.version + '/' +
90
- config.path.data.destination));
91
-
92
- });
93
-
94
- // ## Sitemap Task
95
- // generate sitemap.xml
96
- gulp.task('sitemap', () => {
97
- return gulp.src(config.path.markup.destination)
98
- .pipe(sitemap({
99
- siteUrl: config.path.www
100
- }))
101
- .pipe(gulp.dest(config.path.build));
102
-
103
- });
104
-
105
- // ## Minify Style Task
106
- // minify and copy style files to deploy diretory
107
- gulp.task('minifyStyle', () => {
108
- return gulp.src(config.path.style.source.css)
109
- //support for better error handling
110
- .pipe(plumber())
111
- .pipe(sourcemaps.init())
112
- .pipe(cssnano({safe: true}))
113
- .pipe(sourcemaps.write('.'))
114
- .pipe(gulp.dest(config.path.build + config.path.release.destination + config.path.version + '/' +
115
- config.path.style.destination.release));
116
-
117
- });
118
-
119
- // ## Minify Script Task
120
- // minify and copy script files to deploy directory
121
- gulp.task('minifyScript', () => {
122
- return gulp.src(config.path.script.release)
123
- //support for better error handling
124
- .pipe(plumber())
125
- .pipe(sourcemaps.init())
126
- //minify
127
- .pipe(uglify())
128
- //write sourcemaps
129
- .pipe(sourcemaps.write('.'))
130
- .pipe(gulp.dest(config.path.build + config.path.release.destination + config.path.version + '/' +
131
- config.path.script.destination));
132
-
133
- });
134
-
135
- // ## Minify Image Task
136
- // minify and copy images to deploy directory
137
- gulp.task('minifyImage', () => {
138
- return gulp.src(config.path.image.source)
139
- //support for better error handling
140
- .pipe(plumber())
141
- //minify
142
- .pipe(imagemin({
143
- progressive: true,
144
- multipass: true,
145
- plugins: [
146
- {cleanupAttrs: true},
147
- {cleanupEnableBackground: true},
148
- {cleanupIDs: true},
149
- {cleanupNumericValues: true},
150
- {collapseGroup: true},
151
- {convertColors: true},
152
- {convertPathData: true},
153
- {convertShapeToPath: true},
154
- {convertStyleToAttrs: true},
155
- {convertTransform: true},
156
- {mergePaths: true},
157
- {moveElemsAttrsToGroup: true},
158
- {moveGroupAttrsToElems: true},
159
- {removeComments: true},
160
- {removeDoctype: true},
161
- {removeEditorsNSData: true},
162
- {removeEmptyAttrs: true},
163
- {removeEmptyContainers: true},
164
- {removeEmptyText: true},
165
- {removeHiddenElems: true},
166
- {removeMetadata: true},
167
- {removeNonInheritableGroupAttrs: true},
168
- {removeRasterImages: true},
169
- {removeTitle: true},
170
- {removeUnknownsAndDefaults: true},
171
- {removeUnusedNS: true},
172
- {removeUselessStrokeAndFill: true},
173
- {removeViewBox: true},
174
- {removeXMLProcInst: true},
175
- {sortAttrs: true},
176
- {transformsWithOnePath: true}
177
- ]
178
- }))
179
- .pipe(gulp.dest(config.path.build + config.path.release.destination + config.path.version + '/' +
180
- config.path.image.destination));
181
- });
182
-
183
- // ## CSS Size Report Task
184
- // check to see how big the files being created are
185
- gulp.task('sizeReportCSS', () => {
186
- return gulp.src(config.path.build + config.path.release.destination + config.path.version + '/' +
187
- config.path.style.destination.release + '/*.css')
188
- .pipe(sizereport({
189
- gzip: true,
190
- '*': {
191
- 'maxGzippedSize': 25000
192
- }
193
- }));
194
- });
195
-
196
- // ## JS Size Report Task
197
- // check to see how big the files being created are
198
- gulp.task('sizeReportJS', () => {
199
- return gulp.src(config.path.build + config.path.release.destination + config.path.version + '/' +
200
- config.path.script.destination + '/*.js')
201
- .pipe(sizereport({
202
- gzip: true,
203
- '*': {
204
- 'maxGzippedSize': 200000
205
- }
206
- }));
207
- });
208
-
209
- // ## Markup Size Report Task
210
- // check to see how big the files being created are
211
- gulp.task('sizeReportImage', () => {
212
- return gulp.src(config.path.build + config.path.release.destination + config.path.version + '/' +
213
- config.path.image.destination + '/**')
214
- .pipe(plumber())
215
- .pipe(sizereport({
216
- gzip: true,
217
- '*': {
218
- 'maxSize': 1000000,
219
- 'maxGzippedSize': 1000000
220
- }
221
- }));
222
- });
@@ -1,28 +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
- ], () => {
26
- 'use strict';
27
- return;
28
- });
@@ -1,26 +0,0 @@
1
- // ## Load Modules
2
-
3
- const gulp = require('gulp');
4
- const htmllint = require('gulp-htmllint');
5
- const plumber = require('gulp-plumber');
6
- const notify = require('gulp-notify');
7
-
8
- // ## Environment Config
9
-
10
- const config = require('../config');
11
-
12
- // ## Markup Task
13
- // create .html files written to app root
14
-
15
- gulp.task('markup', () => {
16
- 'use strict';
17
- //task
18
- return gulp.src(config.path.markup.destination)
19
- //support for better error handling
20
- .pipe(plumber())
21
- //validate markup
22
- .pipe(htmllint({
23
- config: config.path.markup.htmlLint
24
- }))
25
- .on('error', notify.onError('markup: <%= error.message %>'));
26
- });
@@ -1,92 +0,0 @@
1
- 'use strict';
2
-
3
- // ## Load Modules
4
-
5
- const gulp = require('gulp');
6
- const eslint = require('gulp-eslint');
7
- const plumber = require('gulp-plumber');
8
- const browserify = require('browserify');
9
- const notify = require('gulp-notify');
10
- const modernizr = require('modernizr');
11
- const fs = require('fs');
12
- const glob = require('glob');
13
-
14
- // ## Environment Config
15
-
16
- const config = require('../config');
17
-
18
- // ## Script Lint Task
19
- // make sure the code is all tidy
20
-
21
- gulp.task('scriptLint', () => {
22
-
23
- return gulp.src(config.path.script.all)
24
- //support for better error handling
25
- .pipe(plumber())
26
- //lint logic and code style
27
- .pipe(eslint())
28
- .pipe(eslint.format())
29
- .pipe(eslint.failAfterError())
30
- .on('error', notify.onError('scriptLint: <%= error.message %>'));
31
-
32
- });
33
-
34
- // ## Script Task
35
- // complile the modules together, first lint .js files, then build modernizr and compile clientside templates
36
-
37
- gulp.task('script', ['scriptLint', 'scriptModernizr'], callback => {
38
-
39
- const entries = [];
40
- const entriesDestination = [];
41
- const bundleFs = fs.createWriteStream(config.path.script.entriesGlobal);
42
-
43
- glob(config.path.script.entries, {}, (err, files) => {
44
-
45
- let i;
46
- for (i = 0; i < files.length; i++) {
47
- if (files[i].search('.compiled.js') === -1) {
48
- entries.push(files[i]);
49
- entriesDestination.push(files[i].replace('.js', '.compiled.js'));
50
- }
51
- }
52
-
53
- browserify({
54
- transform: [
55
- 'babelify'
56
- ],
57
- entries: entries,
58
- debug: (config.path.isProduction ? false : true),
59
- plugin: [['factor-bundle', {
60
- outputs: entriesDestination
61
- }]]
62
- })
63
- .bundle()
64
- .on('error', notify.onError('script: <%= error.message %>'))
65
- //support for better error handling
66
- .pipe(plumber())
67
- .pipe(bundleFs);
68
-
69
- // all done
70
- bundleFs.on('finish', function() {
71
- return callback();
72
- });
73
-
74
- });
75
-
76
- });
77
-
78
- // ## Script Modernizr Task
79
- // build modernizr for this project.
80
- // config example: https://github.com/Modernizr/Modernizr/blob/master/lib/config-all.json
81
-
82
- gulp.task('scriptModernizr', callback => {
83
-
84
- modernizr.build({
85
- 'feature-detects': [
86
- 'touchevents'
87
- ]
88
- }, file => {
89
- fs.writeFile(config.path.script.modernizr, file, callback);
90
- });
91
-
92
- });