quackage 1.0.15 → 1.0.17

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.
@@ -7,7 +7,7 @@
7
7
  {
8
8
  "Hash": "testPictQUACKAGEPROJECTNAMECAPQUACKAGESCOPEtestjs",
9
9
  "Path": "test/Pict_QUACKAGEPROJECTNAMECAP_QUACKAGESCOPE_test.js",
10
- "Content": "/*\n\tUnit tests for LIBRARYNAMEHERE Basic\n*/\n\nconst _Package = require(`../package.json`);\n\n// This is temporary, but enables unit tests\nconst libBrowserEnv = require('browser-env')\nlibBrowserEnv();\n\nconst Chai = require('chai');\nconst Expect = Chai.expect;\n\nconst libPict = require('pict');\n\nconst configureTestPict = (pPict) =>\n{\n\tlet tmpPict = (typeof(pPict) == 'undefined') ? new libPict() : pPict;\n\ttmpPict.TestData = (\n\t\t{\n\t\t\tReads: [],\n\t\t\tAssignments: [],\n\t\t\tAppends: [],\n\t\t\tGets: []\n\t\t});\n\ttmpPict.ContentAssignment.customReadFunction = (pAddress, pContentType) =>\n\t{\n\t\ttmpPict.TestData.Reads.push(pAddress);\n\t\ttmpPict.log.info(`Mocking a read of type ${pContentType} from Address: ${pAddress}`);\n\t\treturn '';\n\t}\n\ttmpPict.ContentAssignment.customGetElementFunction = (pAddress) =>\n\t{\n\t\ttmpPict.TestData.Gets.push(pAddress);\n\t\ttmpPict.log.info(`Mocking a get of Address: ${pAddress}`);\n\t\treturn '';\n\t}\n\ttmpPict.ContentAssignment.customAppendElementFunction = (pAddress, pContent) =>\n\t{\n\t\ttmpPict.TestData.Appends.push(pAddress);\n\t\ttmpPict.log.info(`Mocking an append of Address: ${pAddress}`, {Content: pContent});\n\t\treturn '';\n\t}\n\ttmpPict.ContentAssignment.customAssignFunction = (pAddress, pContent) =>\n\t{\n\t\ttmpPict.TestData.Assignments.push(pAddress);\n\t\ttmpPict.log.info(`Mocking an assignment of Address: ${pAddress}`, {Content: pContent});\n\t\treturn '';\n\t}\n\n\treturn tmpPict;\n}\n\nconst libPictExtension = require(`../${_Package.main}`);\n\nsuite\n(\n\t`Basic ${_Package.name}v${_Package.version} tests`,\n\t() =>\n\t{\n\t\tsetup(() => { });\n\n\t\tsuite\n\t\t\t(\n\t\t\t\t'Basic Basic Tests',\n\t\t\t\t() =>\n\t\t\t\t{\n\t\t\t\t\ttest(\n\t\t\t\t\t\t\t'Constructor properly crafts an object',\n\t\t\t\t\t\t\t(fDone) =>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlet _Pict = configureTestPict();\n\t\t\t\t\t\t\t\tlet _PictExtension = _Pict.addView({}, 'Pict-Test-{~RandomNumberString:4,9000~}', libPictExtension);\n\t\t\t\t\t\t\t\tExpect(_PictExtension).to.be.an('object');\n\t\t\t\t\t\t\t\treturn fDone();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\t}\n);"
10
+ "Content": "/*\n\tUnit tests for LIBRARYNAMEHERE Basic\n*/\n\nconst _Package = require(`../package.json`);\n\n// This is temporary, but enables unit tests\nconst libBrowserEnv = require('browser-env')\nlibBrowserEnv();\n\nconst Chai = require('chai');\nconst Expect = Chai.expect;\n\nconst libPict = require('pict');\n\nconst configureTestPict = (pPict) =>\n{\n\tlet tmpPict = (typeof(pPict) == 'undefined') ? new libPict() : pPict;\n\ttmpPict.TestData = (\n\t\t{\n\t\t\tReads: [],\n\t\t\tAssignments: [],\n\t\t\tAppends: [],\n\t\t\tGets: []\n\t\t});\n\ttmpPict.ContentAssignment.customReadFunction = (pAddress, pContentType) =>\n\t{\n\t\ttmpPict.TestData.Reads.push(pAddress);\n\t\ttmpPict.log.info(`Mocking a read of type ${pContentType} from Address: ${pAddress}`);\n\t\treturn '';\n\t}\n\ttmpPict.ContentAssignment.customGetElementFunction = (pAddress) =>\n\t{\n\t\ttmpPict.TestData.Gets.push(pAddress);\n\t\ttmpPict.log.info(`Mocking a get of Address: ${pAddress}`);\n\t\treturn '';\n\t}\n\ttmpPict.ContentAssignment.customAppendElementFunction = (pAddress, pContent) =>\n\t{\n\t\ttmpPict.TestData.Appends.push(pAddress);\n\t\ttmpPict.log.info(`Mocking an append of Address: ${pAddress}`, {Content: pContent});\n\t\treturn '';\n\t}\n\ttmpPict.ContentAssignment.customAssignFunction = (pAddress, pContent) =>\n\t{\n\t\ttmpPict.TestData.Assignments.push(pAddress);\n\t\ttmpPict.log.info(`Mocking an assignment of Address: ${pAddress}`, {Content: pContent});\n\t\treturn '';\n\t}\n\n\treturn tmpPict;\n}\n\nconst libPictExtension = require(`../${_Package.main}`);\n\nsuite\n(\n\t`Basic ${_Package.name}.v.${_Package.version} tests`,\n\t() =>\n\t{\n\t\tsetup(() => { });\n\n\t\tsuite\n\t\t\t(\n\t\t\t\t'Basic Basic Tests',\n\t\t\t\t() =>\n\t\t\t\t{\n\t\t\t\t\ttest(\n\t\t\t\t\t\t\t'Constructor properly crafts an object',\n\t\t\t\t\t\t\t(fDone) =>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlet _Pict = configureTestPict();\n\t\t\t\t\t\t\t\tlet _PictExtension = _Pict.addView({}, 'Pict-Test-{~RandomNumberString:4,9000~}', libPictExtension);\n\t\t\t\t\t\t\t\tExpect(_PictExtension).to.be.an('object');\n\t\t\t\t\t\t\t\treturn fDone();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\t}\n);"
11
11
  }
12
12
  ]
13
13
  },
@@ -51,7 +51,7 @@
51
51
  {
52
52
  "Hash": "testQUACKAGEPROJECTNAMECAPBasictestjs",
53
53
  "Path": "test/QUACKAGEPROJECTNAMECAP-Basic_test.js",
54
- "Content": "/*\n\tUnit tests for {~PascalCaseIdentifier:AppData.Package.name~} {~Data:Record.Scope~}\n*/\n\nconst Chai = require('chai');\nconst Expect = Chai.expect;\n\nconst lib{~PascalCaseIdentifier:AppData.Package.name~} = require(`../{~Data:AppData.Package.main~}`);\n\nsuite\n(\n\t'{~PascalCaseIdentifier:AppData.Package.name~} {~Data:Record.Scope~}',\n\t() =>\n\t{\n\t\tsetup(() => { });\n\n\t\tsuite\n\t\t\t(\n\t\t\t\t'Basic {~Data:Record.Scope~} Tests',\n\t\t\t\t() =>\n\t\t\t\t{\n\t\t\t\t\ttest(\n\t\t\t\t\t\t\t'Object Instantiation # {~RandomNumberString:1,9~}',\n\t\t\t\t\t\t\t(fDone) =>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlet _{~PascalCaseIdentifier:AppData.Package.name~} = new lib{~PascalCaseIdentifier:AppData.Package.name~}();\n\t\t\t\t\t\t\t\tExpect(_{~PascalCaseIdentifier:AppData.Package.name~}).to.be.an('object');\n\t\t\t\t\t\t\t\treturn fDone();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\t}\n);"
54
+ "Content": "/*\n\tUnit tests for {~PascalCaseIdentifier:AppData.Package.name~} v.${_Package.version} {~Data:Record.Scope~}\n*/\n\nconst Chai = require('chai');\nconst Expect = Chai.expect;\n\nconst lib{~PascalCaseIdentifier:AppData.Package.name~} = require(`../{~Data:AppData.Package.main~}`);\n\nsuite\n(\n\t'{~PascalCaseIdentifier:AppData.Package.name~} {~Data:Record.Scope~} Suite',\n\t() =>\n\t{\n\t\tsetup(() => { });\n\n\t\tsuite\n\t\t\t(\n\t\t\t\t'Basic ${_Package.name}.v.${_Package.version} {~Data:Record.Scope~} Tests',\n\t\t\t\t() =>\n\t\t\t\t{\n\t\t\t\t\ttest(\n\t\t\t\t\t\t\t'Object Instantiation # {~RandomNumberString:1,9~}',\n\t\t\t\t\t\t\t(fDone) =>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlet _{~PascalCaseIdentifier:AppData.Package.name~} = new lib{~PascalCaseIdentifier:AppData.Package.name~}();\n\t\t\t\t\t\t\t\tExpect(_{~PascalCaseIdentifier:AppData.Package.name~}).to.be.an('object');\n\t\t\t\t\t\t\t\treturn fDone();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\t}\n);"
55
55
  }
56
56
  ]
57
57
  },
@@ -94,11 +94,10 @@ libGulp.task('minified',
94
94
  .pipe(libVinylSourceStream(_CONFIG.LibraryMinifiedFileName))
95
95
  .pipe(libVinylBuffer())
96
96
  .pipe(libSourcemaps.init({loadMaps: true}))
97
- // Oddly, having a .babelrc with this same thing behaves differently, and is the behavior we want
98
- //.pipe(libBabel({"presets": ["@babel/preset-env"]}))
99
- .pipe(libBabel())
100
- .pipe(libTerser())
101
- .on('error', console.log)
97
+ // Oddly, having a .babelrc with this same thing behaves differently, and is the behavior we want
98
+ //.pipe(libBabel({"presets": ["@babel/preset-env"]}))
99
+ .pipe(libBabel())
100
+ .pipe(libTerser()).on('error', console.log)
102
101
  .pipe(libSourcemaps.write('./'))
103
102
  .pipe(libGulp.dest(_CONFIG.LibraryOutputFolder));
104
103
  });
@@ -117,10 +116,10 @@ libGulp.task('debug',
117
116
  return tmpBrowserify.bundle()
118
117
  .pipe(libVinylSourceStream(_CONFIG.LibraryUniminifiedFileName))
119
118
  .pipe(libVinylBuffer())
120
- // Oddly, having a .babelrc with this same thing behaves differently, and is the behavior we want
121
- //.pipe(libBabel({"presets": ["@babel/preset-env"]}))
122
- .pipe(libBabel())
123
- .on('error', console.log)
119
+ .pipe(libSourcemaps.init({loadMaps: true}))
120
+ // Oddly, having a .babelrc with this same thing behaves differently, and is the behavior we want
121
+ //.pipe(libBabel({"presets": ["@babel/preset-env"]}))
122
+ .pipe(libBabel()).on('error', console.log)
124
123
  .pipe(libGulp.dest(_CONFIG.LibraryOutputFolder));
125
124
  });
126
125
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quackage",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "description": "Building. Testing. Quacking.",
5
5
  "main": "source/Quackage.js",
6
6
  "scripts": {
@@ -54,16 +54,16 @@
54
54
  "@babel/preset-env": "^7.22.5",
55
55
  "browserify": "^17.0.0",
56
56
  "chai": "4.3.7",
57
- "commander": "^10.0.1",
57
+ "commander": "^11.0.0",
58
58
  "gulp": "^4.0.2",
59
59
  "gulp-babel": "^8.0.0",
60
60
  "gulp-env": "^0.4.0",
61
61
  "gulp-sourcemaps": "^3.0.0",
62
62
  "gulp-terser": "^2.1.0",
63
63
  "mocha": "10.2.0",
64
- "npm-check-updates": "^16.10.12",
64
+ "npm-check-updates": "^16.10.13",
65
65
  "nyc": "^15.1.0",
66
- "pict": "^1.0.108",
66
+ "pict": "^1.0.113",
67
67
  "vinyl-buffer": "^1.0.1",
68
68
  "vinyl-source-stream": "^2.0.0"
69
69
  }
@@ -48,10 +48,10 @@
48
48
  {
49
49
  "start": "node {~Data:AppData.Package.main~}",
50
50
 
51
- "test": "./node_modules/.bin/mocha -u tdd -R spec",
52
- "tests": "./node_modules/mocha/bin/_mocha -u tdd --exit -R spec --grep",
51
+ "test": "npx mocha -u tdd -R spec",
52
+ "tests": "npx mocha -u tdd --exit -R spec --grep",
53
53
 
54
- "coverage": "./node_modules/.bin/nyc --reporter=lcov --reporter=text-lcov ./node_modules/mocha/bin/_mocha -- -u tdd -R spec",
54
+ "coverage": "npx nyc --reporter=lcov --reporter=text-lcov ./node_modules/mocha/bin/_mocha -- -u tdd -R spec",
55
55
 
56
56
  "build": "npx quack build",
57
57
 
@@ -55,7 +55,7 @@ const libPictExtension = require(`../${_Package.main}`);
55
55
 
56
56
  suite
57
57
  (
58
- `Basic ${_Package.name}v${_Package.version} tests`,
58
+ `Basic ${_Package.name}.v.${_Package.version} tests`,
59
59
  () =>
60
60
  {
61
61
  setup(() => { });
@@ -1,5 +1,5 @@
1
1
  /*
2
- Unit tests for {~PascalCaseIdentifier:AppData.Package.name~} {~Data:Record.Scope~}
2
+ Unit tests for {~PascalCaseIdentifier:AppData.Package.name~} v.${_Package.version} {~Data:Record.Scope~}
3
3
  */
4
4
 
5
5
  const Chai = require('chai');
@@ -9,14 +9,14 @@ const lib{~PascalCaseIdentifier:AppData.Package.name~} = require(`../{~Data:AppD
9
9
 
10
10
  suite
11
11
  (
12
- '{~PascalCaseIdentifier:AppData.Package.name~} {~Data:Record.Scope~}',
12
+ '{~PascalCaseIdentifier:AppData.Package.name~} {~Data:Record.Scope~} Suite',
13
13
  () =>
14
14
  {
15
15
  setup(() => { });
16
16
 
17
17
  suite
18
18
  (
19
- 'Basic {~Data:Record.Scope~} Tests',
19
+ 'Basic ${_Package.name}.v.${_Package.version} {~Data:Record.Scope~} Tests',
20
20
  () =>
21
21
  {
22
22
  test(
@@ -26,6 +26,7 @@ suite
26
26
  'Quackage should load up okay.',
27
27
  function()
28
28
  {
29
+ // How doth the little crocodile automatically test the cli-only utility well?
29
30
  let testQuackage = new libQuackage();
30
31
  Expect(testQuackage.settings.Product).to.equal('ApplicationNameHere')
31
32
  }