Skip to content

Commit b590624

Browse files
committed
0.3.0 release:
- added typhonjs-npm-scripts-runner - updated typhonjs-npm-scripts-build-babel - updated typhonjs-npm-scripts-publish
1 parent 7da7d26 commit b590624

File tree

4 files changed

+31
-6
lines changed

4 files changed

+31
-6
lines changed

.npmscriptrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
"prepublish": { "scripts": ["npm run eslint", "npm run test-scripts"] }
1717
},
1818

19+
"runner":
20+
{
21+
"scripts": ["cp ./test-src/data/test.json ./test-src/dist/test.json"]
22+
},
23+
1924
"test":
2025
{
2126
// Provides a report handling command that is executed after running tests / coverage when running on Travis CI.

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typhonjs-npm-build-test",
3-
"version": "0.2.0",
3+
"version": "0.3.0",
44
"homepage": "https://github.com/typhonjs-node-npm-scripts/typhonjs-npm-build-test",
55
"description": "Provides a unified set of NPM scripts and dependencies for building and testing ES6 NPM modules for TyphonJS and beyond.",
66
"license": "MPL-2.0",
@@ -20,9 +20,10 @@
2020
"dependencies": {
2121
"typhonjs-istanbul-instrument-jspm": "^0.1.0",
2222
"typhonjs-node-esdoc": "^0.2.0",
23-
"typhonjs-npm-scripts-build-babel": "^0.2.0",
24-
"typhonjs-npm-scripts-publish": "^0.1.0",
25-
"typhonjs-npm-scripts-test-mocha": "^0.2.0"
23+
"typhonjs-npm-scripts-build-babel": "^0.3.0",
24+
"typhonjs-npm-scripts-publish": "^0.2.0",
25+
"typhonjs-npm-scripts-test-mocha": "^0.2.0",
26+
"typhonjs-npm-scripts-runner": "^0.1.0"
2627
},
2728
"devDependencies": {
2829
"typhonjs-config-eslint": "^0.4.0"

test-scripts/mocha/TestScriptsRunner.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ fs.emptyDirSync('./coverage-test');
1010
* `../../node_modules/typhonjs-npm-scripts-build-babel/scripts/build.js`
1111
* `../../node_modules/typhonjs-npm-scripts-test-mocha/scripts/test.js`
1212
* `../../node_modules/typhonjs-npm-scripts-test-mocha/scripts/test-coverage.js`
13-
* `../../node_modules/typhonjs-npm-scripts-publish/scripts/prepublish.js`
13+
*
14+
* Runs the following module:
15+
* `typhonjs-npm-scripts-runner`
1416
*
1517
* @test {onHandleCode}
1618
*/
@@ -19,7 +21,7 @@ describe('Script Test', function()
1921
/**
2022
* Test `../../node_modules/typhonjs-npm-scripts-build-babel/scripts/build.js`.
2123
*/
22-
it('build', function()
24+
it('babel build', function()
2325
{
2426
fs.emptyDirSync('./test-src/dist');
2527

@@ -113,4 +115,20 @@ describe('Script Test', function()
113115

114116
process.chdir(cwd);
115117
});
118+
119+
/**
120+
* Test `typhonjs-npm-scripts-runner`.
121+
*/
122+
it('runner', function()
123+
{
124+
fs.emptyDirSync('./test-src/dist');
125+
126+
var runner = require('typhonjs-npm-scripts-runner');
127+
128+
runner.run('./.npmscriptrc', 'runner.scripts');
129+
130+
assert(fs.statSync('./test-src/dist/test.json').isFile());
131+
132+
fs.emptyDirSync('./test-src/dist');
133+
});
116134
});

test-src/data/test.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)