quickstart
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -70,2 +70,5 @@ 'use strict'; | ||
// set warnings to true by default | ||
if (options.warnings == null) options.warnings = true; | ||
// clean up options.output | ||
@@ -113,2 +116,5 @@ if (options.output == null) options.output = true; | ||
help.write(clc.green('--warnings '), | ||
'display warning messages. defaults to', clc.blue('true')); | ||
help.write(clc.green('--help, -h '), | ||
@@ -158,3 +164,3 @@ 'display this help screen'); | ||
if ((/warning/i).test(statement)) { | ||
konsole.group(clc.yellow(statement)); | ||
if (options.warnings) konsole.group(clc.yellow(statement)); | ||
} else if ((/error/i).test(statement)) { | ||
@@ -199,3 +205,3 @@ konsole.group(clc.red(statement)); | ||
case 'warn': | ||
konsole.write(clc.yellow(id + ': ') + message); | ||
if (options.warnings) konsole.write(clc.yellow(id + ': ') + message); | ||
break; | ||
@@ -202,0 +208,0 @@ case 'time': |
@@ -51,6 +51,7 @@ /* global -Promise */ | ||
runtimePath: pathogen.relative(root, appRuntimePath), | ||
sourceMap: !!options.browserSourceMap, | ||
defaultPath: pathogen.relative(root, options.defaultPath) | ||
sourceMap: !!options.browserSourceMap | ||
}; | ||
if (options.defaultPath) config.defaultPath = pathogen.relative(root, options.defaultPath); | ||
var runtimePath = pathogen(__dirname + '/runtime/browser.js'); | ||
@@ -57,0 +58,0 @@ |
{ | ||
"name": "quickstart", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "CommonJS module compiler for node.js and browsers", | ||
@@ -53,3 +53,3 @@ "main": "./main.js", | ||
"esmangle": "~1.0.1", | ||
"performance-now": "~0.1.3", | ||
"microseconds": "0.0.2", | ||
"cli-color": "~0.3.2", | ||
@@ -56,0 +56,0 @@ "require-relative": "^0.8.7", |
@@ -122,2 +122,3 @@ # [QuickStart](http://spotify.github.io/quickstart) | ||
main: false // override the application's main, defaults to the QuickStart resolver | ||
warnings: true // display warning messages, defaults to true | ||
} | ||
@@ -143,2 +144,3 @@ ``` | ||
--main ./path/to/entry-point # override the application's entry point, defaults to the QuickStart resolver | ||
--warnings # display warnings messages, defaults to true | ||
--ast ./path/to/source.ast # writes the ast to a file or *STDOUT*, defaults to false | ||
@@ -145,0 +147,0 @@ ``` |
@@ -132,2 +132,10 @@ /* jshint strict:false */ | ||
it('should always have a trailing slash in paths', function() { | ||
var resolver = new Resolver({defaultPath: 'folder'}); | ||
var paths = resolver._paths('folder'); | ||
for (var i = 0, l = paths.length; i < l; i++) { | ||
expect(paths[i].substr(-1, 1)).to.equal('/'); | ||
} | ||
}); | ||
}); |
@@ -19,3 +19,3 @@ /* | ||
var now = require('performance-now'); | ||
var microseconds = require('microseconds'); | ||
@@ -68,3 +68,3 @@ var Message = prime({ | ||
time: function(id) { | ||
this.timeStamps[id] = now(); | ||
this.timeStamps[id] = microseconds.now(); | ||
return this; | ||
@@ -76,5 +76,5 @@ }, | ||
if (timestamp) { | ||
var end = now() - timestamp; | ||
var timeStamp = end + ' milliseconds'; | ||
this.messages.push(new Message('time', {id: name || id, message: timeStamp})); | ||
var end = microseconds.since(timestamp); | ||
var timeStampString = microseconds.parse(end).toString(); | ||
this.messages.push(new Message('time', {id: name || id, message: timeStampString})); | ||
} | ||
@@ -81,0 +81,0 @@ return this; |
@@ -212,3 +212,3 @@ /* global -Promise*/ | ||
paths.push(drive + '/'); | ||
if (this.defaultPath) paths.push(this.defaultPath); | ||
if (this.defaultPath) paths.push(this.defaultPath + '/'); | ||
return paths; | ||
@@ -215,0 +215,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
715054
72
2386
180
5
+ Addedmicroseconds@0.0.2
+ Addedbindings@1.2.0(transitive)
+ Addedmicroseconds@0.0.2(transitive)
+ Addedmicrotime@0.6.0(transitive)
+ Addednan@1.0.0(transitive)
- Removedperformance-now@~0.1.3
- Removedperformance-now@0.1.4(transitive)