elm-doc-test
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -14,2 +14,2 @@ #!/usr/bin/env node | ||
cliModel.run(cliModel.config); | ||
cliModel.run(cliModel); |
@@ -28,3 +28,3 @@ // imports | ||
running_mode_loaders[RUNNING_MODE.GENERATE] = function(){ | ||
running_mode_loaders[RUNNING_MODE.GENERATE] = function(showWarnings){ | ||
var docTestConfig = helpers.loadDocTestConfig(); | ||
@@ -35,7 +35,8 @@ | ||
config: docTestConfig, | ||
run: running_mode_runners[RUNNING_MODE.GENERATE] | ||
run: running_mode_runners[RUNNING_MODE.GENERATE], | ||
showWarnings: showWarnings | ||
}; | ||
}; | ||
running_mode_loaders[RUNNING_MODE.RUN] = function(argv){ | ||
running_mode_loaders[RUNNING_MODE.RUN] = function(argv, showWarnings){ | ||
var files = argv.run; | ||
@@ -50,3 +51,4 @@ | ||
config: config, | ||
run: running_mode_runners[RUNNING_MODE.RUN] | ||
run: running_mode_runners[RUNNING_MODE.RUN], | ||
showWarnings: showWarnings | ||
}; | ||
@@ -60,8 +62,13 @@ }; | ||
var showWarnings = true; | ||
if (typeof argv.warn !== "undefined") { | ||
showWarnings = argv.warn; | ||
} | ||
if (typeof argv.run === "undefined") { | ||
console.log('Running in generate mode..'); | ||
model = running_mode_loaders[RUNNING_MODE.GENERATE](); | ||
if (showWarnings) console.log('Running in generate mode..'); | ||
model = running_mode_loaders[RUNNING_MODE.GENERATE](showWarnings); | ||
} else { | ||
console.log('Running in run mode..'); | ||
model = running_mode_loaders[RUNNING_MODE.RUN](argv); | ||
if (showWarnings) console.log('Running in run mode..'); | ||
model = running_mode_loaders[RUNNING_MODE.RUN](argv, showWarnings); | ||
} | ||
@@ -72,3 +79,4 @@ | ||
function run(config){ | ||
function run(model){ | ||
var config = model.config; | ||
var files = config.files.split(' '); | ||
@@ -83,3 +91,4 @@ files = files.filter( | ||
function generate(config, allTestsGenerated) { | ||
function generate(model, allTestsGenerated) { | ||
var config = model.config; | ||
var testsPath = path.join( | ||
@@ -95,3 +104,5 @@ process.cwd(), | ||
if (config.tests.length === 0){ | ||
console.log('No tests listed! Modify your elm-doc-test.json file to include modules'); | ||
if (model.showWarnings) { | ||
console.log('No tests listed! Modify your elm-doc-test.json file to include modules'); | ||
} | ||
return; | ||
@@ -98,0 +109,0 @@ } |
{ | ||
"name": "elm-doc-test", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "doc-test for elm", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
491709
18800