js-build-tools 1.2.1 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +353 -353
  2. package/dist/addToReadme.js +22 -21
  3. package/dist/addToReadme.min.js +1 -1
  4. package/dist/build.js +23 -22
  5. package/dist/build.min.js +1 -1
  6. package/dist/bundle.js +15 -16
  7. package/dist/bundle.min.js +1 -1
  8. package/dist/bundleLint.js +20 -22
  9. package/dist/bundleLint.min.js +1 -1
  10. package/dist/bundleMinify.js +20 -21
  11. package/dist/bundleMinify.min.js +1 -1
  12. package/dist/clean.js +8 -10
  13. package/dist/clean.min.js +1 -1
  14. package/dist/compileReadme.js +13 -12
  15. package/dist/compileReadme.min.js +1 -1
  16. package/dist/default.js +14 -13
  17. package/dist/default.min.js +1 -1
  18. package/dist/dist.js +10 -12
  19. package/dist/dist.min.js +1 -1
  20. package/dist/distFor.js +21 -20
  21. package/dist/distFor.min.js +1 -1
  22. package/dist/distLint.js +20 -21
  23. package/dist/distLint.min.js +1 -1
  24. package/dist/distMinify.js +20 -20
  25. package/dist/distMinify.min.js +1 -1
  26. package/dist/readmeTemplate.js +15 -16
  27. package/dist/readmeTemplate.min.js +1 -1
  28. package/dist/testFull.js +13 -56
  29. package/dist/testFull.min.js +1 -1
  30. package/dist/testHelpers.js +175 -176
  31. package/dist/testHelpers.min.js +1 -1
  32. package/dist/testQuick.js +15 -58
  33. package/dist/testQuick.min.js +1 -1
  34. package/dist/watchFull.js +20 -27
  35. package/dist/watchFull.min.js +1 -1
  36. package/dist/watchTest.js +14 -15
  37. package/dist/watchTest.min.js +1 -1
  38. package/functions/addToReadme.js +17 -17
  39. package/functions/build.js +25 -25
  40. package/functions/bundle.js +15 -15
  41. package/functions/bundleLint.js +17 -17
  42. package/functions/bundleMinify.js +15 -15
  43. package/functions/compileReadme.js +10 -10
  44. package/functions/default.js +11 -11
  45. package/functions/dist.js +9 -9
  46. package/functions/distFor.js +15 -15
  47. package/functions/distLint.js +17 -17
  48. package/functions/distMinify.js +15 -15
  49. package/functions/readmeTemplate.js +13 -13
  50. package/functions/testFull.js +10 -10
  51. package/functions/testHelpers.test.js +100 -100
  52. package/functions/testQuick.js +10 -10
  53. package/package.json +11 -11
@@ -1,100 +1,100 @@
1
- const {
2
- circularObject,
3
- deepReferenceObject,
4
- domItem,
5
- jsonDom,
6
- linkedList,
7
- logObject,
8
- multiReferenceObject,
9
- nodeTree
10
- } = require('./testHelpers.js')
11
- const util = require('util')
12
-
13
- describe('testHelpers', () => {
14
- test('can nicely output objects with logObject', () => {
15
- const logSpy = jest.spyOn(console, 'log')
16
- const inspectSpy = jest.spyOn(util, 'inspect')
17
- const someObject = { one: 1, two: 2, three: 3 }
18
- logObject(someObject, 'someObject')
19
- expect(inspectSpy).toHaveBeenCalledWith(someObject, false, null, true)
20
- expect(logSpy).toHaveBeenCalledWith('someObject', util.inspect(someObject, false, null, true))
21
- })
22
-
23
- test('has sample circular object', () => {
24
- expect(circularObject.body.parent).toBe(circularObject)
25
- expect(circularObject.body.children[0].parent).toBe(circularObject.body)
26
- expect(circularObject.body.children[1].parent).toBe(circularObject.body)
27
- expect(circularObject.children[0]).toBe(circularObject.body)
28
- expect(circularObject.head.parent).toBe(circularObject)
29
- expect(circularObject.head.children[0].parent).toBe(circularObject.head)
30
- expect(circularObject.head.children[1].parent).toBe(circularObject.head)
31
- expect(circularObject.children[1]).toBe(circularObject.head)
32
- })
33
-
34
- test('has sample deep reference object', () => {
35
- expect(deepReferenceObject).toHaveProperty('object1.object2.array1')
36
- })
37
-
38
- test('has sample domItem object', () => {
39
- expect(domItem[0]).toHaveProperty('attributes')
40
- expect(domItem[0]).toHaveProperty('children')
41
- expect(domItem[0]).toHaveProperty('element')
42
- expect(domItem[0]).toHaveProperty('eventListeners')
43
- expect(domItem[0]).toHaveProperty('parentItem')
44
- expect(domItem[0]).toHaveProperty('tagName')
45
- })
46
-
47
- test('has sample jsonDom object', () => {
48
- expect(jsonDom).toHaveProperty('attributes')
49
- expect(jsonDom).toHaveProperty('children')
50
- expect(jsonDom).toHaveProperty('element')
51
- expect(jsonDom).toHaveProperty('eventListeners')
52
- expect(jsonDom).toHaveProperty('parentItem')
53
- expect(jsonDom).toHaveProperty('tagName')
54
- })
55
-
56
- test('has sample linkedList object', () => {
57
- expect(linkedList.name).toBe('one')
58
- expect(linkedList).toHaveProperty('prev')
59
- expect(linkedList.prev).toBeNull()
60
-
61
- expect(linkedList).toHaveProperty('next')
62
- expect(linkedList.next.name).toBe('two')
63
- expect(linkedList).toHaveProperty('next.prev')
64
- expect(linkedList.next.prev).toBe(linkedList)
65
-
66
- expect(linkedList).toHaveProperty('next.next')
67
- expect(linkedList.next.next.name).toBe('three')
68
- expect(linkedList).toHaveProperty('next.prev')
69
- expect(linkedList.next.next.prev).toBe(linkedList.next)
70
-
71
- expect(linkedList).toHaveProperty('next.next.next')
72
- expect(linkedList.next.next.next).toBeNull()
73
- })
74
-
75
- test('has sample multiReferenceObject object', () => {
76
- expect(multiReferenceObject).toHaveProperty('object1.name')
77
- expect(multiReferenceObject).toHaveProperty('object2.age')
78
- expect(multiReferenceObject).toHaveProperty('array1.0')
79
- expect(multiReferenceObject).toHaveProperty('array1.1')
80
- expect(multiReferenceObject).toHaveProperty('array2.0')
81
- expect(multiReferenceObject).toHaveProperty('array2.1')
82
- expect(multiReferenceObject).toHaveProperty('title')
83
- expect(multiReferenceObject).toHaveProperty('item')
84
- })
85
-
86
- test('has sample nodeTree object', () => {
87
- expect(nodeTree.name).toBe('one')
88
- expect(nodeTree.parent).toBeNull()
89
- expect(nodeTree.children.length).toBe(2)
90
- expect(nodeTree.children[0].name).toBe('child one')
91
- expect(nodeTree.children[0].parent).toBe(nodeTree)
92
- expect(nodeTree.children[0].children.length).toBe(1)
93
- expect(nodeTree.children[0].children[0].name).toBe('grandchild one')
94
- expect(nodeTree.children[0].children[0].parent).toBe(nodeTree.children[0])
95
- expect(nodeTree.children[0].children[0].children.length).toBe(0)
96
- expect(nodeTree.children[1].name).toBe('child two')
97
- expect(nodeTree.children[1].parent).toBe(nodeTree)
98
- expect(nodeTree.children[1].children.length).toBe(0)
99
- })
100
- })
1
+ const {
2
+ circularObject,
3
+ deepReferenceObject,
4
+ domItem,
5
+ jsonDom,
6
+ linkedList,
7
+ logObject,
8
+ multiReferenceObject,
9
+ nodeTree
10
+ } = require('./testHelpers.js')
11
+ const util = require('util')
12
+
13
+ describe('testHelpers', () => {
14
+ test('can nicely output objects with logObject', () => {
15
+ const logSpy = jest.spyOn(console, 'log')
16
+ const inspectSpy = jest.spyOn(util, 'inspect')
17
+ const someObject = { one: 1, two: 2, three: 3 }
18
+ logObject(someObject, 'someObject')
19
+ expect(inspectSpy).toHaveBeenCalledWith(someObject, false, null, true)
20
+ expect(logSpy).toHaveBeenCalledWith('someObject', util.inspect(someObject, false, null, true))
21
+ })
22
+
23
+ test('has sample circular object', () => {
24
+ expect(circularObject.body.parent).toBe(circularObject)
25
+ expect(circularObject.body.children[0].parent).toBe(circularObject.body)
26
+ expect(circularObject.body.children[1].parent).toBe(circularObject.body)
27
+ expect(circularObject.children[0]).toBe(circularObject.body)
28
+ expect(circularObject.head.parent).toBe(circularObject)
29
+ expect(circularObject.head.children[0].parent).toBe(circularObject.head)
30
+ expect(circularObject.head.children[1].parent).toBe(circularObject.head)
31
+ expect(circularObject.children[1]).toBe(circularObject.head)
32
+ })
33
+
34
+ test('has sample deep reference object', () => {
35
+ expect(deepReferenceObject).toHaveProperty('object1.object2.array1')
36
+ })
37
+
38
+ test('has sample domItem object', () => {
39
+ expect(domItem[0]).toHaveProperty('attributes')
40
+ expect(domItem[0]).toHaveProperty('children')
41
+ expect(domItem[0]).toHaveProperty('element')
42
+ expect(domItem[0]).toHaveProperty('eventListeners')
43
+ expect(domItem[0]).toHaveProperty('parentItem')
44
+ expect(domItem[0]).toHaveProperty('tagName')
45
+ })
46
+
47
+ test('has sample jsonDom object', () => {
48
+ expect(jsonDom).toHaveProperty('attributes')
49
+ expect(jsonDom).toHaveProperty('children')
50
+ expect(jsonDom).toHaveProperty('element')
51
+ expect(jsonDom).toHaveProperty('eventListeners')
52
+ expect(jsonDom).toHaveProperty('parentItem')
53
+ expect(jsonDom).toHaveProperty('tagName')
54
+ })
55
+
56
+ test('has sample linkedList object', () => {
57
+ expect(linkedList.name).toBe('one')
58
+ expect(linkedList).toHaveProperty('prev')
59
+ expect(linkedList.prev).toBeNull()
60
+
61
+ expect(linkedList).toHaveProperty('next')
62
+ expect(linkedList.next.name).toBe('two')
63
+ expect(linkedList).toHaveProperty('next.prev')
64
+ expect(linkedList.next.prev).toBe(linkedList)
65
+
66
+ expect(linkedList).toHaveProperty('next.next')
67
+ expect(linkedList.next.next.name).toBe('three')
68
+ expect(linkedList).toHaveProperty('next.prev')
69
+ expect(linkedList.next.next.prev).toBe(linkedList.next)
70
+
71
+ expect(linkedList).toHaveProperty('next.next.next')
72
+ expect(linkedList.next.next.next).toBeNull()
73
+ })
74
+
75
+ test('has sample multiReferenceObject object', () => {
76
+ expect(multiReferenceObject).toHaveProperty('object1.name')
77
+ expect(multiReferenceObject).toHaveProperty('object2.age')
78
+ expect(multiReferenceObject).toHaveProperty('array1.0')
79
+ expect(multiReferenceObject).toHaveProperty('array1.1')
80
+ expect(multiReferenceObject).toHaveProperty('array2.0')
81
+ expect(multiReferenceObject).toHaveProperty('array2.1')
82
+ expect(multiReferenceObject).toHaveProperty('title')
83
+ expect(multiReferenceObject).toHaveProperty('item')
84
+ })
85
+
86
+ test('has sample nodeTree object', () => {
87
+ expect(nodeTree.name).toBe('one')
88
+ expect(nodeTree.parent).toBeNull()
89
+ expect(nodeTree.children.length).toBe(2)
90
+ expect(nodeTree.children[0].name).toBe('child one')
91
+ expect(nodeTree.children[0].parent).toBe(nodeTree)
92
+ expect(nodeTree.children[0].children.length).toBe(1)
93
+ expect(nodeTree.children[0].children[0].name).toBe('grandchild one')
94
+ expect(nodeTree.children[0].children[0].parent).toBe(nodeTree.children[0])
95
+ expect(nodeTree.children[0].children[0].children.length).toBe(0)
96
+ expect(nodeTree.children[1].name).toBe('child two')
97
+ expect(nodeTree.children[1].parent).toBe(nodeTree)
98
+ expect(nodeTree.children[1].children.length).toBe(0)
99
+ })
100
+ })
@@ -1,10 +1,10 @@
1
- const gulpConfig = require('../gulp.config.js')
2
- const { runCLI: jest } = require('jest')
3
-
4
- /**
5
- * Run the Jest tests for files which have been modified (based on git status).
6
- * @returns {Promise<*>}
7
- */
8
- const testQuick = async () => await jest({ onlyChanged: true }, gulpConfig.testPath)
9
-
10
- module.exports = testQuick
1
+ const gulpConfig = require('../gulp.config.js')
2
+ const { runCLI: jest } = require('jest')
3
+
4
+ /**
5
+ * Run the Jest tests for files which have been modified (based on git status).
6
+ * @returns {Promise<*>}
7
+ */
8
+ const testQuick = async () => await jest({ onlyChanged: true }, gulpConfig.testPath)
9
+
10
+ module.exports = testQuick
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "js-build-tools",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "Standardised build process with gulp.",
5
5
  "main": "gulpfile.base.js",
6
6
  "scripts": {
@@ -33,25 +33,25 @@
33
33
  ]
34
34
  },
35
35
  "dependencies": {
36
- "@babel/core": "^7.21.3",
37
- "@babel/plugin-proposal-throw-expressions": "^7.18.6",
38
- "@babel/preset-env": "^7.20.2",
39
- "@babel/runtime-corejs3": "^7.21.0",
40
- "babel-jest": "^29.5.0",
36
+ "@babel/core": "^7.22.15",
37
+ "@babel/plugin-proposal-throw-expressions": "^7.22.5",
38
+ "@babel/preset-env": "^7.22.15",
39
+ "@babel/runtime-corejs3": "^7.22.15",
40
+ "babel-jest": "^29.6.4",
41
41
  "browserify": "^17.0.0",
42
- "core-js": "^3.29.1",
42
+ "core-js": "^3.32.1",
43
43
  "del": "^6.1.1",
44
44
  "fs": "^0.0.1-security",
45
- "glob": "^9.3.2",
45
+ "glob": "^10.3.4",
46
46
  "gulp": "^4.0.2",
47
47
  "gulp-babel": "^8.0.0",
48
48
  "gulp-rename": "^2.0.0",
49
49
  "gulp-standard": "^14.0.0",
50
50
  "gulp-uglify-es": "^3.0.0",
51
- "jest": "^29.5.0",
52
- "jest-environment-jsdom": "^29.5.0",
51
+ "jest": "^29.6.4",
52
+ "jest-environment-jsdom": "^29.6.4",
53
53
  "jsdoc-to-markdown": "^8.0.0",
54
- "regenerator-runtime": "^0.13.11",
54
+ "regenerator-runtime": "^0.14.0",
55
55
  "vinyl-source-stream": "^2.0.0"
56
56
  },
57
57
  "files": [