js-build-tools 5.2.0 → 5.3.1
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 +101 -10
- package/dist/build.js +63 -58
- package/dist/build.min.js +1 -1
- package/dist/bundle.js +27 -27
- package/dist/bundleLint.js +16 -16
- package/dist/bundleMinify.js +13 -13
- package/dist/compileReadme.js +10 -10
- package/dist/copyFonts.js +13 -13
- package/dist/default.js +15 -15
- package/dist/dist.js +10 -10
- package/dist/distLint.js +16 -16
- package/dist/distMinify.js +13 -13
- package/dist/images.js +10 -10
- package/dist/partials/addToReadme.js +17 -17
- package/dist/partials/beginWatcher.js +12 -12
- package/dist/partials/clean.js +14 -14
- package/dist/partials/copyFor.js +12 -12
- package/dist/partials/distFor.js +21 -21
- package/dist/partials/distForSrc.js +11 -11
- package/dist/partials/distSeries.js +19 -19
- package/dist/partials/imagesFor.js +7 -13
- package/dist/partials/loadPeer.js +99 -0
- package/dist/partials/minifyFor.js +16 -16
- package/dist/partials/readmeTemplate.js +14 -14
- package/dist/partials/removeDirectory.js +29 -29
- package/dist/partials/runOnChange.js +28 -28
- package/dist/partials/sassFor.js +28 -28
- package/dist/partials/standardLint.js +3 -5
- package/dist/partials/tsFor.js +8 -20
- package/dist/partials/typeDocsFor.js +228 -0
- package/dist/partials.js +26 -0
- package/dist/partials.min.js +1 -1
- package/dist/sass.js +10 -10
- package/dist/test-helpers/setUp.js +89 -89
- package/dist/test-helpers/standardLintWithRealStandard.js +27 -27
- package/dist/testFull.js +20 -20
- package/dist/testHelpers.js +10 -10
- package/dist/testQuick.js +22 -22
- package/dist/typeDocs.js +14 -0
- package/dist/typeDocs.min.js +1 -0
- package/dist/typeScript.js +9 -9
- package/dist/utilities/dotGet.js +46 -46
- package/dist/utilities/dotNotate.js +46 -46
- package/dist/utilities/dotSet.js +37 -37
- package/dist/utilities/isObject.js +8 -8
- package/dist/utilities/strAfter.js +11 -11
- package/dist/utilities/strBefore.js +11 -11
- package/dist/watchFull.js +10 -10
- package/dist/watchTest.js +16 -16
- package/functions/build.mjs +7 -2
- package/functions/build.test.mjs +29 -0
- package/functions/partials/imagesFor.mjs +7 -13
- package/functions/partials/loadPeer.mjs +75 -0
- package/functions/partials/loadPeer.test.mjs +58 -0
- package/functions/partials/standardLint.mjs +3 -5
- package/functions/partials/tsFor.mjs +4 -20
- package/functions/partials/typeDocsFor.mjs +199 -0
- package/functions/partials/typeDocsFor.test.mjs +204 -0
- package/functions/partials.mjs +2 -0
- package/functions/partials.test.mjs +1 -1
- package/functions/typeDocs.mjs +9 -0
- package/functions/typeDocs.test.mjs +11 -0
- package/gulp.config.mjs +24 -2
- package/gulpfile.base.js +2 -0
- package/gulpfile.base.mjs +1 -0
- package/package.json +12 -7
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@ Using this tool suite, you can:
|
|
|
11
11
|
* Bundle your distribution files to be used in a browser environment.
|
|
12
12
|
* Run tests and watch for changes.
|
|
13
13
|
* Generate jsdoc readme files.
|
|
14
|
+
* Generate HTML documentation straight from your TypeScript source (with TypeDoc), with a module for each of your folders.
|
|
14
15
|
|
|
15
16
|
## Installation
|
|
16
17
|
|
|
@@ -34,6 +35,11 @@ provided are the defaults):
|
|
|
34
35
|
"name": "my-package",
|
|
35
36
|
// The search pattern used for retrieving compiled distribution files.
|
|
36
37
|
"from": "dist/**/*.js",
|
|
38
|
+
// Module names or file paths which resolve to an empty object ({}) in the bundle instead of their real contents.
|
|
39
|
+
"ignore": [],
|
|
40
|
+
// Module names or file paths left out of the bundle entirely (requiring one at runtime throws, unless something
|
|
41
|
+
// else provides it, for example a script tag which loads it separately).
|
|
42
|
+
"exclude": [],
|
|
37
43
|
// The output directory for browser-bundled files.
|
|
38
44
|
"to": "browser"
|
|
39
45
|
},
|
|
@@ -50,6 +56,23 @@ provided are the defaults):
|
|
|
50
56
|
// The output directory for the distribution files.
|
|
51
57
|
"to": "dist"
|
|
52
58
|
},
|
|
59
|
+
"docs": {
|
|
60
|
+
// Toggle generating the HTML documentation from the TypeScript source (see 'Configure TypeScript documentation').
|
|
61
|
+
// When on, the build does this instead of generating the readme from the jsdoc comments.
|
|
62
|
+
"enabled": false,
|
|
63
|
+
// The directory holding the TypeScript source, each folder in it becomes a module of the documentation.
|
|
64
|
+
"from": "src",
|
|
65
|
+
// The markdown file used as the front page of the documentation.
|
|
66
|
+
"index": "MAIN.md",
|
|
67
|
+
// How much TypeDoc reports: Verbose, Info, Warn, Error or None.
|
|
68
|
+
"logLevel": "Warn",
|
|
69
|
+
// The name of the documentation, defaults to the name in your package.json.
|
|
70
|
+
"title": "",
|
|
71
|
+
// The directory to generate the documentation in (it is cleared first).
|
|
72
|
+
"to": "docs",
|
|
73
|
+
// The tsconfig file to read the source with, false to use the one of 'typescript.config'.
|
|
74
|
+
"tsconfig": false
|
|
75
|
+
},
|
|
53
76
|
"fonts": {
|
|
54
77
|
// Toggle copy directory of fonts on
|
|
55
78
|
"enabled": false,
|
|
@@ -130,6 +153,7 @@ For example:
|
|
|
130
153
|
const {
|
|
131
154
|
build,
|
|
132
155
|
defaultCmd,
|
|
156
|
+
docs,
|
|
133
157
|
partials,
|
|
134
158
|
readme,
|
|
135
159
|
sass,
|
|
@@ -145,6 +169,7 @@ const {
|
|
|
145
169
|
// You can list your available tasks by running `gulp --tasks`.
|
|
146
170
|
exports.build = build
|
|
147
171
|
exports.default = defaultCmd
|
|
172
|
+
exports.docs = docs
|
|
148
173
|
exports.readme = readme
|
|
149
174
|
exports.sass = sass
|
|
150
175
|
exports.testFull = testFull
|
|
@@ -161,6 +186,7 @@ exports.watchTest = watchTest
|
|
|
161
186
|
export {
|
|
162
187
|
build,
|
|
163
188
|
defaultCmd,
|
|
189
|
+
docs,
|
|
164
190
|
partials,
|
|
165
191
|
readme,
|
|
166
192
|
sass,
|
|
@@ -248,6 +274,7 @@ module.exports = {
|
|
|
248
274
|
### Configure HTML JS Documentation (optional)
|
|
249
275
|
|
|
250
276
|
It may be desirable to generate HTML documentation for your JS files.
|
|
277
|
+
(For a TypeScript project, see 'Configure TypeScript documentation' instead.)
|
|
251
278
|
|
|
252
279
|
Create a `.jsdoc.conf.js` file and add the following:
|
|
253
280
|
|
|
@@ -268,6 +295,27 @@ const jsDocBase = require('js-build-tools/jsdoc.base')
|
|
|
268
295
|
module.exports = jsDocBase
|
|
269
296
|
```
|
|
270
297
|
|
|
298
|
+
### Configure what the browser bundle leaves out (optional)
|
|
299
|
+
|
|
300
|
+
A dependency can be reached from your code without being needed in the browser, and bundling it can add a lot of size.
|
|
301
|
+
Two settings in `browser` handle this, both take module names or file paths (see browserify's `b.ignore(file)` and
|
|
302
|
+
`b.exclude(file)`):
|
|
303
|
+
|
|
304
|
+
```json
|
|
305
|
+
{
|
|
306
|
+
"browser": {
|
|
307
|
+
// Resolves to an empty object ({}) in the bundle instead of the real module. This suits a dependency which is only
|
|
308
|
+
// reached because it is the default value of an option you always override with your own (for example a selector
|
|
309
|
+
// engine's default DOM adapter). Anything only that module requires is left out too. Your code must never actually
|
|
310
|
+
// use the real module, so keep overriding that option.
|
|
311
|
+
"ignore": ["some-default-adapter"],
|
|
312
|
+
// Left out of the bundle entirely. Requiring it at runtime throws unless something else provides it, for example a
|
|
313
|
+
// script tag which loads it separately, so this suits a large library which the page already loads.
|
|
314
|
+
"exclude": ["a-library-the-page-loads"]
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
```
|
|
318
|
+
|
|
271
319
|
### Configure move fonts (optional)
|
|
272
320
|
|
|
273
321
|
Be able to copy a source directory of fonts into the distribution path.
|
|
@@ -333,21 +381,29 @@ Create a `tsconfig.json` file in your project root with the following:
|
|
|
333
381
|
|
|
334
382
|
```json
|
|
335
383
|
{
|
|
336
|
-
"
|
|
337
|
-
|
|
338
|
-
],
|
|
384
|
+
"include": ["src/**/*.ts"],
|
|
385
|
+
"exclude": ["src/**/*.test.*"],
|
|
339
386
|
"compilerOptions": {
|
|
340
|
-
"
|
|
341
|
-
"target": "
|
|
342
|
-
"
|
|
343
|
-
"
|
|
387
|
+
"strict": true,
|
|
388
|
+
"target": "es2020",
|
|
389
|
+
"module": "commonjs",
|
|
390
|
+
"moduleResolution": "node10",
|
|
391
|
+
"ignoreDeprecations": "6.0",
|
|
392
|
+
"skipLibCheck": true,
|
|
393
|
+
"esModuleInterop": true,
|
|
394
|
+
"declaration": true,
|
|
395
|
+
"types": []
|
|
344
396
|
}
|
|
345
397
|
}
|
|
346
398
|
```
|
|
347
399
|
|
|
348
|
-
The pattern for `"
|
|
349
|
-
The actual pattern used comes from `build-tools.config.json` as `'typescript.from'` setting.
|
|
350
|
-
To create the ts declaration files, you must add the `"declaration": true`.
|
|
400
|
+
The pattern for `"include"` should match your .ts files (and leave out the tests, which can stay `.test.js` files).
|
|
401
|
+
The actual pattern used to compile comes from `build-tools.config.json` as the `'typescript.from'` setting.
|
|
402
|
+
To create the ts declaration files, you must add the `"declaration": true`. The `typescript` package is an optional peer
|
|
403
|
+
dependency, install it in your project with `npm install --save-dev typescript` (versions 5.0 up to, but not including,
|
|
404
|
+
7 are supported). When you write relative imports, leave the `.js` extension off (`import a from './a'`), because
|
|
405
|
+
they stop resolving once the target is a `.ts` file. The compile only builds `.ts` files while `typescript.enabled` is
|
|
406
|
+
on, so convert a whole library at once.
|
|
351
407
|
|
|
352
408
|
Add the following to the exports in your `build-tools.config.json`:
|
|
353
409
|
|
|
@@ -382,6 +438,40 @@ babelConfig.presets.push('@babel/preset-typescript')
|
|
|
382
438
|
module.exports = babelConfig
|
|
383
439
|
```
|
|
384
440
|
|
|
441
|
+
### Configure TypeScript documentation (optional)
|
|
442
|
+
|
|
443
|
+
`jsdoc-to-markdown` only reads `.js` files, so the types in your `.ts` files (and the comments on them) do not reach
|
|
444
|
+
the readme it generates. Instead, this can generate HTML documentation straight from the TypeScript source with
|
|
445
|
+
[TypeDoc](https://typedoc.org/). Every folder in your source directory becomes a module of the documentation, the default
|
|
446
|
+
export of each file (one function per file) is listed under the name of the file, and everything else a file exports (for
|
|
447
|
+
example the types in a `types.ts`) is listed as it is. Index files, tests and declaration files are left out. The
|
|
448
|
+
comments on your code are the documentation, and the types come from the code itself, so `@module`, `@memberOf`,
|
|
449
|
+
`@typedef` and the `{Type}` of `@param` are not needed.
|
|
450
|
+
|
|
451
|
+
`typedoc` is an optional peer dependency (like `typescript`), install it in your project with
|
|
452
|
+
`npm install --save-dev typedoc` (this needs a `typescript` version it supports).
|
|
453
|
+
|
|
454
|
+
Add the following to the exports in your `build-tools.config.json`:
|
|
455
|
+
|
|
456
|
+
```json
|
|
457
|
+
{
|
|
458
|
+
"docs": {
|
|
459
|
+
// Generate the documentation from the TypeScript source
|
|
460
|
+
"enabled": true,
|
|
461
|
+
// The directory holding the TypeScript source, each folder in it becomes a module
|
|
462
|
+
"from": "src",
|
|
463
|
+
// The markdown file used as the front page of the documentation (a short overview of your project)
|
|
464
|
+
"index": "MAIN.md",
|
|
465
|
+
// Where the HTML is generated (the directory is cleared first)
|
|
466
|
+
"to": "docs"
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
While `docs.enabled` is on, `gulp build` generates the documentation instead of the readme, so your `README.md` stays
|
|
472
|
+
hand-written (a short overview which links to the documentation). If you also export `docs` from your gulpfile you can
|
|
473
|
+
run it on its own with `gulp docs`, and can then add the script `"docs": "gulp docs"`.
|
|
474
|
+
|
|
385
475
|
### Configure Scripts
|
|
386
476
|
|
|
387
477
|
In your `package.json` file, add the following scripts:
|
|
@@ -391,6 +481,7 @@ In your `package.json` file, add the following scripts:
|
|
|
391
481
|
"scripts": {
|
|
392
482
|
"build": "gulp build",
|
|
393
483
|
"dev": "gulp",
|
|
484
|
+
"docs": "gulp docs",
|
|
394
485
|
"htmldocs": "jsdoc -R MAIN.md -c ./.jsdoc.conf.js -d docs",
|
|
395
486
|
"readme": "gulp readme",
|
|
396
487
|
"sass": "gulp sass",
|
package/dist/build.js
CHANGED
|
@@ -1,63 +1,68 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
require('core-js/modules/esnext.weak-map.delete-all.js')
|
|
4
|
-
Object.defineProperty(exports, '__esModule', {
|
|
5
|
-
value: true
|
|
6
|
-
})
|
|
7
|
-
exports.build = void 0
|
|
8
|
-
const _bundle = require('./bundle.js')
|
|
9
|
-
const _bundleLint = require('./bundleLint.js')
|
|
10
|
-
const _bundleMinify = require('./bundleMinify.js')
|
|
11
|
-
const _partials = require('./partials.js')
|
|
12
|
-
const _compileReadme = require('./compileReadme.js')
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
require('core-js/modules/esnext.weak-map.delete-all.js')
|
|
4
|
+
Object.defineProperty(exports, '__esModule', {
|
|
5
|
+
value: true
|
|
6
|
+
})
|
|
7
|
+
exports.build = void 0
|
|
8
|
+
const _bundle = require('./bundle.js')
|
|
9
|
+
const _bundleLint = require('./bundleLint.js')
|
|
10
|
+
const _bundleMinify = require('./bundleMinify.js')
|
|
11
|
+
const _partials = require('./partials.js')
|
|
12
|
+
const _compileReadme = require('./compileReadme.js')
|
|
13
|
+
const _typeDocs = require('./typeDocs.js')
|
|
14
|
+
const _distLint = require('./distLint.js')
|
|
15
|
+
const _distMinify = require('./distMinify.js')
|
|
16
|
+
const _gulp = require('gulp')
|
|
17
|
+
const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
|
|
18
|
+
const _copyFonts = require('./copyFonts.js')
|
|
19
|
+
const _images = require('./images.js')
|
|
20
|
+
const _sass = require('./sass.js')
|
|
21
|
+
const _testFull = require('./testFull.js')
|
|
22
|
+
function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
|
|
22
23
|
/**
|
|
23
24
|
* Runs several processes to build and validate the project.
|
|
24
25
|
* Cleans, distributes (lint and minify), bundles (lint and minify), creates the readme, then runs the tests.
|
|
25
26
|
* @memberOf module:js-build-tools
|
|
26
27
|
* @returns {stream.Stream}
|
|
27
|
-
*/
|
|
28
|
-
const build = (done = null) => {
|
|
29
|
-
const distLintMinify = (0, _gulp.parallel)(_distLint.distLint, _distMinify.distMinify)
|
|
30
|
-
const bundleLintMinify = (0, _gulp.parallel)(_bundleLint.bundleLint, _bundleMinify.bundleMinify)
|
|
31
|
-
const buildActions = [(0, _partials.distSeries)(), distLintMinify]
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (gulpConfig.get('
|
|
37
|
-
//
|
|
38
|
-
buildActions.push(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if (gulpConfig.get('
|
|
52
|
-
// Conditionally add
|
|
53
|
-
runActions.push(
|
|
54
|
-
}
|
|
55
|
-
if (gulpConfig.get('
|
|
56
|
-
// Conditionally add
|
|
57
|
-
runActions.push(
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
28
|
+
*/
|
|
29
|
+
const build = (done = null) => {
|
|
30
|
+
const distLintMinify = (0, _gulp.parallel)(_distLint.distLint, _distMinify.distMinify)
|
|
31
|
+
const bundleLintMinify = (0, _gulp.parallel)(_bundleLint.bundleLint, _bundleMinify.bundleMinify)
|
|
32
|
+
const buildActions = [(0, _partials.distSeries)(), distLintMinify]
|
|
33
|
+
const generateDocs = gulpConfig.get('docs.enabled')
|
|
34
|
+
if (generateDocs) {
|
|
35
|
+
// The documentation is generated from the TypeScript source itself, the readme is written by hand
|
|
36
|
+
buildActions.push(_typeDocs.typeDocs)
|
|
37
|
+
} else if (gulpConfig.get('typescript.enabled')) {
|
|
38
|
+
// For ts usage, we need to run the readme on the dist directly since that is where the .js files are located
|
|
39
|
+
buildActions.push(_compileReadme.compileReadme)
|
|
40
|
+
}
|
|
41
|
+
if (gulpConfig.get('browser.enabled')) {
|
|
42
|
+
// If not 'nodeOnly' then we also want to bundle for browser after we complete the dist directory
|
|
43
|
+
buildActions.push(_bundle.bundle)
|
|
44
|
+
buildActions.push(bundleLintMinify)
|
|
45
|
+
}
|
|
46
|
+
const runActions = [(0, _gulp.series)(...buildActions)]
|
|
47
|
+
if (!generateDocs && !gulpConfig.get('typescript.enabled')) {
|
|
48
|
+
// Since we didn't run this in series after dist because of typescript, we need to run it now. Potentially faster here.
|
|
49
|
+
runActions.push(_compileReadme.compileReadme)
|
|
50
|
+
}
|
|
51
|
+
runActions.push(_testFull.testFull)
|
|
52
|
+
if (gulpConfig.get('fonts.enabled')) {
|
|
53
|
+
// Conditionally add Fonts process
|
|
54
|
+
runActions.push(_copyFonts.copyFonts)
|
|
55
|
+
}
|
|
56
|
+
if (gulpConfig.get('images.enabled')) {
|
|
57
|
+
// Conditionally add Images process
|
|
58
|
+
runActions.push(_images.images)
|
|
59
|
+
}
|
|
60
|
+
if (gulpConfig.get('sass.enabled')) {
|
|
61
|
+
// Conditionally add SASS process
|
|
62
|
+
runActions.push(_sass.sass)
|
|
63
|
+
}
|
|
64
|
+
// clean has to finish before anything writes into the output folders - images, fonts and sass all write into
|
|
65
|
+
// browser/, so running clean in parallel with them races (ENOTEMPTY errors from clean, or output deleted mid-write).
|
|
66
|
+
return (0, _gulp.series)(_partials.clean, (0, _gulp.parallel)(...runActions))(done)
|
|
67
|
+
}
|
|
68
|
+
exports.build = build
|
package/dist/build.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.build=void 0;var _bundle=require("./bundle.js"),_bundleLint=require("./bundleLint.js"),_bundleMinify=require("./bundleMinify.js"),_partials=require("./partials.js"),_compileReadme=require("./compileReadme.js"),_distLint=require("./distLint.js"),_distMinify=require("./distMinify.js"),_gulp=require("gulp"),gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_copyFonts=require("./copyFonts.js"),_images=require("./images.js"),_sass=require("./sass.js"),_testFull=require("./testFull.js");function _interopRequireWildcard(e,i){if("function"==typeof WeakMap)var s=new WeakMap,t=new WeakMap;return(_interopRequireWildcard=function(e,i){if(!i&&e&&e.__esModule)return e;var l,r,
|
|
1
|
+
"use strict";require("core-js/modules/esnext.weak-map.delete-all.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.build=void 0;var _bundle=require("./bundle.js"),_bundleLint=require("./bundleLint.js"),_bundleMinify=require("./bundleMinify.js"),_partials=require("./partials.js"),_compileReadme=require("./compileReadme.js"),_typeDocs=require("./typeDocs.js"),_distLint=require("./distLint.js"),_distMinify=require("./distMinify.js"),_gulp=require("gulp"),gulpConfig=_interopRequireWildcard(require("../gulp.config.js")),_copyFonts=require("./copyFonts.js"),_images=require("./images.js"),_sass=require("./sass.js"),_testFull=require("./testFull.js");function _interopRequireWildcard(e,i){if("function"==typeof WeakMap)var s=new WeakMap,t=new WeakMap;return(_interopRequireWildcard=function(e,i){if(!i&&e&&e.__esModule)return e;var l,r,u={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return u;if(l=i?t:s){if(l.has(e))return l.get(e);l.set(e,u)}for(const i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((r=(l=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(r.get||r.set)?l(u,i,r):u[i]=e[i]);return u})(e,i)}const build=(e=null)=>{const i=(0,_gulp.parallel)(_distLint.distLint,_distMinify.distMinify),s=(0,_gulp.parallel)(_bundleLint.bundleLint,_bundleMinify.bundleMinify),t=[(0,_partials.distSeries)(),i],l=gulpConfig.get("docs.enabled");l?t.push(_typeDocs.typeDocs):gulpConfig.get("typescript.enabled")&&t.push(_compileReadme.compileReadme),gulpConfig.get("browser.enabled")&&(t.push(_bundle.bundle),t.push(s));const r=[(0,_gulp.series)(...t)];return l||gulpConfig.get("typescript.enabled")||r.push(_compileReadme.compileReadme),r.push(_testFull.testFull),gulpConfig.get("fonts.enabled")&&r.push(_copyFonts.copyFonts),gulpConfig.get("images.enabled")&&r.push(_images.images),gulpConfig.get("sass.enabled")&&r.push(_sass.sass),(0,_gulp.series)(_partials.clean,(0,_gulp.parallel)(...r))(e)};exports.build=build;
|
package/dist/bundle.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
require('core-js/modules/esnext.weak-map.delete-all.js')
|
|
4
|
-
Object.defineProperty(exports, '__esModule', {
|
|
5
|
-
value: true
|
|
6
|
-
})
|
|
7
|
-
exports.bundle = void 0
|
|
8
|
-
const _browserify = _interopRequireDefault(require('browserify'))
|
|
9
|
-
const _gulp = require('gulp')
|
|
10
|
-
const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
|
|
11
|
-
const _vinylSourceStream = _interopRequireDefault(require('vinyl-source-stream'))
|
|
12
|
-
function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
|
|
13
|
-
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
require('core-js/modules/esnext.weak-map.delete-all.js')
|
|
4
|
+
Object.defineProperty(exports, '__esModule', {
|
|
5
|
+
value: true
|
|
6
|
+
})
|
|
7
|
+
exports.bundle = void 0
|
|
8
|
+
const _browserify = _interopRequireDefault(require('browserify'))
|
|
9
|
+
const _gulp = require('gulp')
|
|
10
|
+
const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
|
|
11
|
+
const _vinylSourceStream = _interopRequireDefault(require('vinyl-source-stream'))
|
|
12
|
+
function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
|
|
13
|
+
function _interopRequireDefault (e) { return e && e.__esModule ? e : { default: e } }
|
|
14
14
|
/**
|
|
15
15
|
* Starting at the distribution entry point, bundle all the files into a single file and store them in the specified output directory.
|
|
16
16
|
*
|
|
@@ -20,17 +20,17 @@ function _interopRequireDefault (e) { return e && e.__esModule ? e : { default:
|
|
|
20
20
|
* code must not require it, or provide it another way, such as a separate script tag).
|
|
21
21
|
* @memberOf module:js-build-tools
|
|
22
22
|
* @returns {stream.Stream}
|
|
23
|
-
*/
|
|
24
|
-
const bundle = () => {
|
|
25
|
-
const bundler = (0, _browserify.default)(gulpConfig.get('dist.main'))
|
|
26
|
-
const ignore = gulpConfig.get('browser.ignore')
|
|
27
|
-
const exclude = gulpConfig.get('browser.exclude')
|
|
28
|
-
if (ignore && ignore.length) {
|
|
29
|
-
bundler.ignore(ignore)
|
|
30
|
-
}
|
|
31
|
-
if (exclude && exclude.length) {
|
|
32
|
-
bundler.exclude(exclude)
|
|
33
|
-
}
|
|
34
|
-
return bundler.bundle().pipe((0, _vinylSourceStream.default)(`${gulpConfig.get('browser.name')}.js`)).pipe((0, _gulp.dest)(gulpConfig.get('browser.to')))
|
|
35
|
-
}
|
|
36
|
-
exports.bundle = bundle
|
|
23
|
+
*/
|
|
24
|
+
const bundle = () => {
|
|
25
|
+
const bundler = (0, _browserify.default)(gulpConfig.get('dist.main'))
|
|
26
|
+
const ignore = gulpConfig.get('browser.ignore')
|
|
27
|
+
const exclude = gulpConfig.get('browser.exclude')
|
|
28
|
+
if (ignore && ignore.length) {
|
|
29
|
+
bundler.ignore(ignore)
|
|
30
|
+
}
|
|
31
|
+
if (exclude && exclude.length) {
|
|
32
|
+
bundler.exclude(exclude)
|
|
33
|
+
}
|
|
34
|
+
return bundler.bundle().pipe((0, _vinylSourceStream.default)(`${gulpConfig.get('browser.name')}.js`)).pipe((0, _gulp.dest)(gulpConfig.get('browser.to')))
|
|
35
|
+
}
|
|
36
|
+
exports.bundle = bundle
|
package/dist/bundleLint.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
require('core-js/modules/esnext.weak-map.delete-all.js')
|
|
4
|
-
Object.defineProperty(exports, '__esModule', {
|
|
5
|
-
value: true
|
|
6
|
-
})
|
|
7
|
-
exports.bundleLint = void 0
|
|
8
|
-
const _gulp = require('gulp')
|
|
9
|
-
const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
|
|
10
|
-
const _standardLint = require('./partials/standardLint.js')
|
|
11
|
-
function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
require('core-js/modules/esnext.weak-map.delete-all.js')
|
|
4
|
+
Object.defineProperty(exports, '__esModule', {
|
|
5
|
+
value: true
|
|
6
|
+
})
|
|
7
|
+
exports.bundleLint = void 0
|
|
8
|
+
const _gulp = require('gulp')
|
|
9
|
+
const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
|
|
10
|
+
const _standardLint = require('./partials/standardLint.js')
|
|
11
|
+
function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
|
|
12
12
|
/**
|
|
13
13
|
* Applies Standard code style linting to bundled file.
|
|
14
14
|
* @memberOf module:js-build-tools
|
|
15
15
|
* @returns {stream.Stream}
|
|
16
|
-
*/
|
|
17
|
-
const bundleLint = () => (0, _gulp.src)(`${gulpConfig.get('browser.to')}/${gulpConfig.get('browser.name')}.js`).pipe((0, _standardLint.standardLint)({
|
|
18
|
-
fix: true
|
|
19
|
-
})).pipe((0, _gulp.dest)(gulpConfig.get('browser.to')))
|
|
20
|
-
exports.bundleLint = bundleLint
|
|
16
|
+
*/
|
|
17
|
+
const bundleLint = () => (0, _gulp.src)(`${gulpConfig.get('browser.to')}/${gulpConfig.get('browser.name')}.js`).pipe((0, _standardLint.standardLint)({
|
|
18
|
+
fix: true
|
|
19
|
+
})).pipe((0, _gulp.dest)(gulpConfig.get('browser.to')))
|
|
20
|
+
exports.bundleLint = bundleLint
|
package/dist/bundleMinify.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
require('core-js/modules/esnext.weak-map.delete-all.js')
|
|
4
|
-
Object.defineProperty(exports, '__esModule', {
|
|
5
|
-
value: true
|
|
6
|
-
})
|
|
7
|
-
exports.bundleMinify = void 0
|
|
8
|
-
const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
|
|
9
|
-
const _minifyFor = require('./partials/minifyFor.js')
|
|
10
|
-
function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
require('core-js/modules/esnext.weak-map.delete-all.js')
|
|
4
|
+
Object.defineProperty(exports, '__esModule', {
|
|
5
|
+
value: true
|
|
6
|
+
})
|
|
7
|
+
exports.bundleMinify = void 0
|
|
8
|
+
const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
|
|
9
|
+
const _minifyFor = require('./partials/minifyFor.js')
|
|
10
|
+
function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
|
|
11
11
|
/**
|
|
12
12
|
* Creates the minified bundle file.
|
|
13
13
|
* @memberOf module:js-build-tools
|
|
14
14
|
* @returns {*}
|
|
15
|
-
*/
|
|
16
|
-
const bundleMinify = () => (0, _minifyFor.minifyFor)(`${gulpConfig.get('browser.to')}/${gulpConfig.get('browser.name')}.js`, gulpConfig.get('browser.to'))
|
|
17
|
-
exports.bundleMinify = bundleMinify
|
|
15
|
+
*/
|
|
16
|
+
const bundleMinify = () => (0, _minifyFor.minifyFor)(`${gulpConfig.get('browser.to')}/${gulpConfig.get('browser.name')}.js`, gulpConfig.get('browser.to'))
|
|
17
|
+
exports.bundleMinify = bundleMinify
|
package/dist/compileReadme.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.compileReadme = void 0
|
|
7
|
-
const _partials = require('./partials.js')
|
|
8
|
-
const _gulp = require('gulp')
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.compileReadme = void 0
|
|
7
|
+
const _partials = require('./partials.js')
|
|
8
|
+
const _gulp = require('gulp')
|
|
9
9
|
/**
|
|
10
10
|
* Generate the README.md file based off of the template, then append the generated documentation.
|
|
11
11
|
* @memberOf module:js-build-tools
|
|
12
12
|
* @returns {stream.Stream}
|
|
13
|
-
*/
|
|
14
|
-
const compileReadme = exports.compileReadme = (0, _gulp.series)(_partials.readmeTemplate, _partials.addToReadme)
|
|
13
|
+
*/
|
|
14
|
+
const compileReadme = exports.compileReadme = (0, _gulp.series)(_partials.readmeTemplate, _partials.addToReadme)
|
package/dist/copyFonts.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
require('core-js/modules/esnext.weak-map.delete-all.js')
|
|
4
|
-
Object.defineProperty(exports, '__esModule', {
|
|
5
|
-
value: true
|
|
6
|
-
})
|
|
7
|
-
exports.copyFonts = void 0
|
|
8
|
-
const _copyFor = require('./partials/copyFor.js')
|
|
9
|
-
const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
|
|
10
|
-
function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
require('core-js/modules/esnext.weak-map.delete-all.js')
|
|
4
|
+
Object.defineProperty(exports, '__esModule', {
|
|
5
|
+
value: true
|
|
6
|
+
})
|
|
7
|
+
exports.copyFonts = void 0
|
|
8
|
+
const _copyFor = require('./partials/copyFor.js')
|
|
9
|
+
const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
|
|
10
|
+
function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
|
|
11
11
|
/**
|
|
12
12
|
* Move the font files into the browser directory.
|
|
13
13
|
* @memberOf module:js-build-tools
|
|
14
14
|
* @return {stream.Stream}
|
|
15
|
-
*/
|
|
16
|
-
const copyFonts = () => (0, _copyFor.copyFor)(gulpConfig.get('fonts.from'), gulpConfig.get('fonts.to'))
|
|
17
|
-
exports.copyFonts = copyFonts
|
|
15
|
+
*/
|
|
16
|
+
const copyFonts = () => (0, _copyFor.copyFor)(gulpConfig.get('fonts.from'), gulpConfig.get('fonts.to'))
|
|
17
|
+
exports.copyFonts = copyFonts
|
package/dist/default.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
require('core-js/modules/esnext.weak-map.delete-all.js')
|
|
4
|
-
Object.defineProperty(exports, '__esModule', {
|
|
5
|
-
value: true
|
|
6
|
-
})
|
|
7
|
-
exports.defaultCmd = void 0
|
|
8
|
-
const _dist = require('./dist.js')
|
|
9
|
-
const _bundle = require('./bundle.js')
|
|
10
|
-
const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
|
|
11
|
-
const _gulp = require('gulp')
|
|
12
|
-
function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
require('core-js/modules/esnext.weak-map.delete-all.js')
|
|
4
|
+
Object.defineProperty(exports, '__esModule', {
|
|
5
|
+
value: true
|
|
6
|
+
})
|
|
7
|
+
exports.defaultCmd = void 0
|
|
8
|
+
const _dist = require('./dist.js')
|
|
9
|
+
const _bundle = require('./bundle.js')
|
|
10
|
+
const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
|
|
11
|
+
const _gulp = require('gulp')
|
|
12
|
+
function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
|
|
13
13
|
/**
|
|
14
14
|
* Recommended as the default task, runs the simple dist and bundle tasks.
|
|
15
15
|
* @memberOf module:js-build-tools
|
|
16
16
|
* @param {function} [done=null]
|
|
17
17
|
* @returns {stream.Stream}
|
|
18
|
-
*/
|
|
19
|
-
const defaultCmd = (done = null) => gulpConfig.get('browser.enabled') ? (0, _gulp.series)(_dist.dist, _bundle.bundle)(done) : (0, _gulp.series)(_dist.dist)(done)
|
|
20
|
-
exports.defaultCmd = defaultCmd
|
|
18
|
+
*/
|
|
19
|
+
const defaultCmd = (done = null) => gulpConfig.get('browser.enabled') ? (0, _gulp.series)(_dist.dist, _bundle.bundle)(done) : (0, _gulp.series)(_dist.dist)(done)
|
|
20
|
+
exports.defaultCmd = defaultCmd
|
package/dist/dist.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.dist = void 0
|
|
7
|
-
const _distFor = require('./partials/distFor.js')
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.dist = void 0
|
|
7
|
+
const _distFor = require('./partials/distFor.js')
|
|
8
8
|
/**
|
|
9
9
|
* Simplified distribution tasks which will use arguments from distFor.
|
|
10
10
|
* @memberOf module:js-build-tools
|
|
11
11
|
* @returns {*}
|
|
12
|
-
*/
|
|
13
|
-
const dist = () => (0, _distFor.distFor)()
|
|
14
|
-
exports.dist = dist
|
|
12
|
+
*/
|
|
13
|
+
const dist = () => (0, _distFor.distFor)()
|
|
14
|
+
exports.dist = dist
|
package/dist/distLint.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
require('core-js/modules/esnext.weak-map.delete-all.js')
|
|
4
|
-
Object.defineProperty(exports, '__esModule', {
|
|
5
|
-
value: true
|
|
6
|
-
})
|
|
7
|
-
exports.distLint = void 0
|
|
8
|
-
const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
|
|
9
|
-
const _gulp = require('gulp')
|
|
10
|
-
const _standardLint = require('./partials/standardLint.js')
|
|
11
|
-
function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
require('core-js/modules/esnext.weak-map.delete-all.js')
|
|
4
|
+
Object.defineProperty(exports, '__esModule', {
|
|
5
|
+
value: true
|
|
6
|
+
})
|
|
7
|
+
exports.distLint = void 0
|
|
8
|
+
const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
|
|
9
|
+
const _gulp = require('gulp')
|
|
10
|
+
const _standardLint = require('./partials/standardLint.js')
|
|
11
|
+
function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; let o; let i; const f = { __proto__: null, default: e }; if (e === null || typeof e !== 'object' && typeof e !== 'function') return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f) } for (const t in e) t !== 'default' && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f })(e, t) }
|
|
12
12
|
/**
|
|
13
13
|
* Applies Standard code style linting to distribution files.
|
|
14
14
|
* @memberOf module:js-build-tools
|
|
15
15
|
* @returns {*}
|
|
16
|
-
*/
|
|
17
|
-
const distLint = () => (0, _gulp.src)(gulpConfig.get('browser.from')).pipe((0, _standardLint.standardLint)({
|
|
18
|
-
fix: true
|
|
19
|
-
})).pipe((0, _gulp.dest)(gulpConfig.get('dist.to')))
|
|
20
|
-
exports.distLint = distLint
|
|
16
|
+
*/
|
|
17
|
+
const distLint = () => (0, _gulp.src)(gulpConfig.get('browser.from')).pipe((0, _standardLint.standardLint)({
|
|
18
|
+
fix: true
|
|
19
|
+
})).pipe((0, _gulp.dest)(gulpConfig.get('dist.to')))
|
|
20
|
+
exports.distLint = distLint
|