js-build-tools 4.1.1 → 5.1.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 +274 -267
- package/babel.config.js +18 -1
- package/dist/build.js +58 -56
- package/dist/build.min.js +1 -1
- package/dist/bundle.js +16 -16
- package/dist/bundleLint.js +16 -20
- package/dist/bundleLint.min.js +1 -1
- 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 -20
- package/dist/distLint.min.js +1 -1
- 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 -9
- 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 +56 -21
- package/dist/partials/minifyFor.js +16 -16
- package/dist/partials/readmeTemplate.js +14 -14
- package/dist/partials/removeDirectory.js +37 -13
- package/dist/partials/runOnChange.js +28 -28
- package/dist/partials/sassFor.js +28 -22
- package/dist/partials/standardLint.js +96 -0
- package/dist/partials.js +110 -103
- 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 +28 -0
- package/dist/testFull.js +3 -3
- package/dist/testHelpers.js +10 -10
- package/dist/testQuick.js +3 -3
- 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 +6 -3
- package/functions/build.test.mjs +31 -0
- package/functions/bundleLint.mjs +2 -6
- package/functions/bundleLint.test.mjs +3 -0
- package/functions/distLint.mjs +2 -6
- package/functions/distLint.test.mjs +3 -0
- package/functions/partials/copyFor.mjs +2 -1
- package/functions/partials/copyFor.test.mjs +18 -0
- package/functions/partials/imagesFor.mjs +35 -3
- package/functions/partials/imagesFor.test.mjs +83 -1
- package/functions/partials/removeDirectory.mjs +28 -14
- package/functions/partials/removeDirectory.test.mjs +44 -0
- package/functions/partials/sassFor.mjs +5 -2
- package/functions/partials/sassFor.test.mjs +22 -4
- package/functions/partials/standardLint.mjs +80 -0
- package/functions/partials/standardLint.test.mjs +99 -0
- package/functions/partials.mjs +1 -0
- package/functions/partials.test.mjs +1 -1
- package/functions/test-helpers/standardLintWithRealStandard.mjs +21 -0
- package/package.json +15 -4
package/dist/partials.js
CHANGED
|
@@ -1,103 +1,110 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
Object.defineProperty(exports, 'addToReadme', {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _addToReadme.addToReadme
|
|
10
|
-
}
|
|
11
|
-
})
|
|
12
|
-
Object.defineProperty(exports, 'beginWatcher', {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _beginWatcher.beginWatcher
|
|
16
|
-
}
|
|
17
|
-
})
|
|
18
|
-
Object.defineProperty(exports, 'clean', {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _clean.clean
|
|
22
|
-
}
|
|
23
|
-
})
|
|
24
|
-
Object.defineProperty(exports, 'copyFor', {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _copyFor.copyFor
|
|
28
|
-
}
|
|
29
|
-
})
|
|
30
|
-
Object.defineProperty(exports, 'distFor', {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _distFor.distFor
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
Object.defineProperty(exports, 'distForSrc', {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _distForSrc.distForSrc
|
|
40
|
-
}
|
|
41
|
-
})
|
|
42
|
-
Object.defineProperty(exports, 'distSeries', {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function () {
|
|
45
|
-
return _distSeries.distSeries
|
|
46
|
-
}
|
|
47
|
-
})
|
|
48
|
-
Object.defineProperty(exports, 'imagesFor', {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function () {
|
|
51
|
-
return _imagesFor.imagesFor
|
|
52
|
-
}
|
|
53
|
-
})
|
|
54
|
-
Object.defineProperty(exports, 'minifyFor', {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _minifyFor.minifyFor
|
|
58
|
-
}
|
|
59
|
-
})
|
|
60
|
-
Object.defineProperty(exports, 'readmeTemplate', {
|
|
61
|
-
enumerable: true,
|
|
62
|
-
get: function () {
|
|
63
|
-
return _readmeTemplate.readmeTemplate
|
|
64
|
-
}
|
|
65
|
-
})
|
|
66
|
-
Object.defineProperty(exports, 'removeDirectory', {
|
|
67
|
-
enumerable: true,
|
|
68
|
-
get: function () {
|
|
69
|
-
return _removeDirectory.removeDirectory
|
|
70
|
-
}
|
|
71
|
-
})
|
|
72
|
-
Object.defineProperty(exports, 'runOnChange', {
|
|
73
|
-
enumerable: true,
|
|
74
|
-
get: function () {
|
|
75
|
-
return _runOnChange.runOnChange
|
|
76
|
-
}
|
|
77
|
-
})
|
|
78
|
-
Object.defineProperty(exports, 'sassFor', {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function () {
|
|
81
|
-
return _sassFor.sassFor
|
|
82
|
-
}
|
|
83
|
-
})
|
|
84
|
-
Object.defineProperty(exports, '
|
|
85
|
-
enumerable: true,
|
|
86
|
-
get: function () {
|
|
87
|
-
return
|
|
88
|
-
}
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
var
|
|
97
|
-
var
|
|
98
|
-
var
|
|
99
|
-
var
|
|
100
|
-
var
|
|
101
|
-
var
|
|
102
|
-
var
|
|
103
|
-
var
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
Object.defineProperty(exports, 'addToReadme', {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _addToReadme.addToReadme
|
|
10
|
+
}
|
|
11
|
+
})
|
|
12
|
+
Object.defineProperty(exports, 'beginWatcher', {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _beginWatcher.beginWatcher
|
|
16
|
+
}
|
|
17
|
+
})
|
|
18
|
+
Object.defineProperty(exports, 'clean', {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _clean.clean
|
|
22
|
+
}
|
|
23
|
+
})
|
|
24
|
+
Object.defineProperty(exports, 'copyFor', {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _copyFor.copyFor
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
Object.defineProperty(exports, 'distFor', {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _distFor.distFor
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
Object.defineProperty(exports, 'distForSrc', {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _distForSrc.distForSrc
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
Object.defineProperty(exports, 'distSeries', {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _distSeries.distSeries
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
Object.defineProperty(exports, 'imagesFor', {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _imagesFor.imagesFor
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
Object.defineProperty(exports, 'minifyFor', {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _minifyFor.minifyFor
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
Object.defineProperty(exports, 'readmeTemplate', {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _readmeTemplate.readmeTemplate
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
Object.defineProperty(exports, 'removeDirectory', {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _removeDirectory.removeDirectory
|
|
70
|
+
}
|
|
71
|
+
})
|
|
72
|
+
Object.defineProperty(exports, 'runOnChange', {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _runOnChange.runOnChange
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
Object.defineProperty(exports, 'sassFor', {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _sassFor.sassFor
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
Object.defineProperty(exports, 'standardLint', {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () {
|
|
87
|
+
return _standardLint.standardLint
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
Object.defineProperty(exports, 'tsFor', {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _tsFor.tsFor
|
|
94
|
+
}
|
|
95
|
+
})
|
|
96
|
+
var _addToReadme = require('./partials/addToReadme.js')
|
|
97
|
+
var _beginWatcher = require('./partials/beginWatcher.js')
|
|
98
|
+
var _clean = require('./partials/clean.js')
|
|
99
|
+
var _copyFor = require('./partials/copyFor.js')
|
|
100
|
+
var _distFor = require('./partials/distFor.js')
|
|
101
|
+
var _distForSrc = require('./partials/distForSrc.js')
|
|
102
|
+
var _distSeries = require('./partials/distSeries.js')
|
|
103
|
+
var _imagesFor = require('./partials/imagesFor.js')
|
|
104
|
+
var _minifyFor = require('./partials/minifyFor.js')
|
|
105
|
+
var _readmeTemplate = require('./partials/readmeTemplate.js')
|
|
106
|
+
var _removeDirectory = require('./partials/removeDirectory.js')
|
|
107
|
+
var _runOnChange = require('./partials/runOnChange.js')
|
|
108
|
+
var _sassFor = require('./partials/sassFor.js')
|
|
109
|
+
var _standardLint = require('./partials/standardLint.js')
|
|
110
|
+
var _tsFor = require('./partials/tsFor.js')
|
package/dist/partials.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"addToReadme",{enumerable:!0,get:function(){return _addToReadme.addToReadme}}),Object.defineProperty(exports,"beginWatcher",{enumerable:!0,get:function(){return _beginWatcher.beginWatcher}}),Object.defineProperty(exports,"clean",{enumerable:!0,get:function(){return _clean.clean}}),Object.defineProperty(exports,"copyFor",{enumerable:!0,get:function(){return _copyFor.copyFor}}),Object.defineProperty(exports,"distFor",{enumerable:!0,get:function(){return _distFor.distFor}}),Object.defineProperty(exports,"distForSrc",{enumerable:!0,get:function(){return _distForSrc.distForSrc}}),Object.defineProperty(exports,"distSeries",{enumerable:!0,get:function(){return _distSeries.distSeries}}),Object.defineProperty(exports,"imagesFor",{enumerable:!0,get:function(){return _imagesFor.imagesFor}}),Object.defineProperty(exports,"minifyFor",{enumerable:!0,get:function(){return _minifyFor.minifyFor}}),Object.defineProperty(exports,"readmeTemplate",{enumerable:!0,get:function(){return _readmeTemplate.readmeTemplate}}),Object.defineProperty(exports,"removeDirectory",{enumerable:!0,get:function(){return _removeDirectory.removeDirectory}}),Object.defineProperty(exports,"runOnChange",{enumerable:!0,get:function(){return _runOnChange.runOnChange}}),Object.defineProperty(exports,"sassFor",{enumerable:!0,get:function(){return _sassFor.sassFor}}),Object.defineProperty(exports,"tsFor",{enumerable:!0,get:function(){return _tsFor.tsFor}});var _addToReadme=require("./partials/addToReadme.js"),_beginWatcher=require("./partials/beginWatcher.js"),_clean=require("./partials/clean.js"),_copyFor=require("./partials/copyFor.js"),_distFor=require("./partials/distFor.js"),_distForSrc=require("./partials/distForSrc.js"),_distSeries=require("./partials/distSeries.js"),_imagesFor=require("./partials/imagesFor.js"),_minifyFor=require("./partials/minifyFor.js"),_readmeTemplate=require("./partials/readmeTemplate.js"),_removeDirectory=require("./partials/removeDirectory.js"),_runOnChange=require("./partials/runOnChange.js"),_sassFor=require("./partials/sassFor.js"),_tsFor=require("./partials/tsFor.js");
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"addToReadme",{enumerable:!0,get:function(){return _addToReadme.addToReadme}}),Object.defineProperty(exports,"beginWatcher",{enumerable:!0,get:function(){return _beginWatcher.beginWatcher}}),Object.defineProperty(exports,"clean",{enumerable:!0,get:function(){return _clean.clean}}),Object.defineProperty(exports,"copyFor",{enumerable:!0,get:function(){return _copyFor.copyFor}}),Object.defineProperty(exports,"distFor",{enumerable:!0,get:function(){return _distFor.distFor}}),Object.defineProperty(exports,"distForSrc",{enumerable:!0,get:function(){return _distForSrc.distForSrc}}),Object.defineProperty(exports,"distSeries",{enumerable:!0,get:function(){return _distSeries.distSeries}}),Object.defineProperty(exports,"imagesFor",{enumerable:!0,get:function(){return _imagesFor.imagesFor}}),Object.defineProperty(exports,"minifyFor",{enumerable:!0,get:function(){return _minifyFor.minifyFor}}),Object.defineProperty(exports,"readmeTemplate",{enumerable:!0,get:function(){return _readmeTemplate.readmeTemplate}}),Object.defineProperty(exports,"removeDirectory",{enumerable:!0,get:function(){return _removeDirectory.removeDirectory}}),Object.defineProperty(exports,"runOnChange",{enumerable:!0,get:function(){return _runOnChange.runOnChange}}),Object.defineProperty(exports,"sassFor",{enumerable:!0,get:function(){return _sassFor.sassFor}}),Object.defineProperty(exports,"standardLint",{enumerable:!0,get:function(){return _standardLint.standardLint}}),Object.defineProperty(exports,"tsFor",{enumerable:!0,get:function(){return _tsFor.tsFor}});var _addToReadme=require("./partials/addToReadme.js"),_beginWatcher=require("./partials/beginWatcher.js"),_clean=require("./partials/clean.js"),_copyFor=require("./partials/copyFor.js"),_distFor=require("./partials/distFor.js"),_distForSrc=require("./partials/distForSrc.js"),_distSeries=require("./partials/distSeries.js"),_imagesFor=require("./partials/imagesFor.js"),_minifyFor=require("./partials/minifyFor.js"),_readmeTemplate=require("./partials/readmeTemplate.js"),_removeDirectory=require("./partials/removeDirectory.js"),_runOnChange=require("./partials/runOnChange.js"),_sassFor=require("./partials/sassFor.js"),_standardLint=require("./partials/standardLint.js"),_tsFor=require("./partials/tsFor.js");
|
package/dist/sass.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.sass = void 0
|
|
7
|
-
|
|
8
|
-
// Compile sass into CSS & auto-inject into browsers
|
|
9
|
-
const sass = () => (0, _sassFor.sassFor)()
|
|
10
|
-
exports.sass = sass
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.sass = void 0
|
|
7
|
+
const _sassFor = require('./partials/sassFor.js')
|
|
8
|
+
// Compile sass into CSS & auto-inject into browsers
|
|
9
|
+
const sass = () => (0, _sassFor.sassFor)()
|
|
10
|
+
exports.sass = sass
|
|
@@ -1,94 +1,94 @@
|
|
|
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
|
-
Object.defineProperty(exports, "afterEach", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () {
|
|
10
|
-
return _testFilesystem.afterEach;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, "beforeEach", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () {
|
|
16
|
-
return _testFilesystem.beforeEach;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports, "countMatches", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () {
|
|
22
|
-
return _testFilesystem.countMatches;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
Object.defineProperty(exports, "createTempDir", {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function () {
|
|
28
|
-
return _testFilesystem.createTempDir;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
Object.defineProperty(exports, "fileExists", {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function () {
|
|
34
|
-
return _testFilesystem.fileExists;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
exports.gulpConfig = void 0;
|
|
38
|
-
Object.defineProperty(exports, "logObject", {
|
|
39
|
-
enumerable: true,
|
|
40
|
-
get: function () {
|
|
41
|
-
return _testFilesystem.logObject;
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
Object.defineProperty(exports, "removeDirectory", {
|
|
45
|
-
enumerable: true,
|
|
46
|
-
get: function () {
|
|
47
|
-
return _testFilesystem.removeDirectory;
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
exports.setDefaults = void 0;
|
|
51
|
-
var gulpConfig = _interopRequireWildcard(require("../../gulp.config.js"));
|
|
52
|
-
exports.gulpConfig = gulpConfig;
|
|
53
|
-
var _testFilesystem = require("test-filesystem");
|
|
54
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.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); }
|
|
55
|
-
// Import the configurations and override some of them to direct to the temp directory.
|
|
56
|
-
|
|
57
|
-
let tempDir = 'test-temp/';
|
|
58
|
-
let srcPath = `${tempDir}src`;
|
|
59
|
-
|
|
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
|
+
Object.defineProperty(exports, "afterEach", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _testFilesystem.afterEach;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "beforeEach", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () {
|
|
16
|
+
return _testFilesystem.beforeEach;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "countMatches", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () {
|
|
22
|
+
return _testFilesystem.countMatches;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "createTempDir", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return _testFilesystem.createTempDir;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "fileExists", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () {
|
|
34
|
+
return _testFilesystem.fileExists;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
exports.gulpConfig = void 0;
|
|
38
|
+
Object.defineProperty(exports, "logObject", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () {
|
|
41
|
+
return _testFilesystem.logObject;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "removeDirectory", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () {
|
|
47
|
+
return _testFilesystem.removeDirectory;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
exports.setDefaults = void 0;
|
|
51
|
+
var gulpConfig = _interopRequireWildcard(require("../../gulp.config.js"));
|
|
52
|
+
exports.gulpConfig = gulpConfig;
|
|
53
|
+
var _testFilesystem = require("test-filesystem");
|
|
54
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.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); }
|
|
55
|
+
// Import the configurations and override some of them to direct to the temp directory.
|
|
56
|
+
|
|
57
|
+
let tempDir = 'test-temp/';
|
|
58
|
+
let srcPath = `${tempDir}src`;
|
|
59
|
+
|
|
60
60
|
/**
|
|
61
61
|
* Update the gulp configurations with the test data. Set the test directory where temp files will be created for testing.
|
|
62
62
|
* @memberOf module:testHelpers
|
|
63
63
|
* @param {string} testDir
|
|
64
|
-
*/
|
|
65
|
-
const setDefaults = (testDir = 'test-temp') => {
|
|
66
|
-
tempDir = `${testDir}/`;
|
|
67
|
-
srcPath = `${tempDir}src`;
|
|
68
|
-
_testFilesystem.setUp.setDefaults(tempDir);
|
|
69
|
-
const distPath = `${tempDir}dist`;
|
|
70
|
-
const browserPath = `${tempDir}browser`;
|
|
71
|
-
const sassPath = `${tempDir}sass`;
|
|
72
|
-
gulpConfig.set('browser.from', `${distPath}/**/*.js`);
|
|
73
|
-
gulpConfig.set('browser.to', browserPath);
|
|
74
|
-
gulpConfig.set('cleanPaths', [distPath, browserPath]);
|
|
75
|
-
gulpConfig.set('dist.from', `${srcPath}/**/!(*.test).js`);
|
|
76
|
-
gulpConfig.set('dist.main', `${distPath}/main`);
|
|
77
|
-
gulpConfig.set('dist.to', distPath);
|
|
78
|
-
gulpConfig.set('fonts.from', `${srcPath}/fonts/**/*`);
|
|
79
|
-
gulpConfig.set('fonts.to', `${browserPath}/fonts`);
|
|
80
|
-
gulpConfig.set('images.from', `${srcPath}/img/**/*.+(png|jpg|jpeg|gif|svg)`);
|
|
81
|
-
gulpConfig.set('images.to', `${browserPath}/img`);
|
|
82
|
-
gulpConfig.set('readme.template', `${tempDir}MAIN.md`);
|
|
83
|
-
gulpConfig.set('readme.to', tempDir);
|
|
84
|
-
gulpConfig.set('readme.from', `${srcPath}/**/!(*.test).js`);
|
|
85
|
-
gulpConfig.set('rootPath', tempDir);
|
|
86
|
-
gulpConfig.set('sass.from', `${sassPath}/**/*.+(scss|sass)`);
|
|
87
|
-
gulpConfig.set('sass.path', sassPath);
|
|
88
|
-
gulpConfig.set('sass.to', `${browserPath}/css`);
|
|
89
|
-
gulpConfig.set('srcPath', srcPath);
|
|
90
|
-
gulpConfig.set('typescript.from', `${srcPath}/**/*.ts`);
|
|
91
|
-
gulpConfig.set('typescript.to', distPath);
|
|
92
|
-
gulpConfig.set('test.watch', `${srcPath}/**/*.js`);
|
|
93
|
-
};
|
|
64
|
+
*/
|
|
65
|
+
const setDefaults = (testDir = 'test-temp') => {
|
|
66
|
+
tempDir = `${testDir}/`;
|
|
67
|
+
srcPath = `${tempDir}src`;
|
|
68
|
+
_testFilesystem.setUp.setDefaults(tempDir);
|
|
69
|
+
const distPath = `${tempDir}dist`;
|
|
70
|
+
const browserPath = `${tempDir}browser`;
|
|
71
|
+
const sassPath = `${tempDir}sass`;
|
|
72
|
+
gulpConfig.set('browser.from', `${distPath}/**/*.js`);
|
|
73
|
+
gulpConfig.set('browser.to', browserPath);
|
|
74
|
+
gulpConfig.set('cleanPaths', [distPath, browserPath]);
|
|
75
|
+
gulpConfig.set('dist.from', `${srcPath}/**/!(*.test).js`);
|
|
76
|
+
gulpConfig.set('dist.main', `${distPath}/main`);
|
|
77
|
+
gulpConfig.set('dist.to', distPath);
|
|
78
|
+
gulpConfig.set('fonts.from', `${srcPath}/fonts/**/*`);
|
|
79
|
+
gulpConfig.set('fonts.to', `${browserPath}/fonts`);
|
|
80
|
+
gulpConfig.set('images.from', `${srcPath}/img/**/*.+(png|jpg|jpeg|gif|svg)`);
|
|
81
|
+
gulpConfig.set('images.to', `${browserPath}/img`);
|
|
82
|
+
gulpConfig.set('readme.template', `${tempDir}MAIN.md`);
|
|
83
|
+
gulpConfig.set('readme.to', tempDir);
|
|
84
|
+
gulpConfig.set('readme.from', `${srcPath}/**/!(*.test).js`);
|
|
85
|
+
gulpConfig.set('rootPath', tempDir);
|
|
86
|
+
gulpConfig.set('sass.from', `${sassPath}/**/*.+(scss|sass)`);
|
|
87
|
+
gulpConfig.set('sass.path', sassPath);
|
|
88
|
+
gulpConfig.set('sass.to', `${browserPath}/css`);
|
|
89
|
+
gulpConfig.set('srcPath', srcPath);
|
|
90
|
+
gulpConfig.set('typescript.from', `${srcPath}/**/*.ts`);
|
|
91
|
+
gulpConfig.set('typescript.to', distPath);
|
|
92
|
+
gulpConfig.set('test.watch', `${srcPath}/**/*.js`);
|
|
93
|
+
};
|
|
94
94
|
exports.setDefaults = setDefaults;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.standardLint = exports.loadStandardViaSubprocess = void 0;
|
|
7
|
+
require("core-js/modules/es.json.stringify.js");
|
|
8
|
+
var _nodeChild_process = require("node:child_process");
|
|
9
|
+
// Jest's CommonJS transform cannot load `standard` (ESM-only) or run a real dynamic import(), so tests that need
|
|
10
|
+
// genuine Standard behavior run the actual `standard` package in a plain Node subprocess instead of faking it.
|
|
11
|
+
const script = 'import { readFileSync } from \'node:fs\'\n' + 'import standard from \'standard\'\n' + 'const { text, options } = JSON.parse(readFileSync(0, \'utf8\'))\n' + 'process.stdout.write(JSON.stringify(await standard.lintText(text, options)))\n';
|
|
12
|
+
const loadStandardViaSubprocess = () => Promise.resolve({
|
|
13
|
+
lintText: (text, options) => Promise.resolve().then(() => JSON.parse((0, _nodeChild_process.execFileSync)(process.execPath, ['--input-type=module', '--eval', script], {
|
|
14
|
+
input: JSON.stringify({
|
|
15
|
+
text,
|
|
16
|
+
options
|
|
17
|
+
}),
|
|
18
|
+
encoding: 'utf8',
|
|
19
|
+
cwd: process.cwd(),
|
|
20
|
+
maxBuffer: 256 * 1024 * 1024
|
|
21
|
+
})))
|
|
22
|
+
});
|
|
23
|
+
exports.loadStandardViaSubprocess = loadStandardViaSubprocess;
|
|
24
|
+
const actual = jest.requireActual('../partials/standardLint.js');
|
|
25
|
+
|
|
26
|
+
// Drop-in replacement for the partial module (see jest.mock in the lint/build tests): same API, real Standard.
|
|
27
|
+
const standardLint = options => actual.standardLint(options, loadStandardViaSubprocess);
|
|
28
|
+
exports.standardLint = standardLint;
|
package/dist/testFull.js
CHANGED
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
5
5
|
value: true
|
|
6
6
|
})
|
|
7
7
|
exports.testFull = void 0
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap()
|
|
8
|
+
const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
|
|
9
|
+
const _jest = require('jest')
|
|
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
|
* Run all tests with jest.
|
|
13
13
|
* Configure where tests are located by using 'testPath'.
|
package/dist/testHelpers.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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.testHelpers = void 0
|
|
8
|
-
|
|
9
|
-
exports.testHelpers = _testHelpers
|
|
10
|
-
function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap()
|
|
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.testHelpers = void 0
|
|
8
|
+
const _testHelpers = _interopRequireWildcard(require('./test-helpers/setUp.js'))
|
|
9
|
+
exports.testHelpers = _testHelpers
|
|
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) }
|
package/dist/testQuick.js
CHANGED
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
5
5
|
value: true
|
|
6
6
|
})
|
|
7
7
|
exports.testQuick = void 0
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
function _interopRequireWildcard (e, t) { if (typeof WeakMap === 'function') var r = new WeakMap()
|
|
8
|
+
const gulpConfig = _interopRequireWildcard(require('../gulp.config.js'))
|
|
9
|
+
const _jest = require('jest')
|
|
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
|
* Run the Jest tests for files which have been modified (based on git status).
|
|
13
13
|
* Configure where tests are located by using 'testPath'.
|
package/dist/typeScript.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.typeScript = void 0
|
|
7
|
-
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.typeScript = void 0
|
|
7
|
+
const _tsFor = require('./partials/tsFor.js')
|
|
8
8
|
/**
|
|
9
9
|
* Simplified typescript task using tsFor.
|
|
10
10
|
* @memberOf module:js-build-tools
|
|
11
11
|
* @returns {Function}
|
|
12
|
-
*/
|
|
13
|
-
const typeScript = exports.typeScript = (0, _tsFor.tsFor)()
|
|
12
|
+
*/
|
|
13
|
+
const typeScript = exports.typeScript = (0, _tsFor.tsFor)()
|
package/dist/utilities/dotGet.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.dotGet = void 0;
|
|
7
|
-
var _isObject = require("./isObject.js");
|
|
8
|
-
var _strAfter = require("./strAfter.js");
|
|
9
|
-
var _strBefore = require("./strBefore.js");
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.dotGet = void 0;
|
|
7
|
+
var _isObject = require("./isObject.js");
|
|
8
|
+
var _strAfter = require("./strAfter.js");
|
|
9
|
+
var _strBefore = require("./strBefore.js");
|
|
10
10
|
/**
|
|
11
11
|
* Get a nested property value from an object.
|
|
12
12
|
* Original source concepts from {@link https://github.com/jheagle/si-funciona/blob/main/src/helpers/objects/dotGet.ts Sí, funciona}
|
|
@@ -14,41 +14,41 @@ var _strBefore = require("./strBefore.js");
|
|
|
14
14
|
* @param {string} [dotNotation=''] - The path to the property
|
|
15
15
|
* @param {string|null} [defaultValue=null] - The default value to return if the property is not found
|
|
16
16
|
* @returns {*} The value of the property
|
|
17
|
-
*/
|
|
18
|
-
const dotGet = (arrayObject = {}, dotNotation = '', defaultValue = null) => {
|
|
19
|
-
if (!dotNotation) {
|
|
20
|
-
return arrayObject;
|
|
21
|
-
}
|
|
22
|
-
let key = (0, _strBefore.strBefore)(dotNotation, '.');
|
|
23
|
-
const lastKey = !key;
|
|
24
|
-
if (lastKey) {
|
|
25
|
-
key = dotNotation;
|
|
26
|
-
}
|
|
27
|
-
if (key === '*') {
|
|
28
|
-
const result = [];
|
|
29
|
-
for (let wildKey in arrayObject) {
|
|
30
|
-
const wildValue = arrayObject[wildKey];
|
|
31
|
-
if (lastKey) {
|
|
32
|
-
result[wildKey] = wildValue;
|
|
33
|
-
continue;
|
|
34
|
-
}
|
|
35
|
-
if (!(0, _isObject.isObject)(wildValue)) {
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
result[wildKey] = dotGet(wildValue, (0, _strAfter.strAfter)(dotNotation, '.'), defaultValue);
|
|
39
|
-
}
|
|
40
|
-
return result;
|
|
41
|
-
}
|
|
42
|
-
if (lastKey) {
|
|
43
|
-
return arrayObject[dotNotation] ?? defaultValue;
|
|
44
|
-
}
|
|
45
|
-
if (typeof arrayObject[key] === 'undefined') {
|
|
46
|
-
return defaultValue;
|
|
47
|
-
}
|
|
48
|
-
const next = arrayObject[key];
|
|
49
|
-
if (!(0, _isObject.isObject)(next)) {
|
|
50
|
-
return defaultValue;
|
|
51
|
-
}
|
|
52
|
-
return dotGet(next, (0, _strAfter.strAfter)(dotNotation, '.'), defaultValue);
|
|
53
|
-
};
|
|
17
|
+
*/
|
|
18
|
+
const dotGet = (arrayObject = {}, dotNotation = '', defaultValue = null) => {
|
|
19
|
+
if (!dotNotation) {
|
|
20
|
+
return arrayObject;
|
|
21
|
+
}
|
|
22
|
+
let key = (0, _strBefore.strBefore)(dotNotation, '.');
|
|
23
|
+
const lastKey = !key;
|
|
24
|
+
if (lastKey) {
|
|
25
|
+
key = dotNotation;
|
|
26
|
+
}
|
|
27
|
+
if (key === '*') {
|
|
28
|
+
const result = [];
|
|
29
|
+
for (let wildKey in arrayObject) {
|
|
30
|
+
const wildValue = arrayObject[wildKey];
|
|
31
|
+
if (lastKey) {
|
|
32
|
+
result[wildKey] = wildValue;
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
if (!(0, _isObject.isObject)(wildValue)) {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
result[wildKey] = dotGet(wildValue, (0, _strAfter.strAfter)(dotNotation, '.'), defaultValue);
|
|
39
|
+
}
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
if (lastKey) {
|
|
43
|
+
return arrayObject[dotNotation] ?? defaultValue;
|
|
44
|
+
}
|
|
45
|
+
if (typeof arrayObject[key] === 'undefined') {
|
|
46
|
+
return defaultValue;
|
|
47
|
+
}
|
|
48
|
+
const next = arrayObject[key];
|
|
49
|
+
if (!(0, _isObject.isObject)(next)) {
|
|
50
|
+
return defaultValue;
|
|
51
|
+
}
|
|
52
|
+
return dotGet(next, (0, _strAfter.strAfter)(dotNotation, '.'), defaultValue);
|
|
53
|
+
};
|
|
54
54
|
exports.dotGet = dotGet;
|