js-build-tools 3.0.4 → 4.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 (213) hide show
  1. package/README.md +431 -691
  2. package/babel.config.js +1 -1
  3. package/dist/build.js +58 -59
  4. package/dist/build.min.js +1 -1
  5. package/dist/bundle.js +17 -12
  6. package/dist/bundle.min.js +1 -1
  7. package/dist/bundleLint.js +21 -17
  8. package/dist/bundleLint.min.js +1 -1
  9. package/dist/bundleMinify.js +14 -8
  10. package/dist/bundleMinify.min.js +1 -1
  11. package/dist/compileReadme.js +10 -13
  12. package/dist/compileReadme.min.js +1 -1
  13. package/dist/copyFonts.js +14 -8
  14. package/dist/copyFonts.min.js +1 -1
  15. package/dist/default.js +19 -15
  16. package/dist/default.min.js +1 -1
  17. package/dist/dist.js +10 -7
  18. package/dist/dist.min.js +1 -1
  19. package/dist/distLint.js +21 -17
  20. package/dist/distLint.min.js +1 -1
  21. package/dist/distMinify.js +14 -8
  22. package/dist/distMinify.min.js +1 -1
  23. package/dist/images.js +10 -7
  24. package/dist/images.min.js +1 -1
  25. package/dist/partials/addToReadme.js +19 -14
  26. package/dist/partials/beginWatcher.js +14 -10
  27. package/dist/partials/clean.js +17 -11
  28. package/dist/partials/copyFor.js +10 -10
  29. package/dist/partials/distFor.js +27 -17
  30. package/dist/partials/distForSrc.js +16 -10
  31. package/dist/partials/distSeries.js +24 -20
  32. package/dist/partials/imagesFor.js +27 -28
  33. package/dist/partials/minifyFor.js +17 -16
  34. package/dist/partials/readmeTemplate.js +16 -12
  35. package/dist/partials/removeDirectory.js +12 -12
  36. package/dist/partials/runOnChange.js +30 -28
  37. package/dist/partials/sassFor.js +28 -21
  38. package/dist/partials/tsFor.js +24 -21
  39. package/dist/partials.js +103 -41
  40. package/dist/partials.min.js +1 -1
  41. package/dist/sass.js +10 -7
  42. package/dist/sass.min.js +1 -1
  43. package/dist/test-helpers/setUp.js +68 -65
  44. package/dist/testFull.js +22 -17
  45. package/dist/testFull.min.js +1 -1
  46. package/dist/testHelpers.js +11 -15
  47. package/dist/testHelpers.min.js +1 -1
  48. package/dist/testQuick.js +24 -19
  49. package/dist/testQuick.min.js +1 -1
  50. package/dist/typeScript.js +9 -7
  51. package/dist/typeScript.min.js +1 -1
  52. package/dist/utilities/dotGet.js +45 -43
  53. package/dist/utilities/dotNotate.js +53 -51
  54. package/dist/utilities/dotSet.js +39 -37
  55. package/dist/utilities/isObject.js +9 -5
  56. package/dist/utilities/strAfter.js +18 -14
  57. package/dist/utilities/strBefore.js +18 -14
  58. package/dist/watchFull.js +10 -10
  59. package/dist/watchFull.min.js +1 -1
  60. package/dist/watchTest.js +17 -13
  61. package/dist/watchTest.min.js +1 -1
  62. package/functions/{build.js → build.mjs} +14 -16
  63. package/functions/{build.test.js → build.test.mjs} +9 -8
  64. package/functions/{bundle.js → bundle.mjs} +5 -7
  65. package/functions/{bundle.test.js → bundle.test.mjs} +5 -4
  66. package/functions/{bundleLint.js → bundleLint.mjs} +4 -6
  67. package/functions/{bundleLint.test.js → bundleLint.test.mjs} +5 -4
  68. package/functions/bundleMinify.mjs +9 -0
  69. package/functions/bundleMinify.test.mjs +15 -0
  70. package/functions/compileReadme.mjs +9 -0
  71. package/functions/{compileReadme.test.js → compileReadme.test.mjs} +4 -4
  72. package/functions/copyFonts.mjs +9 -0
  73. package/functions/{copyFonts.test.js → copyFonts.test.mjs} +4 -3
  74. package/functions/default.mjs +12 -0
  75. package/functions/{default.test.js → default.test.mjs} +8 -7
  76. package/functions/{dist.js → dist.mjs} +2 -4
  77. package/functions/{dist.test.js → dist.test.mjs} +4 -3
  78. package/functions/{distLint.js → distLint.mjs} +4 -6
  79. package/functions/{distLint.test.js → distLint.test.mjs} +5 -4
  80. package/functions/distMinify.mjs +9 -0
  81. package/functions/distMinify.test.mjs +15 -0
  82. package/functions/{images.js → images.mjs} +2 -4
  83. package/functions/{images.test.js → images.test.mjs} +4 -3
  84. package/functions/partials/{addToReadme.js → addToReadme.mjs} +5 -7
  85. package/functions/partials/{addToReadme.test.js → addToReadme.test.mjs} +4 -3
  86. package/functions/partials/beginWatcher.mjs +9 -0
  87. package/functions/partials/{beginWatcher.test.js → beginWatcher.test.mjs} +4 -3
  88. package/functions/partials/clean.mjs +13 -0
  89. package/functions/partials/{clean.test.js → clean.test.mjs} +4 -3
  90. package/functions/partials/{copyFor.js → copyFor.mjs} +2 -4
  91. package/functions/partials/{copyFor.test.js → copyFor.test.mjs} +4 -3
  92. package/functions/partials/distFor.mjs +22 -0
  93. package/functions/partials/{distFor.test.js → distFor.test.mjs} +49 -8
  94. package/functions/partials/{distForSrc.js → distForSrc.mjs} +2 -4
  95. package/functions/partials/{distForSrc.test.js → distForSrc.test.mjs} +3 -2
  96. package/functions/partials/{distSeries.js → distSeries.mjs} +6 -8
  97. package/functions/partials/{distSeries.test.js → distSeries.test.mjs} +7 -6
  98. package/functions/partials/{imagesFor.js → imagesFor.mjs} +5 -13
  99. package/functions/partials/{imagesFor.test.js → imagesFor.test.mjs} +4 -3
  100. package/functions/partials/minifyFor.mjs +15 -0
  101. package/functions/partials/{minifyFor.test.js → minifyFor.test.mjs} +5 -4
  102. package/functions/partials/readmeTemplate.mjs +12 -0
  103. package/functions/partials/{readmeTemplate.test.js → readmeTemplate.test.mjs} +4 -3
  104. package/functions/partials/{removeDirectory.js → removeDirectory.mjs} +2 -4
  105. package/functions/partials/{removeDirectory.test.js → removeDirectory.test.mjs} +28 -28
  106. package/functions/partials/{runOnChange.js → runOnChange.mjs} +6 -8
  107. package/functions/partials/{runOnChange.test.js → runOnChange.test.mjs} +12 -11
  108. package/functions/partials/sassFor.mjs +22 -0
  109. package/functions/partials/{sassFor.test.js → sassFor.test.mjs} +5 -4
  110. package/functions/partials/{tsFor.js → tsFor.mjs} +4 -6
  111. package/functions/partials/{tsFor.test.js → tsFor.test.mjs} +5 -4
  112. package/functions/partials.mjs +23 -0
  113. package/functions/{partials.test.js → partials.test.mjs} +1 -1
  114. package/functions/sass.mjs +4 -0
  115. package/functions/{sass.test.js → sass.test.mjs} +4 -3
  116. package/functions/test-helpers/{setUp.js → setUp.mjs} +25 -27
  117. package/functions/test-helpers/setUp.test.mjs +19 -0
  118. package/functions/{testFull.js → testFull.mjs} +4 -6
  119. package/functions/testFull.test.mjs +17 -0
  120. package/functions/{testHelpers.js → testHelpers.mjs} +1 -6
  121. package/functions/testHelpers.test.mjs +7 -0
  122. package/functions/{testQuick.js → testQuick.mjs} +4 -6
  123. package/functions/testQuick.test.mjs +17 -0
  124. package/functions/{typeScript.js → typeScript.mjs} +2 -4
  125. package/functions/typeScript.test.mjs +11 -0
  126. package/functions/utilities/{dotGet.js → dotGet.mjs} +4 -6
  127. package/functions/utilities/{dotNotate.js → dotNotate.mjs} +2 -4
  128. package/functions/utilities/{dotSet.js → dotSet.mjs} +4 -6
  129. package/functions/utilities/{isObject.js → isObject.mjs} +1 -3
  130. package/functions/utilities/{strAfter.js → strAfter.mjs} +11 -13
  131. package/functions/utilities/{strBefore.js → strBefore.mjs} +11 -13
  132. package/functions/{watchFull.js → watchFull.mjs} +2 -4
  133. package/functions/{watchFull.test.js → watchFull.test.mjs} +8 -7
  134. package/functions/watchTest.mjs +10 -0
  135. package/functions/{watchTest.test.js → watchTest.test.mjs} +7 -6
  136. package/gulp.config.js +20 -19
  137. package/gulp.config.mjs +252 -0
  138. package/gulpfile.base.js +20 -20
  139. package/gulpfile.base.mjs +27 -0
  140. package/package.json +19 -13
  141. package/functions/bundleMinify.js +0 -11
  142. package/functions/bundleMinify.test.js +0 -14
  143. package/functions/compileReadme.js +0 -11
  144. package/functions/copyFonts.js +0 -11
  145. package/functions/default.js +0 -14
  146. package/functions/distMinify.js +0 -11
  147. package/functions/distMinify.test.js +0 -14
  148. package/functions/partials/beginWatcher.js +0 -11
  149. package/functions/partials/clean.js +0 -15
  150. package/functions/partials/distFor.js +0 -17
  151. package/functions/partials/minifyFor.js +0 -15
  152. package/functions/partials/readmeTemplate.js +0 -14
  153. package/functions/partials/sassFor.js +0 -21
  154. package/functions/partials.js +0 -40
  155. package/functions/sass.js +0 -6
  156. package/functions/test-helpers/setUp.test.js +0 -18
  157. package/functions/testFull.test.js +0 -16
  158. package/functions/testHelpers.test.js +0 -7
  159. package/functions/testQuick.test.js +0 -16
  160. package/functions/typeScript.test.js +0 -10
  161. package/functions/watchTest.js +0 -12
  162. package/vendor/array-union/index.js +0 -31
  163. package/vendor/easy-transform-stream/index.js +0 -54
  164. package/vendor/globby/gitignore.js +0 -96
  165. package/vendor/globby/index.js +0 -191
  166. package/vendor/globby/node_modules/slash/index.js +0 -16
  167. package/vendor/globby/stream-utils.js +0 -58
  168. package/vendor/globby/to-path.js +0 -20
  169. package/vendor/gulp-imagemin/index.js +0 -124
  170. package/vendor/gulp-imagemin/node_modules/chalk/source/index.js +0 -265
  171. package/vendor/gulp-imagemin/node_modules/chalk/source/utilities.js +0 -36
  172. package/vendor/gulp-imagemin/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -217
  173. package/vendor/gulp-imagemin/node_modules/chalk/source/vendor/supports-color/index.js +0 -154
  174. package/vendor/gulp-plugin-extras/index.js +0 -42
  175. package/vendor/gulp-plugin-extras/node_modules/chalk/source/index.js +0 -265
  176. package/vendor/gulp-plugin-extras/node_modules/chalk/source/utilities.js +0 -36
  177. package/vendor/gulp-plugin-extras/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -217
  178. package/vendor/gulp-plugin-extras/node_modules/chalk/source/vendor/supports-color/index.js +0 -154
  179. package/vendor/gulp-plugin-extras/plugin-error.js +0 -145
  180. package/vendor/ignore/index.js +0 -468
  181. package/vendor/imagemin/index.js +0 -90
  182. package/vendor/imagemin-gifsicle/index.js +0 -33
  183. package/vendor/imagemin-mozjpeg/index.js +0 -100
  184. package/vendor/imagemin-mozjpeg/node_modules/execa/index.js +0 -260
  185. package/vendor/imagemin-mozjpeg/node_modules/execa/lib/command.js +0 -47
  186. package/vendor/imagemin-mozjpeg/node_modules/execa/lib/error.js +0 -102
  187. package/vendor/imagemin-mozjpeg/node_modules/execa/lib/kill.js +0 -123
  188. package/vendor/imagemin-mozjpeg/node_modules/execa/lib/promise.js +0 -47
  189. package/vendor/imagemin-mozjpeg/node_modules/execa/lib/stdio.js +0 -50
  190. package/vendor/imagemin-mozjpeg/node_modules/execa/lib/stream.js +0 -124
  191. package/vendor/imagemin-mozjpeg/node_modules/human-signals/build/src/core.js +0 -238
  192. package/vendor/imagemin-mozjpeg/node_modules/human-signals/build/src/main.js +0 -89
  193. package/vendor/imagemin-mozjpeg/node_modules/human-signals/build/src/realtime.js +0 -24
  194. package/vendor/imagemin-mozjpeg/node_modules/human-signals/build/src/signals.js +0 -44
  195. package/vendor/imagemin-mozjpeg/node_modules/is-stream/index.js +0 -25
  196. package/vendor/imagemin-mozjpeg/node_modules/mimic-fn/index.js +0 -70
  197. package/vendor/imagemin-mozjpeg/node_modules/npm-run-path/index.js +0 -52
  198. package/vendor/imagemin-mozjpeg/node_modules/onetime/index.js +0 -43
  199. package/vendor/imagemin-mozjpeg/node_modules/path-key/index.js +0 -20
  200. package/vendor/imagemin-mozjpeg/node_modules/strip-final-newline/index.js +0 -17
  201. package/vendor/imagemin-optipng/index.js +0 -44
  202. package/vendor/imagemin-svgo/index.js +0 -27
  203. package/vendor/is-jpg/index.js +0 -12
  204. package/vendor/junk/index.js +0 -49
  205. package/vendor/mozjpeg/index.js +0 -9
  206. package/vendor/mozjpeg/lib/index.js +0 -18
  207. package/vendor/mozjpeg/package.json +0 -49
  208. package/vendor/mozjpeg/vendor/cjpeg +0 -0
  209. package/vendor/mozjpeg/vendor/source/mozjpeg.tar.gz +0 -0
  210. package/vendor/p-pipe/index.js +0 -22
  211. package/vendor/plur/index.js +0 -32
  212. package/vendor/pretty-bytes/index.js +0 -71
  213. package/vendor/slash/index.js +0 -12
package/README.md CHANGED
@@ -22,92 +22,99 @@ of `node_modules/.bin/gulp`.
22
22
 
23
23
  ## Configuration
24
24
 
25
- In your project's root directory, create a `build-tools.config.js` file. This can contain any of the following (values
25
+ In your project's root directory, create a `build-tools.config.json` file. This can contain any of the following (values
26
26
  provided are the defaults):
27
27
 
28
- ```js
29
- module.exports = {
30
- browser: {
28
+ ```json
29
+ {
30
+ "browser": {
31
31
  // 'true' to generate browser bundled files; 'false' for node environment only
32
- enabled: true,
32
+ "enabled": true,
33
33
  // The name to use for the browser-bundled output file (.js will be appended).
34
- name: 'my-package',
34
+ "name": "my-package",
35
35
  // The search pattern used for retrieving compiled distribution files.
36
- from: 'dist/**/*.js',
36
+ "from": "dist/**/*.js",
37
37
  // The output directory for browser-bundled files.
38
- to: 'browser',
38
+ "to": "browser"
39
39
  },
40
40
  // The paths for directories to delete before build.
41
- cleanPaths: ['dist', 'browser'],
42
- dist: {
41
+ "cleanPaths": [
42
+ "dist",
43
+ "browser"
44
+ ],
45
+ "dist": {
43
46
  // Name of the entry the distribution file.
44
- main: 'dist/main',
47
+ "main": "dist/main",
45
48
  // The search pattern used for gathering source files for distribution.
46
- from: 'src/**/!(*.test).js',
49
+ "from": "src/**/!(*.test).js",
47
50
  // The output directory for the distribution files.
48
- to: 'dist',
51
+ "to": "dist"
49
52
  },
50
- fonts: {
53
+ "fonts": {
51
54
  // Toggle copy directory of fonts on
52
- enabled: false,
55
+ "enabled": false,
53
56
  // Path to search for fonts
54
- from: 'src/fonts/**/*',
57
+ "from": "src/fonts/**/*",
55
58
  // Path to output fonts
56
- to: 'browser/fonts',
59
+ "to": "browser/fonts"
57
60
  },
58
- images: {
61
+ "images": {
59
62
  // Toggle image minify and copy process
60
- enabled: false,
63
+ "enabled": false,
61
64
  // Path to search for images
62
- from: 'src/img/**/*.+(png|jpg|jpeg|gif|svg)',
65
+ "from": "src/img/**/*.+(png|jpg|jpeg|gif|svg)",
63
66
  // Path to output images
64
- to: 'browser/img',
67
+ "to": "browser/img"
65
68
  },
66
- readme: {
69
+ "readme": {
67
70
  // The file which will be pre-fixed to your README.md output.
68
- template: 'MAIN.md',
71
+ "template": "MAIN.md",
69
72
  // Options for formatting the output readme.
70
- options: 'utf8',
73
+ "options": "utf8",
71
74
  // The name of the output documentation markdown file.
72
- file: 'README.md',
75
+ "file": "README.md",
73
76
  // Location of files to use for compiling documentation into the readme.
74
- from: ['gulpfile.base.js', 'gulp.config.js', 'functions/**/!(*.test).js'],
77
+ "from": [
78
+ "src/**/!(*.test).js"
79
+ ],
75
80
  // The directory to output the readme file in.
76
- to: './'
81
+ "to": "./"
77
82
  },
78
83
  // Base directory of the project.
79
- rootPath: './',
80
- sass: {
84
+ "rootPath": "./",
85
+ "sass": {
81
86
  // Toggle SASS to CSS process on.
82
- enabled: false,
87
+ "enabled": false,
83
88
  // The pattern for finding all sass files.
84
- from: 'sass/**/*.+(scss|sass)',
89
+ "from": "sass/**/*.+(scss|sass)",
85
90
  // The directory were sass files will be stored.
86
- path: 'sass',
91
+ "path": "sass",
87
92
  // The destination path for where generated CSS (from SASS files) should go.
88
- to: 'browser/css',
93
+ "to": "browser/css"
89
94
  },
90
95
  // The directory where your source files are stored (the files you manually created).
91
- srcPath: 'src',
92
- test: {
96
+ "srcPath": "src",
97
+ "test": {
93
98
  // Additional flags for programmatically running Jest Cli.
94
- options: null,
99
+ "options": null,
95
100
  // The directory where Jest test files are stored.
96
101
  // By default, stored as *.test.js adjacent to the files they are testing.
97
- path: ['src'],
102
+ "path": [
103
+ "src"
104
+ ],
98
105
  // The search pattern for watching files for changes.
99
- watch: 'src/**/*.js'
106
+ "watch": "src/**/*.js"
100
107
  },
101
- typescript: {
108
+ "typescript": {
102
109
  // The path the tsconfig file for running typescript or false if no ts file given.
103
- config: false,
110
+ "config": false,
104
111
  // Toggle usage of typescript parsing.
105
- enabled: false,
112
+ "enabled": false,
106
113
  // Pattern for finding the TypeScript files.
107
- from: 'src/**/*.ts',
114
+ "from": "src/**/*.ts",
108
115
  // Directory where parsed typescript files go.
109
- to: 'dist',
110
- },
116
+ "to": "dist"
117
+ }
111
118
  }
112
119
  ```
113
120
 
@@ -116,6 +123,8 @@ module.exports = {
116
123
  In your project's root directory, create a `gulpfile.js` file, in here you can require any of the functions you need.
117
124
  For example:
118
125
 
126
+ #### Common JS
127
+
119
128
  ```js
120
129
  // Your local gulpfile.js
121
130
  const {
@@ -144,6 +153,29 @@ exports.watchFull = watchFull
144
153
  exports.watchTest = watchTest
145
154
  ```
146
155
 
156
+ #### ES Module
157
+
158
+ ```js
159
+ // Your local gulpfile.mjs
160
+ // Everything you export will be created as a gulp task.
161
+ export {
162
+ build,
163
+ defaultCmd,
164
+ partials,
165
+ readme,
166
+ sass,
167
+ testFull,
168
+ testQuick,
169
+ typescript,
170
+ watchFull,
171
+ watchTest
172
+ } from 'js-build-tools'
173
+
174
+ // You can build your own tasks here as well by using some of the functions `js-build-tools/functions`.
175
+ // You can list your available tasks by running `gulp --tasks`.
176
+
177
+ ```
178
+
147
179
  Verify your tasks are available by running `gulp --tasks`.
148
180
 
149
181
  ### Configure Babel
@@ -159,6 +191,60 @@ const babelConfig = require('js-build-tools/babel.config')
159
191
  module.exports = babelConfig
160
192
  ```
161
193
 
194
+ ### Configure ES Modules (.mjs)
195
+
196
+ It is not recommended to use `"type": "module"` in the `package.json` to enable ES Modules.
197
+ This is because some dependencies still rely on common JS syntax (ex: babel, jest, jsdoc).
198
+ So, to use ES Modules, you can use the `.mjs` extension on your files instead.
199
+ There are different downsides to using the `.mjs` extension to consider.
200
+ The `jsdoc` generation can only read `.js` files, and the provided test runner `Jest` will need to be configured.
201
+ Update the test config as follows:
202
+
203
+ ```json
204
+ {
205
+ "dist": {
206
+ // Use .mjs files for from and main
207
+ "main": "src/main.mjs",
208
+ "from": "src/**/!(*.test).mjs",
209
+ "to": "dist"
210
+ },
211
+ "readme": {
212
+ "template": "MAIN.md",
213
+ "options": "utf8",
214
+ "toFile": "README.md",
215
+ "from": [
216
+ // Use the dist directory files to generate the jsdocs
217
+ "dist/!(*.test).js"
218
+ ],
219
+ "to": "./"
220
+ },
221
+ "test": {
222
+ "options": {
223
+ // The below helps to find the .mjs files (rather than default .js files)
224
+ "testMatch": [
225
+ "**/?(*.)+(spec|test).mjs?(x)"
226
+ ]
227
+ },
228
+ "path": "functions",
229
+ // Include watching for .mjs files
230
+ "watch": "functions/**/*.[cm]?[jt]s"
231
+ }
232
+ }
233
+ ```
234
+
235
+ There is an additional file you need to get Jest working, add a `jest.config.js` file.
236
+ While we have already added these configurations above in the "options",
237
+ there seems to be a bug where the "transform" does not work in that context. Add the following to your `jest.config.js`:
238
+
239
+ ```js
240
+ module.exports = {
241
+ // The transform will instruct jest to run the files through babel so it can interpret them
242
+ transform: {
243
+ '^.+\\.[cm]?[jt]sx?$': 'babel-jest'
244
+ }
245
+ }
246
+ ```
247
+
162
248
  ### Configure HTML JS Documentation (optional)
163
249
 
164
250
  It may be desirable to generate HTML documentation for your JS files.
@@ -186,17 +272,17 @@ module.exports = jsDocBase
186
272
 
187
273
  Be able to copy a source directory of fonts into the distribution path.
188
274
 
189
- Add the following to the exports in your `build-tools.config.js`:
275
+ Add the following to the exports in your `build-tools.config.json`:
190
276
 
191
- ```js
192
- module.exports = {
193
- fonts: {
277
+ ```json
278
+ {
279
+ "fonts": {
194
280
  // Enable fonts process
195
- enabled: false,
281
+ "enabled": false,
196
282
  // Search pattern to find your font files
197
- from: 'src/fonts/**/*',
283
+ "from": "src/fonts/**/*",
198
284
  // Output directory for your font files
199
- to: 'browser/fonts',
285
+ "to": "browser/fonts"
200
286
  }
201
287
  }
202
288
  ```
@@ -205,17 +291,17 @@ module.exports = {
205
291
 
206
292
  Be able to copy and reduce the file size of images into an output path.
207
293
 
208
- Add the following to the exports in your `build-tools.config.js`:
294
+ Add the following to the exports in your `build-tools.config.json`:
209
295
 
210
- ```js
211
- module.exports = {
212
- images: {
296
+ ```json
297
+ {
298
+ "images": {
213
299
  // Enable image process
214
- enabled: false,
300
+ "enabled": false,
215
301
  // Search pattern to find your images
216
- from: 'src/img/**/*.+(png|jpg|jpeg|gif|svg)',
302
+ "from": "src/img/**/*.+(png|jpg|jpeg|gif|svg)",
217
303
  // Output directory for your images files
218
- to: 'browser/img',
304
+ "to": "browser/img"
219
305
  }
220
306
  }
221
307
  ```
@@ -224,19 +310,19 @@ module.exports = {
224
310
 
225
311
  SASS support is built-in, this enables conversion of SASS files to CSS for web projects.
226
312
 
227
- Add the following to the exports in your `build-tools.config.js`:
313
+ Add the following to the exports in your `build-tools.config.json`:
228
314
 
229
- ```js
230
- module.exports = {
231
- sass: {
315
+ ```json
316
+ {
317
+ "sass": {
232
318
  // Enable SASS process
233
- enabled: false,
319
+ "enabled": false,
234
320
  // Search pattern to find your SASS files (the below would be files ending in .scss or .sass in a directory called 'sass')
235
- from: 'sass/**/*.+(scss|sass)',
321
+ "from": "sass/**/*.+(scss|sass)",
236
322
  // Optional but nice to add (future support), add the directory where your sass files exist
237
- path: 'sass',
323
+ "path": "sass",
238
324
  // Output directory for your compiled css files, recommend css directory within your browser output directory
239
- to: 'browser/css',
325
+ "to": "browser/css"
240
326
  }
241
327
  }
242
328
  ```
@@ -260,27 +346,27 @@ Create a `tsconfig.json` file in your project root with the following:
260
346
  ```
261
347
 
262
348
  The pattern for `"files"` should match your .ts files, but the essential thing is that it is wrapped in an array.
263
- The actual pattern used comes from `build-tools.config.js` as `'typescript.from'` setting.
349
+ The actual pattern used comes from `build-tools.config.json` as `'typescript.from'` setting.
264
350
  To create the ts declaration files, you must add the `"declaration": true`.
265
351
 
266
- Add the following to the exports in your `build-tools.config.js`:
352
+ Add the following to the exports in your `build-tools.config.json`:
267
353
 
268
- ```js
269
- module.exports = {
270
- readme: {
354
+ ```json
355
+ {
356
+ "readme": {
271
357
  // Location of files to use for compiling documentation into the readme.
272
- from: 'dist/**/!(*.min).js',
358
+ "from": "dist/**/!(*.min).js"
273
359
  },
274
- typescript: {
360
+ "typescript": {
275
361
  // The path the tsconfig file for running typescript or false if no ts file given.
276
- config: 'tsconfig.json',
362
+ "config": "tsconfig.json",
277
363
  // Toggle usage of typescript parsing
278
- enabled: true,
364
+ "enabled": true,
279
365
  // Pattern for finding the TypeScript files
280
- from: 'src/**/*.ts',
366
+ "from": "src/**/*.ts",
281
367
  // Directory where parsed typescript files go
282
- to: 'dist',
283
- },
368
+ "to": "dist"
369
+ }
284
370
  }
285
371
  ```
286
372
 
@@ -322,616 +408,270 @@ Run any of the above commands with `gulp` or `npm run`.
322
408
 
323
409
  # Available functions documentation
324
410
 
325
- ## Modules
326
-
327
- <dl>
328
- <dt><a href="#module_js-build-tools">js-build-tools</a></dt>
329
- <dd><p>Export these functions to your own project in order to customize your build pipeline.</p>
330
- </dd>
331
- <dt><a href="#module_gulpConfig">gulpConfig</a></dt>
332
- <dd><p>Modify these configurations to match your project specifications.</p>
333
- </dd>
334
- <dt><a href="#module_testHelpers">testHelpers</a></dt>
335
- <dd><p>Export the setUp helper.</p>
336
- </dd>
337
- <dt><a href="#module_partials">partials</a></dt>
338
- <dd><p>Micro-functions used as components for the main gulp functions.</p>
339
- </dd>
340
- </dl>
341
-
342
- <a name="module_js-build-tools"></a>
343
-
344
- ## js-build-tools
345
- Export these functions to your own project in order to customize your build pipeline.
346
-
347
- **Version**: 3.0.0
348
- **Author**: Joshua Heagle <joshuaheagle@gmail.com>
349
-
350
- * [js-build-tools](#module_js-build-tools)
351
- * [.typeScript](#module_js-build-tools.typeScript) ⇒ <code>function</code>
352
- * [.compileReadme](#module_js-build-tools.compileReadme) ⇒ <code>stream.Stream</code>
353
- * [.watchTest()](#module_js-build-tools.watchTest) ⇒ <code>\*</code>
354
- * [.watchFull()](#module_js-build-tools.watchFull) ⇒ <code>FSWatcher</code>
355
- * [.testQuick()](#module_js-build-tools.testQuick) ⇒ <code>Promise.&lt;\*&gt;</code>
356
- * [.testFull()](#module_js-build-tools.testFull) ⇒ <code>Promise.&lt;\*&gt;</code>
357
- * [.images()](#module_js-build-tools.images) ⇒ <code>stream.Stream</code>
358
- * [.distMinify()](#module_js-build-tools.distMinify) ⇒ <code>\*</code>
359
- * [.distLint()](#module_js-build-tools.distLint) ⇒ <code>\*</code>
360
- * [.dist()](#module_js-build-tools.dist) ⇒ <code>\*</code>
361
- * [.defaultCmd([done])](#module_js-build-tools.defaultCmd) ⇒ <code>stream.Stream</code>
362
- * [.copyFonts()](#module_js-build-tools.copyFonts) ⇒ <code>stream.Stream</code>
363
- * [.bundleMinify()](#module_js-build-tools.bundleMinify) ⇒ <code>\*</code>
364
- * [.bundleLint()](#module_js-build-tools.bundleLint) ⇒ <code>stream.Stream</code>
365
- * [.bundle()](#module_js-build-tools.bundle) ⇒ <code>stream.Stream</code>
366
- * [.build()](#module_js-build-tools.build) ⇒ <code>stream.Stream</code>
367
-
368
- <a name="module_js-build-tools.typeScript"></a>
369
-
370
- ### js-build-tools.typeScript ⇒ <code>function</code>
371
- Simplified typescript task using tsFor.
372
-
373
- **Kind**: static constant of [<code>js-build-tools</code>](#module_js-build-tools)
374
- <a name="module_js-build-tools.compileReadme"></a>
375
-
376
- ### js-build-tools.compileReadme ⇒ <code>stream.Stream</code>
377
- Generate the README.md file based off of the template, then append the generated documentation.
378
-
379
- **Kind**: static constant of [<code>js-build-tools</code>](#module_js-build-tools)
380
- <a name="module_js-build-tools.watchTest"></a>
381
-
382
- ### js-build-tools.watchTest() ⇒ <code>\*</code>
383
- Watch for changes and run the tests.
384
-
385
- **Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
386
- <a name="module_js-build-tools.watchFull"></a>
387
-
388
- ### js-build-tools.watchFull() ⇒ <code>FSWatcher</code>
389
- Watch for changes and run the distribution for the changed files, then bundle and test the changed files.
390
-
391
- **Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
392
- <a name="module_js-build-tools.testQuick"></a>
393
-
394
- ### js-build-tools.testQuick() ⇒ <code>Promise.&lt;\*&gt;</code>
395
- Run the Jest tests for files which have been modified (based on git status).
396
-
397
- **Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
398
- <a name="module_js-build-tools.testFull"></a>
399
-
400
- ### js-build-tools.testFull() ⇒ <code>Promise.&lt;\*&gt;</code>
401
- Run all tests with jest.
402
-
403
- **Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
404
- <a name="module_js-build-tools.images"></a>
405
-
406
- ### js-build-tools.images() ⇒ <code>stream.Stream</code>
407
- Move and optimize the images into the browser folder using configured settings.
408
-
409
- **Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
410
- <a name="module_js-build-tools.distMinify"></a>
411
-
412
- ### js-build-tools.distMinify() ⇒ <code>\*</code>
413
- Creates minified versions of the dist files.
414
-
415
- **Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
416
- <a name="module_js-build-tools.distLint"></a>
417
-
418
- ### js-build-tools.distLint() ⇒ <code>\*</code>
419
- Applies Standard code style linting to distribution files.
420
-
421
- **Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
422
- <a name="module_js-build-tools.dist"></a>
423
-
424
- ### js-build-tools.dist() ⇒ <code>\*</code>
425
- Simplified distribution tasks which will use arguments from distFor.
426
-
427
- **Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
428
- <a name="module_js-build-tools.defaultCmd"></a>
429
-
430
- ### js-build-tools.defaultCmd([done]) ⇒ <code>stream.Stream</code>
431
- Recommended as the default task, runs the simple dist and bundle tasks.
432
-
433
- **Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
434
-
435
- | Param | Type | Default |
436
- | --- | --- | --- |
437
- | [done] | <code>function</code> | <code></code> |
438
-
439
- <a name="module_js-build-tools.copyFonts"></a>
440
-
441
- ### js-build-tools.copyFonts() ⇒ <code>stream.Stream</code>
442
- Move the font files into the browser directory.
443
-
444
- **Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
445
- <a name="module_js-build-tools.bundleMinify"></a>
446
-
447
- ### js-build-tools.bundleMinify() ⇒ <code>\*</code>
448
- Creates the minified bundle file.
449
-
450
- **Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
451
- <a name="module_js-build-tools.bundleLint"></a>
452
-
453
- ### js-build-tools.bundleLint() ⇒ <code>stream.Stream</code>
454
- Applies Standard code style linting to bundled file.
455
-
456
- **Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
457
- <a name="module_js-build-tools.bundle"></a>
458
-
459
- ### js-build-tools.bundle() ⇒ <code>stream.Stream</code>
460
- Starting at the distribution entry point, bundle all the files into a single file and store them in the specified output directory.
461
-
462
- **Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
463
- <a name="module_js-build-tools.build"></a>
464
-
465
- ### js-build-tools.build() ⇒ <code>stream.Stream</code>
466
- Runs several processes to build and validate the project.
467
-
468
- **Kind**: static method of [<code>js-build-tools</code>](#module_js-build-tools)
469
- <a name="module_gulpConfig"></a>
470
-
471
- ## gulpConfig
472
- Modify these configurations to match your project specifications.
473
-
474
- **Version**: 3.0.0
475
- **Author**: Joshua Heagle <joshuaheagle@gmail.com>
476
-
477
- * [gulpConfig](#module_gulpConfig)
478
- * _static_
479
- * [.get(path, defaultValue)](#module_gulpConfig.get) ⇒ <code>\*</code> \| <code>null</code>
480
- * [.set(path, value)](#module_gulpConfig.set) ⇒ <code>\*</code>
481
- * _inner_
482
- * [~ArrayableSetting](#module_gulpConfig..ArrayableSetting) : <code>Array.&lt;string&gt;</code> \| <code>string</code>
483
- * [~BooleanSetting](#module_gulpConfig..BooleanSetting) : <code>boolean</code>
484
- * [~FlagStringSetting](#module_gulpConfig..FlagStringSetting) : <code>false</code> \| <code>StringSetting</code>
485
- * [~FlagsSetting](#module_gulpConfig..FlagsSetting) : <code>Object.&lt;string, BooleanSetting&gt;</code>
486
- * [~JestTestFlags](#module_gulpConfig..JestTestFlags) : <code>FlagsSetting</code>
487
- * [~StringSetting](#module_gulpConfig..StringSetting) : <code>string</code>
488
- * [~Setting](#module_gulpConfig..Setting) : <code>ArrayableSetting</code> \| <code>BooleanSetting</code> \| <code>FlagsSetting</code> \| <code>StringSetting</code>
489
- * [~BrowserConfig](#module_gulpConfig..BrowserConfig) : <code>Object.&lt;string, Setting&gt;</code>
490
- * [~DistConfig](#module_gulpConfig..DistConfig) : <code>Object.&lt;string, Setting&gt;</code>
491
- * [~FontConfig](#module_gulpConfig..FontConfig) : <code>Object.&lt;string, Setting&gt;</code>
492
- * [~ImageConfig](#module_gulpConfig..ImageConfig) : <code>Object.&lt;string, Setting&gt;</code>
493
- * [~ReadmeConfig](#module_gulpConfig..ReadmeConfig) : <code>Object.&lt;string, Setting&gt;</code>
494
- * [~SassConfig](#module_gulpConfig..SassConfig) : <code>Object.&lt;string, Setting&gt;</code>
495
- * [~TestConfig](#module_gulpConfig..TestConfig) : <code>Object.&lt;string, Setting&gt;</code>
496
- * [~TsConfig](#module_gulpConfig..TsConfig) : <code>Object.&lt;string, Setting&gt;</code>
497
- * [~Configurations](#module_gulpConfig..Configurations) : <code>Object.&lt;string, Setting&gt;</code>
498
-
499
- <a name="module_gulpConfig.get"></a>
500
-
501
- ### gulpConfig.get(path, defaultValue) ⇒ <code>\*</code> \| <code>null</code>
502
- Retrieve a value from the configurations, default may be returned.
503
-
504
- **Kind**: static method of [<code>gulpConfig</code>](#module_gulpConfig)
505
-
506
- | Param | Type | Default |
507
- | --- | --- | --- |
508
- | path | <code>string</code> \| <code>null</code> | <code>null</code> |
509
- | defaultValue | <code>\*</code> | <code></code> |
510
-
511
- <a name="module_gulpConfig.set"></a>
512
-
513
- ### gulpConfig.set(path, value) ⇒ <code>\*</code>
514
- Specify a value for the configurations to use.
515
-
516
- **Kind**: static method of [<code>gulpConfig</code>](#module_gulpConfig)
517
-
518
- | Param |
519
- | --- |
520
- | path |
521
- | value |
522
-
523
- <a name="module_gulpConfig..ArrayableSetting"></a>
524
-
525
- ### gulpConfig~ArrayableSetting : <code>Array.&lt;string&gt;</code> \| <code>string</code>
526
- A setting that may be an array of strings or a string only.
527
-
528
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
529
- <a name="module_gulpConfig..BooleanSetting"></a>
530
-
531
- ### gulpConfig~BooleanSetting : <code>boolean</code>
532
- A setting that may be true or false.
533
-
534
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
535
- <a name="module_gulpConfig..FlagStringSetting"></a>
536
-
537
- ### gulpConfig~FlagStringSetting : <code>false</code> \| <code>StringSetting</code>
538
- A setting that may be flag 'false' or provide a StringSetting
539
-
540
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
541
- <a name="module_gulpConfig..FlagsSetting"></a>
542
-
543
- ### gulpConfig~FlagsSetting : <code>Object.&lt;string, BooleanSetting&gt;</code>
544
- An object of boolean settings used as flags.
545
-
546
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
547
- <a name="module_gulpConfig..JestTestFlags"></a>
548
-
549
- ### gulpConfig~JestTestFlags : <code>FlagsSetting</code>
550
- Configure cli options for running Jest.
551
-
552
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
553
- **Properties**
554
-
555
- | Name | Type |
556
- | --- | --- |
557
- | clearCache | <code>BooleanSetting</code> |
558
- | debug | <code>BooleanSetting</code> |
559
- | ignoreProjects: | <code>BooleanSetting</code> |
560
- | json | <code>BooleanSetting</code> |
561
- | selectProjects | <code>BooleanSetting</code> |
562
- | showConfig | <code>BooleanSetting</code> |
563
- | useStderr | <code>BooleanSetting</code> |
564
- | watch | <code>BooleanSetting</code> |
565
- | watchAll | <code>BooleanSetting</code> |
566
-
567
- <a name="module_gulpConfig..StringSetting"></a>
568
-
569
- ### gulpConfig~StringSetting : <code>string</code>
570
- A setting that may only be a string.
571
-
572
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
573
- <a name="module_gulpConfig..Setting"></a>
574
-
575
- ### gulpConfig~Setting : <code>ArrayableSetting</code> \| <code>BooleanSetting</code> \| <code>FlagsSetting</code> \| <code>StringSetting</code>
576
- Any single configuration option is a Setting.
577
-
578
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
579
- <a name="module_gulpConfig..BrowserConfig"></a>
580
-
581
- ### gulpConfig~BrowserConfig : <code>Object.&lt;string, Setting&gt;</code>
582
- Configurations for building the browser files.
583
-
584
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
585
- **Properties**
586
-
587
- | Name | Type | Description |
588
- | --- | --- | --- |
589
- | enabled | <code>BooleanSetting</code> | 'true' to generate browser bundled files; 'false' for node environment only |
590
- | from | <code>StringSetting</code> | The name to use for the browser-bundled output file (.js will be appended). |
591
- | name | <code>StringSetting</code> | The search pattern used for retrieving compiled distribution files. |
592
- | to | <code>StringSetting</code> | The output directory for browser-bundled files. |
593
-
594
- <a name="module_gulpConfig..DistConfig"></a>
595
-
596
- ### gulpConfig~DistConfig : <code>Object.&lt;string, Setting&gt;</code>
597
- Configurations for building the node distribution files.
598
-
599
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
600
- **Properties**
601
-
602
- | Name | Type | Description |
603
- | --- | --- | --- |
604
- | from | <code>StringSetting</code> | The search pattern used for gathering source files for distribution. |
605
- | main | <code>StringSetting</code> | Name of the entry the distribution file. |
606
- | to | <code>StringSetting</code> | The output directory for the distribution files. |
607
-
608
- <a name="module_gulpConfig..FontConfig"></a>
609
-
610
- ### gulpConfig~FontConfig : <code>Object.&lt;string, Setting&gt;</code>
611
- Configurations for copying the font files.
612
-
613
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
614
- **Properties**
615
-
616
- | Name | Type | Description |
617
- | --- | --- | --- |
618
- | enabled | <code>BooleanSetting</code> | Toggle copy directory of fonts on. |
619
- | from | <code>StringSetting</code> | Path to search for fonts. |
620
- | to | <code>StringSetting</code> | Path to output fonts. |
621
-
622
- <a name="module_gulpConfig..ImageConfig"></a>
623
-
624
- ### gulpConfig~ImageConfig : <code>Object.&lt;string, Setting&gt;</code>
625
- Configurations to minify and copy the images.
626
-
627
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
628
- **Properties**
629
-
630
- | Name | Type | Description |
631
- | --- | --- | --- |
632
- | enabled | <code>BooleanSetting</code> | Toggle image minify and copy process. |
633
- | from | <code>StringSetting</code> | Path to search for images. |
634
- | to | <code>StringSetting</code> | Path to output images. |
635
-
636
- <a name="module_gulpConfig..ReadmeConfig"></a>
637
-
638
- ### gulpConfig~ReadmeConfig : <code>Object.&lt;string, Setting&gt;</code>
639
- Configurations to compile and generate the Readme file.
640
-
641
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
642
- **Properties**
643
-
644
- | Name | Type | Description |
645
- | --- | --- | --- |
646
- | file | <code>StringSetting</code> | The name of the output documentation markdown file. |
647
- | from | <code>StringSetting</code> | Location of files to use for compiling documentation into the readme. |
648
- | options | <code>ArrayableSetting</code> | Options for formatting the output readme. |
649
- | template | <code>StringSetting</code> | The file which will be pre-fixed to your README.md output. |
650
- | to | <code>StringSetting</code> | The directory to output the readme file in. |
651
-
652
- <a name="module_gulpConfig..SassConfig"></a>
653
-
654
- ### gulpConfig~SassConfig : <code>Object.&lt;string, Setting&gt;</code>
655
- Configurations to compile and copy the sass files into css.
656
-
657
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
658
- **Properties**
659
-
660
- | Name | Type | Description |
661
- | --- | --- | --- |
662
- | enabled | <code>BooleanSetting</code> | Toggle SASS to CSS process on. |
663
- | from | <code>StringSetting</code> | The pattern for finding all sass files. |
664
- | path | <code>StringSetting</code> | The directory were sass files will be stored. |
665
- | to | <code>StringSetting</code> | The destination path for where generated CSS (from SASS files) should go. |
666
-
667
- <a name="module_gulpConfig..TestConfig"></a>
668
-
669
- ### gulpConfig~TestConfig : <code>Object.&lt;string, Setting&gt;</code>
670
- Configurations for running the test suite.
671
-
672
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
673
- **Properties**
674
-
675
- | Name | Type | Description |
676
- | --- | --- | --- |
677
- | options | <code>JestTestFlags</code> | Additional flags for programmatically running Jest Cli. |
678
- | path | <code>ArrayableSetting</code> | The directory where Jest test files are stored. By default, stored as *.test.js adjacent to the files they are testing. |
679
- | watch | <code>ArrayableSetting</code> | The search pattern for watching files for changes. |
680
-
681
- <a name="module_gulpConfig..TsConfig"></a>
682
-
683
- ### gulpConfig~TsConfig : <code>Object.&lt;string, Setting&gt;</code>
684
- Configurations for compiling typescript into JS files.
685
-
686
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
687
- **Properties**
688
-
689
- | Name | Type | Description |
690
- | --- | --- | --- |
691
- | config | <code>FlagStringSetting</code> | The path the tsconfig file for running typescript or false if no ts file given. |
692
- | enabled | <code>BooleanSetting</code> | Toggle usage of typescript parsing. |
693
- | from | <code>StringSetting</code> | Pattern for finding the TypeScript files. |
694
- | to | <code>StringSetting</code> | Directory where parsed typescript files go. |
695
-
696
- <a name="module_gulpConfig..Configurations"></a>
697
-
698
- ### gulpConfig~Configurations : <code>Object.&lt;string, Setting&gt;</code>
699
- A set of Configurations options defined by Settings.
700
-
701
- **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
702
- **Properties**
703
-
704
- | Name | Type | Description |
705
- | --- | --- | --- |
706
- | browser | <code>BrowserConfig</code> | Browser bundling configuration group. |
707
- | cleanPaths | <code>ArrayableSetting</code> | The paths for directories to delete before build. |
708
- | dist | <code>DistConfig</code> | Distribution file generation configuration group. |
709
- | fonts | <code>FontConfig</code> | Fonts copy configuration group. |
710
- | images | <code>ImageConfig</code> | Minify and copy the images configuration. |
711
- | readme | <code>ReadmeConfig</code> | Build readme files configuration. |
712
- | rootPath | <code>StringSetting</code> | Base directory of the project. |
713
- | sass | <code>SassConfig</code> | Compile CSS from SASS configuration. |
714
- | srcPath | <code>StringSetting</code> | The directory where your source files are stored (the files you manually created). |
715
- | test | <code>TestConfig</code> | Run test suite configuration. |
716
- | typescript | <code>TsConfig</code> | Compile from typescript configuration. |
717
-
718
- <a name="module_testHelpers"></a>
719
-
720
- ## testHelpers
721
- Export the setUp helper.
722
-
723
- **Version**: 3.0.0
724
- **Author**: Joshua Heagle <joshuaheagle@gmail.com>
725
-
726
- * [testHelpers](#module_testHelpers)
727
- * [.exports.createTempDir](#module_testHelpers.exports.createTempDir) ⇒ <code>Promise.&lt;(\*\|void)&gt;</code>
728
- * [.exports.beforeEach](#module_testHelpers.exports.beforeEach) ⇒ <code>Promise.&lt;(\*\|void)&gt;</code>
729
- * [.exports.afterEach](#module_testHelpers.exports.afterEach) ⇒ <code>Promise.&lt;\*&gt;</code>
730
- * [.setDefaults(testDir)](#module_testHelpers.setDefaults)
731
-
732
- <a name="module_testHelpers.exports.createTempDir"></a>
733
-
734
- ### testHelpers.exports.createTempDir ⇒ <code>Promise.&lt;(\*\|void)&gt;</code>
735
- Ensure that the del has completed, recursively attempt to delete and recreate
736
-
737
- **Kind**: static property of [<code>testHelpers</code>](#module_testHelpers)
738
-
739
- | Param | Type | Default |
740
- | --- | --- | --- |
741
- | [exists] | <code>boolean</code> | <code>true</code> |
742
-
743
- <a name="module_testHelpers.exports.beforeEach"></a>
744
-
745
- ### testHelpers.exports.beforeEach ⇒ <code>Promise.&lt;(\*\|void)&gt;</code>
746
- In the Jest.beforeEach function call this one to set up the temp directory.
747
-
748
- **Kind**: static property of [<code>testHelpers</code>](#module_testHelpers)
749
- <a name="module_testHelpers.exports.afterEach"></a>
750
-
751
- ### testHelpers.exports.afterEach ⇒ <code>Promise.&lt;\*&gt;</code>
752
- In the Jest.afterEach function call this one to clean up and remove the temp directory.
753
-
754
- **Kind**: static property of [<code>testHelpers</code>](#module_testHelpers)
755
- <a name="module_testHelpers.setDefaults"></a>
756
-
757
- ### testHelpers.setDefaults(testDir)
758
- Update the gulp configurations with the test data. Set the test directory where temp files will be created for testing.
759
-
760
- **Kind**: static method of [<code>testHelpers</code>](#module_testHelpers)
761
-
762
- | Param | Type | Default |
763
- | --- | --- | --- |
764
- | testDir | <code>string</code> | <code>&quot;test-temp&quot;</code> |
765
-
766
- <a name="module_partials"></a>
767
-
768
- ## partials
769
- Micro-functions used as components for the main gulp functions.
770
-
771
- **Version**: 3.0.0
772
- **Author**: Joshua Heagle <joshuaheagle@gmail.com>
773
-
774
- * [partials](#module_partials)
775
- * [.tsFor([srcPath], [distPath])](#module_partials.tsFor) ⇒ <code>function</code>
776
- * [.sassFor([srcSearch], [cssPath])](#module_partials.sassFor) ⇒ <code>stream.Stream</code>
777
- * [.runOnChange(path)](#module_partials.runOnChange) ⇒ <code>stream.Stream</code>
778
- * [~pathRegex](#module_partials.runOnChange..pathRegex)
779
- * [.removeDirectory(dirPath)](#module_partials.removeDirectory) ⇒ <code>Promise.&lt;\*&gt;</code>
780
- * [.readmeTemplate()](#module_partials.readmeTemplate) ⇒ <code>\*</code>
781
- * [.minifyFor()](#module_partials.minifyFor) ⇒ <code>\*</code>
782
- * [.imagesFor([imageSrc], [imageDest])](#module_partials.imagesFor) ⇒ <code>stream.Stream</code>
783
- * [.distSeries([srcPath], [distFinalPath], [tsSearch])](#module_partials.distSeries) ⇒ <code>function</code>
784
- * [.distForSrc([useTs])](#module_partials.distForSrc) ⇒ <code>string</code>
785
- * [.distFor([srcPath], [destPath])](#module_partials.distFor) ⇒ <code>stream.Stream</code>
786
- * [.copyFor(srcPath, destPath)](#module_partials.copyFor) ⇒ <code>stream.Stream</code>
787
- * [.clean()](#module_partials.clean) ⇒ <code>Promise.&lt;Array.&lt;string&gt;&gt;</code> \| <code>\*</code>
788
- * [.beginWatcher()](#module_partials.beginWatcher) ⇒ <code>FSWatcher</code>
789
- * [.addToReadme()](#module_partials.addToReadme) ⇒ <code>string</code> \| <code>Uint8Array</code>
790
-
791
- <a name="module_partials.tsFor"></a>
792
-
793
- ### partials.tsFor([srcPath], [distPath]) ⇒ <code>function</code>
794
- Starting at the source directory, find all the ts files and convert them into the distribution directory.
795
-
796
- **Kind**: static method of [<code>partials</code>](#module_partials)
797
- **See**: `https://www.typescriptlang.org/docs/handbook/gulp.html` for more info
798
-
799
- | Param | Type | Default |
800
- | --- | --- | --- |
801
- | [srcPath] | <code>string</code> \| <code>array</code> | <code>&quot;&#x27;&#x27;&quot;</code> |
802
- | [distPath] | <code>string</code> | <code>&quot;&#x27;&#x27;&quot;</code> |
803
-
804
- <a name="module_partials.sassFor"></a>
805
-
806
- ### partials.sassFor([srcSearch], [cssPath]) ⇒ <code>stream.Stream</code>
807
- Build the CSS for a given source pattern.
808
-
809
- **Kind**: static method of [<code>partials</code>](#module_partials)
810
-
811
- | Param | Type | Default |
812
- | --- | --- | --- |
813
- | [srcSearch] | <code>string</code> \| <code>array</code> | <code>&quot;&#x27;src/config/path/sass/for&#x27;&quot;</code> |
814
- | [cssPath] | <code>string</code> | <code>&quot;&#x27;css/config/path&#x27;&quot;</code> |
815
-
816
- <a name="module_partials.runOnChange"></a>
817
-
818
- ### partials.runOnChange(path) ⇒ <code>stream.Stream</code>
819
- Run this function when the watched files are modified.
820
-
821
- **Kind**: static method of [<code>partials</code>](#module_partials)
822
-
823
- | Param | Type |
824
- | --- | --- |
825
- | path | <code>string</code> |
826
-
827
- **Example**
828
- ```js
829
- // Configured paths
830
- ```
831
- <a name="module_partials.runOnChange..pathRegex"></a>
832
-
833
- #### runOnChange~pathRegex
834
- 1. The original path comes in from src and is a .ts
835
-
836
- **Kind**: inner constant of [<code>runOnChange</code>](#module_partials.runOnChange)
837
- <a name="module_partials.removeDirectory"></a>
838
-
839
- ### partials.removeDirectory(dirPath) ⇒ <code>Promise.&lt;\*&gt;</code>
840
- Return a promise to be completed once the specified directory is deleted.
841
-
842
- **Kind**: static method of [<code>partials</code>](#module_partials)
843
-
844
- | Param | Type |
845
- | --- | --- |
846
- | dirPath | <code>string</code> |
847
-
848
- <a name="module_partials.readmeTemplate"></a>
849
-
850
- ### partials.readmeTemplate() ⇒ <code>\*</code>
851
- Copy a readme template into the README.md file.
852
-
853
- **Kind**: static method of [<code>partials</code>](#module_partials)
854
- <a name="module_partials.minifyFor"></a>
855
-
856
- ### partials.minifyFor() ⇒ <code>\*</code>
857
- Minify files and rename the output with '.min' extension.
858
-
859
- **Kind**: static method of [<code>partials</code>](#module_partials)
860
- <a name="module_partials.imagesFor"></a>
861
-
862
- ### partials.imagesFor([imageSrc], [imageDest]) ⇒ <code>stream.Stream</code>
863
- Move and optimize images into the browser directory.
864
-
865
- **Kind**: static method of [<code>partials</code>](#module_partials)
866
-
867
- | Param | Type | Default |
868
- | --- | --- | --- |
869
- | [imageSrc] | <code>string</code> \| <code>array</code> | <code>&quot;src/images/pattern&quot;</code> |
870
- | [imageDest] | <code>string</code> | <code>&quot;dest/image/folder&quot;</code> |
871
-
872
- <a name="module_partials.distSeries"></a>
873
-
874
- ### partials.distSeries([srcPath], [distFinalPath], [tsSearch]) ⇒ <code>function</code>
875
- When using TypeScript, ensure that we process the ts first then run babel (dist)
876
-
877
- **Kind**: static method of [<code>partials</code>](#module_partials)
878
-
879
- | Param | Type | Default |
880
- | --- | --- | --- |
881
- | [srcPath] | <code>string</code> | <code>&quot;&#x27;src/config/path/dist/for&#x27;&quot;</code> |
882
- | [distFinalPath] | <code>string</code> | <code>&quot;&#x27;dist/config/path&#x27;&quot;</code> |
883
- | [tsSearch] | <code>string</code> | <code>&quot;&#x27;ts/search/config/path&#x27;&quot;</code> |
884
-
885
- <a name="module_partials.distForSrc"></a>
886
-
887
- ### partials.distForSrc([useTs]) ⇒ <code>string</code>
888
- Retrieve the correct distFor search path based on TS Config.
889
-
890
- **Kind**: static method of [<code>partials</code>](#module_partials)
891
-
892
- | Param | Type | Default |
893
- | --- | --- | --- |
894
- | [useTs] | [<code>FlagStringSetting</code>](#module_gulpConfig..FlagStringSetting) | <code>&#x27;config/for/ts&#x27;</code> |
895
-
896
- <a name="module_partials.distFor"></a>
897
-
898
- ### partials.distFor([srcPath], [destPath]) ⇒ <code>stream.Stream</code>
899
- Build the distribution for a given source pattern.
900
-
901
- **Kind**: static method of [<code>partials</code>](#module_partials)
902
-
903
- | Param | Type | Default |
904
- | --- | --- | --- |
905
- | [srcPath] | <code>string</code> \| <code>array</code> | <code>&quot;&#x27;src/config/path/dist/for&#x27;&quot;</code> |
906
- | [destPath] | <code>string</code> | <code>&quot;&#x27;dist/config/path&#x27;&quot;</code> |
907
-
908
- <a name="module_partials.copyFor"></a>
909
-
910
- ### partials.copyFor(srcPath, destPath) ⇒ <code>stream.Stream</code>
911
- Copy some files to a different location.
912
-
913
- **Kind**: static method of [<code>partials</code>](#module_partials)
914
-
915
- | Param | Type |
916
- | --- | --- |
917
- | srcPath | <code>string</code> \| <code>array</code> |
918
- | destPath | <code>string</code> |
919
-
920
- <a name="module_partials.clean"></a>
921
-
922
- ### partials.clean() ⇒ <code>Promise.&lt;Array.&lt;string&gt;&gt;</code> \| <code>\*</code>
923
- Deletes all the distribution and browser files (used before create a new build).
924
-
925
- **Kind**: static method of [<code>partials</code>](#module_partials)
926
- <a name="module_partials.beginWatcher"></a>
927
-
928
- ### partials.beginWatcher() ⇒ <code>FSWatcher</code>
929
- Create a chokidar instance which watches and triggers change when the globed files are modified.
930
-
931
- **Kind**: static method of [<code>partials</code>](#module_partials)
932
- <a name="module_partials.addToReadme"></a>
933
-
934
- ### partials.addToReadme() ⇒ <code>string</code> \| <code>Uint8Array</code>
935
- Appends all the jsdoc comments to the readme file. Assumes empty or templated file.
936
-
937
- **Kind**: static method of [<code>partials</code>](#module_partials)
411
+ ## Modules
412
+
413
+ <dl>
414
+ <dt><a href="#module_js-build-tools">js-build-tools</a></dt>
415
+ <dd><p>Export these functions to your own project to customize your build pipeline.</p>
416
+ </dd>
417
+ <dt><a href="#module_gulpConfig">gulpConfig</a></dt>
418
+ <dd><p>Modify these configurations to match your project specifications.</p>
419
+ </dd>
420
+ </dl>
421
+
422
+ <a name="module_js-build-tools"></a>
423
+
424
+ ## js-build-tools
425
+ Export these functions to your own project to customize your build pipeline.
426
+
427
+ **Version**: 3.0.0
428
+ **Author**: Joshua Heagle <joshuaheagle@gmail.com>
429
+ <a name="module_gulpConfig"></a>
430
+
431
+ ## gulpConfig
432
+ Modify these configurations to match your project specifications.
433
+
434
+ **Version**: 3.0.0
435
+ **Author**: Joshua Heagle <joshuaheagle@gmail.com>
436
+
437
+ * [gulpConfig](#module_gulpConfig)
438
+ * _static_
439
+ * [.get(path, defaultValue)](#module_gulpConfig.get) ⇒ <code>\*</code> \| <code>null</code>
440
+ * [.set(path, value)](#module_gulpConfig.set) ⇒ <code>\*</code>
441
+ * _inner_
442
+ * [~ArrayableSetting](#module_gulpConfig..ArrayableSetting) : <code>Array.&lt;string&gt;</code> \| <code>string</code>
443
+ * [~BooleanSetting](#module_gulpConfig..BooleanSetting) : <code>boolean</code>
444
+ * [~FlagStringSetting](#module_gulpConfig..FlagStringSetting) : <code>false</code> \| <code>StringSetting</code>
445
+ * [~FlagsSetting](#module_gulpConfig..FlagsSetting) : <code>Object.&lt;string, BooleanSetting&gt;</code>
446
+ * [~JestTestFlags](#module_gulpConfig..JestTestFlags) : <code>FlagsSetting</code>
447
+ * [~StringSetting](#module_gulpConfig..StringSetting) : <code>string</code>
448
+ * [~Setting](#module_gulpConfig..Setting) : <code>ArrayableSetting</code> \| <code>BooleanSetting</code> \| <code>FlagsSetting</code> \| <code>StringSetting</code>
449
+ * [~BrowserConfig](#module_gulpConfig..BrowserConfig) : <code>Object.&lt;string, Setting&gt;</code>
450
+ * [~DistConfig](#module_gulpConfig..DistConfig) : <code>Object.&lt;string, Setting&gt;</code>
451
+ * [~FontConfig](#module_gulpConfig..FontConfig) : <code>Object.&lt;string, Setting&gt;</code>
452
+ * [~ImageConfig](#module_gulpConfig..ImageConfig) : <code>Object.&lt;string, Setting&gt;</code>
453
+ * [~ReadmeConfig](#module_gulpConfig..ReadmeConfig) : <code>Object.&lt;string, Setting&gt;</code>
454
+ * [~SassConfig](#module_gulpConfig..SassConfig) : <code>Object.&lt;string, Setting&gt;</code>
455
+ * [~TestConfig](#module_gulpConfig..TestConfig) : <code>Object.&lt;string, Setting&gt;</code>
456
+ * [~TsConfig](#module_gulpConfig..TsConfig) : <code>Object.&lt;string, Setting&gt;</code>
457
+ * [~Configurations](#module_gulpConfig..Configurations) : <code>Object.&lt;string, Setting&gt;</code>
458
+
459
+ <a name="module_gulpConfig.get"></a>
460
+
461
+ ### gulpConfig.get(path, defaultValue) ⇒ <code>\*</code> \| <code>null</code>
462
+ Retrieve a value from the configurations, default may be returned.
463
+
464
+ **Kind**: static method of [<code>gulpConfig</code>](#module_gulpConfig)
465
+
466
+ | Param | Type | Default |
467
+ | --- | --- | --- |
468
+ | path | <code>string</code> \| <code>null</code> | <code>null</code> |
469
+ | defaultValue | <code>\*</code> | <code></code> |
470
+
471
+ <a name="module_gulpConfig.set"></a>
472
+
473
+ ### gulpConfig.set(path, value) ⇒ <code>\*</code>
474
+ Specify a value for the configurations to use.
475
+
476
+ **Kind**: static method of [<code>gulpConfig</code>](#module_gulpConfig)
477
+
478
+ | Param |
479
+ | --- |
480
+ | path |
481
+ | value |
482
+
483
+ <a name="module_gulpConfig..ArrayableSetting"></a>
484
+
485
+ ### gulpConfig~ArrayableSetting : <code>Array.&lt;string&gt;</code> \| <code>string</code>
486
+ A setting that may be an array of strings or a string only.
487
+
488
+ **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
489
+ <a name="module_gulpConfig..BooleanSetting"></a>
490
+
491
+ ### gulpConfig~BooleanSetting : <code>boolean</code>
492
+ A setting that may be true or false.
493
+
494
+ **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
495
+ <a name="module_gulpConfig..FlagStringSetting"></a>
496
+
497
+ ### gulpConfig~FlagStringSetting : <code>false</code> \| <code>StringSetting</code>
498
+ A setting that may be flag 'false' or provide a StringSetting
499
+
500
+ **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
501
+ <a name="module_gulpConfig..FlagsSetting"></a>
502
+
503
+ ### gulpConfig~FlagsSetting : <code>Object.&lt;string, BooleanSetting&gt;</code>
504
+ An object of boolean settings used as flags.
505
+
506
+ **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
507
+ <a name="module_gulpConfig..JestTestFlags"></a>
508
+
509
+ ### gulpConfig~JestTestFlags : <code>FlagsSetting</code>
510
+ Configure cli options for running Jest.
511
+
512
+ **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
513
+ **Properties**
514
+
515
+ | Name | Type |
516
+ | --- | --- |
517
+ | clearCache | <code>BooleanSetting</code> |
518
+ | debug | <code>BooleanSetting</code> |
519
+ | ignoreProjects: | <code>BooleanSetting</code> |
520
+ | json | <code>BooleanSetting</code> |
521
+ | selectProjects | <code>BooleanSetting</code> |
522
+ | showConfig | <code>BooleanSetting</code> |
523
+ | useStderr | <code>BooleanSetting</code> |
524
+ | watch | <code>BooleanSetting</code> |
525
+ | watchAll | <code>BooleanSetting</code> |
526
+
527
+ <a name="module_gulpConfig..StringSetting"></a>
528
+
529
+ ### gulpConfig~StringSetting : <code>string</code>
530
+ A setting that may only be a string.
531
+
532
+ **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
533
+ <a name="module_gulpConfig..Setting"></a>
534
+
535
+ ### gulpConfig~Setting : <code>ArrayableSetting</code> \| <code>BooleanSetting</code> \| <code>FlagsSetting</code> \| <code>StringSetting</code>
536
+ Any single configuration option is a Setting.
537
+
538
+ **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
539
+ <a name="module_gulpConfig..BrowserConfig"></a>
540
+
541
+ ### gulpConfig~BrowserConfig : <code>Object.&lt;string, Setting&gt;</code>
542
+ Configurations for building the browser files.
543
+
544
+ **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
545
+ **Properties**
546
+
547
+ | Name | Type | Description |
548
+ | --- | --- | --- |
549
+ | enabled | <code>BooleanSetting</code> | 'true' to generate browser bundled files; 'false' for node environment only |
550
+ | from | <code>StringSetting</code> | The name to use for the browser-bundled output file (.js will be appended). |
551
+ | name | <code>StringSetting</code> | The search pattern used for retrieving compiled distribution files. |
552
+ | to | <code>StringSetting</code> | The output directory for browser-bundled files. |
553
+
554
+ <a name="module_gulpConfig..DistConfig"></a>
555
+
556
+ ### gulpConfig~DistConfig : <code>Object.&lt;string, Setting&gt;</code>
557
+ Configurations for building the node distribution files.
558
+
559
+ **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
560
+ **Properties**
561
+
562
+ | Name | Type | Description |
563
+ | --- | --- | --- |
564
+ | from | <code>StringSetting</code> | The search pattern used for gathering source files for distribution. |
565
+ | main | <code>StringSetting</code> | Name of the entry the distribution file. |
566
+ | to | <code>StringSetting</code> | The output directory for the distribution files. |
567
+
568
+ <a name="module_gulpConfig..FontConfig"></a>
569
+
570
+ ### gulpConfig~FontConfig : <code>Object.&lt;string, Setting&gt;</code>
571
+ Configurations for copying the font files.
572
+
573
+ **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
574
+ **Properties**
575
+
576
+ | Name | Type | Description |
577
+ | --- | --- | --- |
578
+ | enabled | <code>BooleanSetting</code> | Toggle copy directory of fonts on. |
579
+ | from | <code>StringSetting</code> | Path to search for fonts. |
580
+ | to | <code>StringSetting</code> | Path to output fonts. |
581
+
582
+ <a name="module_gulpConfig..ImageConfig"></a>
583
+
584
+ ### gulpConfig~ImageConfig : <code>Object.&lt;string, Setting&gt;</code>
585
+ Configurations to minify and copy the images.
586
+
587
+ **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
588
+ **Properties**
589
+
590
+ | Name | Type | Description |
591
+ | --- | --- | --- |
592
+ | enabled | <code>BooleanSetting</code> | Toggle image minify and copy process. |
593
+ | from | <code>StringSetting</code> | Path to search for images. |
594
+ | to | <code>StringSetting</code> | Path to output images. |
595
+
596
+ <a name="module_gulpConfig..ReadmeConfig"></a>
597
+
598
+ ### gulpConfig~ReadmeConfig : <code>Object.&lt;string, Setting&gt;</code>
599
+ Configurations to compile and generate the Readme file.
600
+
601
+ **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
602
+ **Properties**
603
+
604
+ | Name | Type | Description |
605
+ | --- | --- | --- |
606
+ | file | <code>StringSetting</code> | The name of the output documentation markdown file. |
607
+ | from | <code>StringSetting</code> | Location of files to use for compiling documentation into the readme. |
608
+ | options | <code>ArrayableSetting</code> | Options for formatting the output readme. |
609
+ | template | <code>StringSetting</code> | The file which will be pre-fixed to your README.md output. |
610
+ | to | <code>StringSetting</code> | The directory to output the readme file in. |
611
+
612
+ <a name="module_gulpConfig..SassConfig"></a>
613
+
614
+ ### gulpConfig~SassConfig : <code>Object.&lt;string, Setting&gt;</code>
615
+ Configurations to compile and copy the sass files into css.
616
+
617
+ **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
618
+ **Properties**
619
+
620
+ | Name | Type | Description |
621
+ | --- | --- | --- |
622
+ | enabled | <code>BooleanSetting</code> | Toggle SASS to CSS process on. |
623
+ | from | <code>StringSetting</code> | The pattern for finding all sass files. |
624
+ | path | <code>StringSetting</code> | The directory were sass files will be stored. |
625
+ | to | <code>StringSetting</code> | The destination path for where generated CSS (from SASS files) should go. |
626
+
627
+ <a name="module_gulpConfig..TestConfig"></a>
628
+
629
+ ### gulpConfig~TestConfig : <code>Object.&lt;string, Setting&gt;</code>
630
+ Configurations for running the test suite.
631
+
632
+ **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
633
+ **Properties**
634
+
635
+ | Name | Type | Description |
636
+ | --- | --- | --- |
637
+ | options | <code>JestTestFlags</code> | Additional flags for programmatically running Jest Cli. |
638
+ | path | <code>ArrayableSetting</code> | The directory where Jest test files are stored. By default, stored as *.test.js adjacent to the files they are testing. |
639
+ | watch | <code>ArrayableSetting</code> | The search pattern for watching files for changes. |
640
+
641
+ <a name="module_gulpConfig..TsConfig"></a>
642
+
643
+ ### gulpConfig~TsConfig : <code>Object.&lt;string, Setting&gt;</code>
644
+ Configurations for compiling typescript into JS files.
645
+
646
+ **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
647
+ **Properties**
648
+
649
+ | Name | Type | Description |
650
+ | --- | --- | --- |
651
+ | config | <code>FlagStringSetting</code> | The path the tsconfig file for running typescript or false if no ts file given. |
652
+ | enabled | <code>BooleanSetting</code> | Toggle usage of typescript parsing. |
653
+ | from | <code>StringSetting</code> | Pattern for finding the TypeScript files. |
654
+ | to | <code>StringSetting</code> | Directory where parsed typescript files go. |
655
+
656
+ <a name="module_gulpConfig..Configurations"></a>
657
+
658
+ ### gulpConfig~Configurations : <code>Object.&lt;string, Setting&gt;</code>
659
+ A set of Configurations options defined by Settings.
660
+
661
+ **Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
662
+ **Properties**
663
+
664
+ | Name | Type | Description |
665
+ | --- | --- | --- |
666
+ | browser | <code>BrowserConfig</code> | Browser bundling configuration group. |
667
+ | cleanPaths | <code>ArrayableSetting</code> | The paths for directories to delete before build. |
668
+ | dist | <code>DistConfig</code> | Distribution file generation configuration group. |
669
+ | fonts | <code>FontConfig</code> | Fonts copy configuration group. |
670
+ | images | <code>ImageConfig</code> | Minify and copy the images configuration. |
671
+ | readme | <code>ReadmeConfig</code> | Build readme files configuration. |
672
+ | rootPath | <code>StringSetting</code> | Base directory of the project. |
673
+ | sass | <code>SassConfig</code> | Compile CSS from SASS configuration. |
674
+ | srcPath | <code>StringSetting</code> | The directory where your source files are stored (the files you manually created). |
675
+ | test | <code>TestConfig</code> | Run test suite configuration. |
676
+ | typescript | <code>TsConfig</code> | Compile from typescript configuration. |
677
+