Skip to content

Commit 1787843

Browse files
committed
0.1.0 release
1 parent 994e49a commit 1787843

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/build.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ var fs = require('fs-extra');
1717
var stripJsonComments = require('strip-json-comments');
1818

1919
// Verify that `.npmscriptrc` exists.
20+
/* istanbul ignore next */
2021
try
2122
{
2223
if (!fs.statSync('./.npmscriptrc').isFile())
@@ -30,6 +31,7 @@ catch(err)
3031
}
3132

3233
// Verify that `Babel` exists.
34+
/* istanbul ignore next */
3335
try
3436
{
3537
if (!fs.statSync('./node_modules/.bin/babel').isFile())
@@ -46,6 +48,7 @@ catch(err)
4648
var configInfo = JSON.parse(stripJsonComments(fs.readFileSync('./.npmscriptrc', 'utf-8')));
4749

4850
// Verify that `build` entry is an object.
51+
/* istanbul ignore if */
4952
if (typeof configInfo.build !== 'object')
5053
{
5154
throw new Error(
@@ -54,6 +57,7 @@ if (typeof configInfo.build !== 'object')
5457

5558

5659
// Verify that `build.babel` entry is an object.
60+
/* istanbul ignore if */
5761
if (typeof configInfo.build.babel !== 'object')
5862
{
5963
throw new Error(
@@ -63,6 +67,7 @@ if (typeof configInfo.build.babel !== 'object')
6367
var babelConfig = configInfo.build.babel;
6468

6569
// Verify that source entry is a string.
70+
/* istanbul ignore if */
6671
if (typeof babelConfig.source !== 'string')
6772
{
6873
throw new Error(
@@ -71,6 +76,7 @@ if (typeof babelConfig.source !== 'string')
7176
}
7277

7378
// Verify that destination entry is a string.
79+
/* istanbul ignore if */
7480
if (typeof babelConfig.destination !== 'string')
7581
{
7682
throw new Error(
@@ -79,6 +85,7 @@ if (typeof babelConfig.destination !== 'string')
7985
}
8086

8187
// Verify that source entry is a directory.
88+
/* istanbul ignore next */
8289
try
8390
{
8491
if (!fs.statSync(babelConfig.source).isDirectory())
@@ -95,6 +102,7 @@ catch(err)
95102
fs.emptyDirSync(babelConfig.destination);
96103

97104
// Verify that destination entry is a directory.
105+
/* istanbul ignore next */
98106
try
99107
{
100108
if (!fs.statSync(babelConfig.destination).isDirectory())
@@ -113,6 +121,7 @@ var exec = './node_modules/.bin/babel ' + babelConfig.source + ' -d ' + babelCon
113121
// Add any optional parameters.
114122
if (typeof babelConfig.options !== 'undefined')
115123
{
124+
/* istanbul ignore if */
116125
if (!Array.isArray(babelConfig.options))
117126
{
118127
throw new Error(

0 commit comments

Comments
 (0)