js-build-tools 3.0.3 → 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.
- package/README.md +431 -691
- package/babel.config.js +1 -1
- package/dist/build.js +58 -59
- package/dist/build.min.js +1 -1
- package/dist/bundle.js +17 -12
- package/dist/bundle.min.js +1 -1
- package/dist/bundleLint.js +21 -17
- package/dist/bundleLint.min.js +1 -1
- package/dist/bundleMinify.js +14 -8
- package/dist/bundleMinify.min.js +1 -1
- package/dist/compileReadme.js +10 -13
- package/dist/compileReadme.min.js +1 -1
- package/dist/copyFonts.js +14 -8
- package/dist/copyFonts.min.js +1 -1
- package/dist/default.js +19 -15
- package/dist/default.min.js +1 -1
- package/dist/dist.js +10 -7
- package/dist/dist.min.js +1 -1
- package/dist/distLint.js +21 -17
- package/dist/distLint.min.js +1 -1
- package/dist/distMinify.js +14 -8
- package/dist/distMinify.min.js +1 -1
- package/dist/images.js +10 -7
- package/dist/images.min.js +1 -1
- package/dist/partials/addToReadme.js +19 -14
- package/dist/partials/beginWatcher.js +14 -10
- package/dist/partials/clean.js +17 -11
- package/dist/partials/copyFor.js +10 -10
- package/dist/partials/distFor.js +27 -17
- package/dist/partials/distForSrc.js +16 -10
- package/dist/partials/distSeries.js +24 -20
- package/dist/partials/imagesFor.js +27 -28
- package/dist/partials/minifyFor.js +17 -16
- package/dist/partials/readmeTemplate.js +16 -12
- package/dist/partials/removeDirectory.js +12 -12
- package/dist/partials/runOnChange.js +30 -28
- package/dist/partials/sassFor.js +28 -21
- package/dist/partials/tsFor.js +24 -21
- package/dist/partials.js +103 -41
- package/dist/partials.min.js +1 -1
- package/dist/sass.js +10 -7
- package/dist/sass.min.js +1 -1
- package/dist/test-helpers/setUp.js +68 -65
- package/dist/testFull.js +22 -17
- package/dist/testFull.min.js +1 -1
- package/dist/testHelpers.js +11 -15
- package/dist/testHelpers.min.js +1 -1
- package/dist/testQuick.js +24 -19
- package/dist/testQuick.min.js +1 -1
- package/dist/typeScript.js +9 -7
- package/dist/typeScript.min.js +1 -1
- package/dist/utilities/dotGet.js +45 -43
- package/dist/utilities/dotNotate.js +53 -51
- package/dist/utilities/dotSet.js +39 -37
- package/dist/utilities/isObject.js +9 -5
- package/dist/utilities/strAfter.js +18 -14
- package/dist/utilities/strBefore.js +18 -14
- package/dist/watchFull.js +10 -10
- package/dist/watchFull.min.js +1 -1
- package/dist/watchTest.js +17 -13
- package/dist/watchTest.min.js +1 -1
- package/functions/{build.js → build.mjs} +14 -16
- package/functions/{build.test.js → build.test.mjs} +9 -8
- package/functions/{bundle.js → bundle.mjs} +5 -7
- package/functions/{bundle.test.js → bundle.test.mjs} +5 -4
- package/functions/{bundleLint.js → bundleLint.mjs} +4 -6
- package/functions/{bundleLint.test.js → bundleLint.test.mjs} +5 -4
- package/functions/bundleMinify.mjs +9 -0
- package/functions/bundleMinify.test.mjs +15 -0
- package/functions/compileReadme.mjs +9 -0
- package/functions/{compileReadme.test.js → compileReadme.test.mjs} +4 -4
- package/functions/copyFonts.mjs +9 -0
- package/functions/{copyFonts.test.js → copyFonts.test.mjs} +4 -3
- package/functions/default.mjs +12 -0
- package/functions/{default.test.js → default.test.mjs} +8 -7
- package/functions/{dist.js → dist.mjs} +2 -4
- package/functions/{dist.test.js → dist.test.mjs} +4 -3
- package/functions/{distLint.js → distLint.mjs} +4 -6
- package/functions/{distLint.test.js → distLint.test.mjs} +5 -4
- package/functions/distMinify.mjs +9 -0
- package/functions/distMinify.test.mjs +15 -0
- package/functions/{images.js → images.mjs} +2 -4
- package/functions/{images.test.js → images.test.mjs} +4 -3
- package/functions/partials/{addToReadme.js → addToReadme.mjs} +5 -7
- package/functions/partials/{addToReadme.test.js → addToReadme.test.mjs} +4 -3
- package/functions/partials/beginWatcher.mjs +9 -0
- package/functions/partials/{beginWatcher.test.js → beginWatcher.test.mjs} +4 -3
- package/functions/partials/clean.mjs +13 -0
- package/functions/partials/{clean.test.js → clean.test.mjs} +4 -3
- package/functions/partials/{copyFor.js → copyFor.mjs} +2 -4
- package/functions/partials/{copyFor.test.js → copyFor.test.mjs} +4 -3
- package/functions/partials/distFor.mjs +22 -0
- package/functions/partials/{distFor.test.js → distFor.test.mjs} +49 -8
- package/functions/partials/{distForSrc.js → distForSrc.mjs} +2 -4
- package/functions/partials/{distForSrc.test.js → distForSrc.test.mjs} +3 -2
- package/functions/partials/{distSeries.js → distSeries.mjs} +6 -8
- package/functions/partials/{distSeries.test.js → distSeries.test.mjs} +7 -6
- package/functions/partials/{imagesFor.js → imagesFor.mjs} +5 -13
- package/functions/partials/{imagesFor.test.js → imagesFor.test.mjs} +4 -3
- package/functions/partials/minifyFor.mjs +15 -0
- package/functions/partials/{minifyFor.test.js → minifyFor.test.mjs} +5 -4
- package/functions/partials/readmeTemplate.mjs +12 -0
- package/functions/partials/{readmeTemplate.test.js → readmeTemplate.test.mjs} +4 -3
- package/functions/partials/{removeDirectory.js → removeDirectory.mjs} +2 -4
- package/functions/partials/{removeDirectory.test.js → removeDirectory.test.mjs} +28 -28
- package/functions/partials/{runOnChange.js → runOnChange.mjs} +6 -8
- package/functions/partials/{runOnChange.test.js → runOnChange.test.mjs} +12 -11
- package/functions/partials/sassFor.mjs +22 -0
- package/functions/partials/{sassFor.test.js → sassFor.test.mjs} +5 -4
- package/functions/partials/{tsFor.js → tsFor.mjs} +4 -6
- package/functions/partials/{tsFor.test.js → tsFor.test.mjs} +5 -4
- package/functions/partials.mjs +23 -0
- package/functions/{partials.test.js → partials.test.mjs} +1 -1
- package/functions/sass.mjs +4 -0
- package/functions/{sass.test.js → sass.test.mjs} +4 -3
- package/functions/test-helpers/{setUp.js → setUp.mjs} +25 -27
- package/functions/test-helpers/setUp.test.mjs +19 -0
- package/functions/{testFull.js → testFull.mjs} +4 -6
- package/functions/testFull.test.mjs +17 -0
- package/functions/{testHelpers.js → testHelpers.mjs} +1 -6
- package/functions/testHelpers.test.mjs +7 -0
- package/functions/{testQuick.js → testQuick.mjs} +4 -6
- package/functions/testQuick.test.mjs +17 -0
- package/functions/{typeScript.js → typeScript.mjs} +2 -4
- package/functions/typeScript.test.mjs +11 -0
- package/functions/utilities/{dotGet.js → dotGet.mjs} +4 -6
- package/functions/utilities/{dotNotate.js → dotNotate.mjs} +2 -4
- package/functions/utilities/{dotSet.js → dotSet.mjs} +4 -6
- package/functions/utilities/{isObject.js → isObject.mjs} +1 -3
- package/functions/utilities/{strAfter.js → strAfter.mjs} +11 -13
- package/functions/utilities/{strBefore.js → strBefore.mjs} +11 -13
- package/functions/{watchFull.js → watchFull.mjs} +2 -4
- package/functions/{watchFull.test.js → watchFull.test.mjs} +8 -7
- package/functions/watchTest.mjs +10 -0
- package/functions/{watchTest.test.js → watchTest.test.mjs} +7 -6
- package/gulp.config.js +20 -19
- package/gulp.config.mjs +252 -0
- package/gulpfile.base.js +20 -20
- package/gulpfile.base.mjs +27 -0
- package/package.json +20 -14
- package/functions/bundleMinify.js +0 -11
- package/functions/bundleMinify.test.js +0 -14
- package/functions/compileReadme.js +0 -11
- package/functions/copyFonts.js +0 -11
- package/functions/default.js +0 -14
- package/functions/distMinify.js +0 -11
- package/functions/distMinify.test.js +0 -14
- package/functions/partials/beginWatcher.js +0 -11
- package/functions/partials/clean.js +0 -15
- package/functions/partials/distFor.js +0 -17
- package/functions/partials/minifyFor.js +0 -15
- package/functions/partials/readmeTemplate.js +0 -14
- package/functions/partials/sassFor.js +0 -21
- package/functions/partials.js +0 -40
- package/functions/sass.js +0 -6
- package/functions/test-helpers/setUp.test.js +0 -18
- package/functions/testFull.test.js +0 -16
- package/functions/testHelpers.test.js +0 -7
- package/functions/testQuick.test.js +0 -16
- package/functions/typeScript.test.js +0 -10
- package/functions/watchTest.js +0 -12
- package/vendor/array-union/index.js +0 -31
- package/vendor/easy-transform-stream/index.js +0 -54
- package/vendor/globby/gitignore.js +0 -96
- package/vendor/globby/index.js +0 -191
- package/vendor/globby/node_modules/slash/index.js +0 -16
- package/vendor/globby/stream-utils.js +0 -58
- package/vendor/globby/to-path.js +0 -20
- package/vendor/gulp-imagemin/index.js +0 -124
- package/vendor/gulp-imagemin/node_modules/chalk/source/index.js +0 -265
- package/vendor/gulp-imagemin/node_modules/chalk/source/utilities.js +0 -36
- package/vendor/gulp-imagemin/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -217
- package/vendor/gulp-imagemin/node_modules/chalk/source/vendor/supports-color/index.js +0 -154
- package/vendor/gulp-plugin-extras/index.js +0 -42
- package/vendor/gulp-plugin-extras/node_modules/chalk/source/index.js +0 -265
- package/vendor/gulp-plugin-extras/node_modules/chalk/source/utilities.js +0 -36
- package/vendor/gulp-plugin-extras/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -217
- package/vendor/gulp-plugin-extras/node_modules/chalk/source/vendor/supports-color/index.js +0 -154
- package/vendor/gulp-plugin-extras/plugin-error.js +0 -145
- package/vendor/ignore/index.js +0 -468
- package/vendor/imagemin/index.js +0 -90
- package/vendor/imagemin-gifsicle/index.js +0 -33
- package/vendor/imagemin-mozjpeg/index.js +0 -100
- package/vendor/imagemin-mozjpeg/node_modules/execa/index.js +0 -260
- package/vendor/imagemin-mozjpeg/node_modules/execa/lib/command.js +0 -47
- package/vendor/imagemin-mozjpeg/node_modules/execa/lib/error.js +0 -102
- package/vendor/imagemin-mozjpeg/node_modules/execa/lib/kill.js +0 -123
- package/vendor/imagemin-mozjpeg/node_modules/execa/lib/promise.js +0 -47
- package/vendor/imagemin-mozjpeg/node_modules/execa/lib/stdio.js +0 -50
- package/vendor/imagemin-mozjpeg/node_modules/execa/lib/stream.js +0 -124
- package/vendor/imagemin-mozjpeg/node_modules/human-signals/build/src/core.js +0 -238
- package/vendor/imagemin-mozjpeg/node_modules/human-signals/build/src/main.js +0 -89
- package/vendor/imagemin-mozjpeg/node_modules/human-signals/build/src/realtime.js +0 -24
- package/vendor/imagemin-mozjpeg/node_modules/human-signals/build/src/signals.js +0 -44
- package/vendor/imagemin-mozjpeg/node_modules/is-stream/index.js +0 -25
- package/vendor/imagemin-mozjpeg/node_modules/mimic-fn/index.js +0 -70
- package/vendor/imagemin-mozjpeg/node_modules/npm-run-path/index.js +0 -52
- package/vendor/imagemin-mozjpeg/node_modules/onetime/index.js +0 -43
- package/vendor/imagemin-mozjpeg/node_modules/path-key/index.js +0 -20
- package/vendor/imagemin-mozjpeg/node_modules/strip-final-newline/index.js +0 -17
- package/vendor/imagemin-optipng/index.js +0 -44
- package/vendor/imagemin-svgo/index.js +0 -27
- package/vendor/is-jpg/index.js +0 -12
- package/vendor/junk/index.js +0 -49
- package/vendor/mozjpeg/index.js +0 -9
- package/vendor/mozjpeg/lib/index.js +0 -18
- package/vendor/mozjpeg/package.json +0 -49
- package/vendor/mozjpeg/vendor/cjpeg +0 -0
- package/vendor/mozjpeg/vendor/source/mozjpeg.tar.gz +0 -0
- package/vendor/p-pipe/index.js +0 -22
- package/vendor/plur/index.js +0 -32
- package/vendor/pretty-bytes/index.js +0 -71
- 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.
|
|
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
|
-
```
|
|
29
|
-
|
|
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:
|
|
34
|
+
"name": "my-package",
|
|
35
35
|
// The search pattern used for retrieving compiled distribution files.
|
|
36
|
-
from:
|
|
36
|
+
"from": "dist/**/*.js",
|
|
37
37
|
// The output directory for browser-bundled files.
|
|
38
|
-
to:
|
|
38
|
+
"to": "browser"
|
|
39
39
|
},
|
|
40
40
|
// The paths for directories to delete before build.
|
|
41
|
-
cleanPaths: [
|
|
42
|
-
|
|
41
|
+
"cleanPaths": [
|
|
42
|
+
"dist",
|
|
43
|
+
"browser"
|
|
44
|
+
],
|
|
45
|
+
"dist": {
|
|
43
46
|
// Name of the entry the distribution file.
|
|
44
|
-
main:
|
|
47
|
+
"main": "dist/main",
|
|
45
48
|
// The search pattern used for gathering source files for distribution.
|
|
46
|
-
from:
|
|
49
|
+
"from": "src/**/!(*.test).js",
|
|
47
50
|
// The output directory for the distribution files.
|
|
48
|
-
to:
|
|
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:
|
|
57
|
+
"from": "src/fonts/**/*",
|
|
55
58
|
// Path to output fonts
|
|
56
|
-
to:
|
|
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:
|
|
65
|
+
"from": "src/img/**/*.+(png|jpg|jpeg|gif|svg)",
|
|
63
66
|
// Path to output images
|
|
64
|
-
to:
|
|
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:
|
|
71
|
+
"template": "MAIN.md",
|
|
69
72
|
// Options for formatting the output readme.
|
|
70
|
-
options:
|
|
73
|
+
"options": "utf8",
|
|
71
74
|
// The name of the output documentation markdown file.
|
|
72
|
-
file:
|
|
75
|
+
"file": "README.md",
|
|
73
76
|
// Location of files to use for compiling documentation into the readme.
|
|
74
|
-
from: [
|
|
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:
|
|
89
|
+
"from": "sass/**/*.+(scss|sass)",
|
|
85
90
|
// The directory were sass files will be stored.
|
|
86
|
-
path:
|
|
91
|
+
"path": "sass",
|
|
87
92
|
// The destination path for where generated CSS (from SASS files) should go.
|
|
88
|
-
to:
|
|
93
|
+
"to": "browser/css"
|
|
89
94
|
},
|
|
90
95
|
// The directory where your source files are stored (the files you manually created).
|
|
91
|
-
srcPath:
|
|
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: [
|
|
102
|
+
"path": [
|
|
103
|
+
"src"
|
|
104
|
+
],
|
|
98
105
|
// The search pattern for watching files for changes.
|
|
99
|
-
watch:
|
|
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:
|
|
114
|
+
"from": "src/**/*.ts",
|
|
108
115
|
// Directory where parsed typescript files go.
|
|
109
|
-
to:
|
|
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.
|
|
275
|
+
Add the following to the exports in your `build-tools.config.json`:
|
|
190
276
|
|
|
191
|
-
```
|
|
192
|
-
|
|
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:
|
|
283
|
+
"from": "src/fonts/**/*",
|
|
198
284
|
// Output directory for your font files
|
|
199
|
-
to:
|
|
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.
|
|
294
|
+
Add the following to the exports in your `build-tools.config.json`:
|
|
209
295
|
|
|
210
|
-
```
|
|
211
|
-
|
|
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:
|
|
302
|
+
"from": "src/img/**/*.+(png|jpg|jpeg|gif|svg)",
|
|
217
303
|
// Output directory for your images files
|
|
218
|
-
to:
|
|
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.
|
|
313
|
+
Add the following to the exports in your `build-tools.config.json`:
|
|
228
314
|
|
|
229
|
-
```
|
|
230
|
-
|
|
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:
|
|
321
|
+
"from": "sass/**/*.+(scss|sass)",
|
|
236
322
|
// Optional but nice to add (future support), add the directory where your sass files exist
|
|
237
|
-
path:
|
|
323
|
+
"path": "sass",
|
|
238
324
|
// Output directory for your compiled css files, recommend css directory within your browser output directory
|
|
239
|
-
to:
|
|
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.
|
|
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.
|
|
352
|
+
Add the following to the exports in your `build-tools.config.json`:
|
|
267
353
|
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
readme: {
|
|
354
|
+
```json
|
|
355
|
+
{
|
|
356
|
+
"readme": {
|
|
271
357
|
// Location of files to use for compiling documentation into the readme.
|
|
272
|
-
from:
|
|
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:
|
|
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:
|
|
366
|
+
"from": "src/**/*.ts",
|
|
281
367
|
// Directory where parsed typescript files go
|
|
282
|
-
to:
|
|
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
|
|
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
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
<
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
**
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
*
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
*
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
<
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
**
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
|
436
|
-
|
|
|
437
|
-
|
|
|
438
|
-
|
|
439
|
-
<
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
<
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
**
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
|
507
|
-
|
|
|
508
|
-
|
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
**
|
|
517
|
-
|
|
518
|
-
|
|
|
519
|
-
| --- |
|
|
520
|
-
|
|
|
521
|
-
|
|
|
522
|
-
|
|
523
|
-
<
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
<a name="module_gulpConfig..
|
|
542
|
-
|
|
543
|
-
### gulpConfig~
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
**Kind**: inner typedef of [<code>gulpConfig</code>](#module_gulpConfig)
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
|
564
|
-
|
|
|
565
|
-
|
|
|
566
|
-
|
|
567
|
-
<
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
|
588
|
-
|
|
|
589
|
-
|
|
|
590
|
-
|
|
|
591
|
-
|
|
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.<string, Setting></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.<string, Setting></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.<string, Setting></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.<string, Setting></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.<string, Setting></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.<string, Setting></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.<string, Setting></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.<string, Setting></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.<(\*\|void)></code>
|
|
728
|
-
* [.exports.beforeEach](#module_testHelpers.exports.beforeEach) ⇒ <code>Promise.<(\*\|void)></code>
|
|
729
|
-
* [.exports.afterEach](#module_testHelpers.exports.afterEach) ⇒ <code>Promise.<\*></code>
|
|
730
|
-
* [.setDefaults(testDir)](#module_testHelpers.setDefaults)
|
|
731
|
-
|
|
732
|
-
<a name="module_testHelpers.exports.createTempDir"></a>
|
|
733
|
-
|
|
734
|
-
### testHelpers.exports.createTempDir ⇒ <code>Promise.<(\*\|void)></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.<(\*\|void)></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.<\*></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>"test-temp"</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.<\*></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.<Array.<string>></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>"''"</code> |
|
|
802
|
-
| [distPath] | <code>string</code> | <code>"''"</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>"'src/config/path/sass/for'"</code> |
|
|
814
|
-
| [cssPath] | <code>string</code> | <code>"'css/config/path'"</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.<\*></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>"src/images/pattern"</code> |
|
|
870
|
-
| [imageDest] | <code>string</code> | <code>"dest/image/folder"</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>"'src/config/path/dist/for'"</code> |
|
|
882
|
-
| [distFinalPath] | <code>string</code> | <code>"'dist/config/path'"</code> |
|
|
883
|
-
| [tsSearch] | <code>string</code> | <code>"'ts/search/config/path'"</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>'config/for/ts'</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>"'src/config/path/dist/for'"</code> |
|
|
906
|
-
| [destPath] | <code>string</code> | <code>"'dist/config/path'"</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.<Array.<string>></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.<string></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.<string, BooleanSetting></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.<string, Setting></code>
|
|
450
|
+
* [~DistConfig](#module_gulpConfig..DistConfig) : <code>Object.<string, Setting></code>
|
|
451
|
+
* [~FontConfig](#module_gulpConfig..FontConfig) : <code>Object.<string, Setting></code>
|
|
452
|
+
* [~ImageConfig](#module_gulpConfig..ImageConfig) : <code>Object.<string, Setting></code>
|
|
453
|
+
* [~ReadmeConfig](#module_gulpConfig..ReadmeConfig) : <code>Object.<string, Setting></code>
|
|
454
|
+
* [~SassConfig](#module_gulpConfig..SassConfig) : <code>Object.<string, Setting></code>
|
|
455
|
+
* [~TestConfig](#module_gulpConfig..TestConfig) : <code>Object.<string, Setting></code>
|
|
456
|
+
* [~TsConfig](#module_gulpConfig..TsConfig) : <code>Object.<string, Setting></code>
|
|
457
|
+
* [~Configurations](#module_gulpConfig..Configurations) : <code>Object.<string, Setting></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.<string></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.<string, BooleanSetting></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.<string, Setting></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.<string, Setting></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.<string, Setting></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.<string, Setting></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.<string, Setting></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.<string, Setting></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.<string, Setting></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.<string, Setting></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.<string, Setting></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
|
+
|