Skip to content

Commit af1475d

Browse files
committed
0.1.0 release
1 parent dd20757 commit af1475d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/prepublish.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ if (inPublish || process.env.NPM_IN_PUBLISH_TEST)
2222
var stripJsonComments = require('strip-json-comments');
2323

2424
// Verify that `.npmscriptrc` exists.
25+
/* istanbul ignore next */
2526
try
2627
{
2728
if (!fs.statSync('./.npmscriptrc').isFile())
@@ -38,6 +39,7 @@ if (inPublish || process.env.NPM_IN_PUBLISH_TEST)
3839
var configInfo = JSON.parse(stripJsonComments(fs.readFileSync('./.npmscriptrc', 'utf-8')));
3940

4041
// Verify that publish entry is an object.
42+
/* istanbul ignore if */
4143
if (typeof configInfo.publish !== 'object')
4244
{
4345
throw new Error(
@@ -46,6 +48,7 @@ if (inPublish || process.env.NPM_IN_PUBLISH_TEST)
4648
}
4749

4850
// Verify that prepublish entry is an object.
51+
/* istanbul ignore if */
4952
if (typeof configInfo.publish.prepublish !== 'object')
5053
{
5154
throw new Error(
@@ -56,12 +59,14 @@ if (inPublish || process.env.NPM_IN_PUBLISH_TEST)
5659
var prepublishConfig = configInfo.publish.prepublish;
5760

5861
// Verify scripts entry exists
62+
/* istanbul ignore if */
5963
if (typeof prepublishConfig.scripts === 'undefined')
6064
{
6165
throw new Error(
6266
"TyphonJS NPM script (prepublish) error: 'publish.prepublish.scripts' entry is missing in '.npmscriptrc'.");
6367
}
6468

69+
/* istanbul ignore if */
6570
if (!Array.isArray(prepublishConfig.scripts))
6671
{
6772
throw new Error(

0 commit comments

Comments
 (0)