commonplace
Advanced tools
Comparing version 0.6.2 to 0.6.3
@@ -138,52 +138,2 @@ var child_process = require('child_process'); | ||
function lint() { | ||
var jshint = require('jshint').JSHINT; | ||
var src_dir = srcDir(); | ||
var results = []; | ||
function report(file, err) { | ||
console.error( | ||
path.relative(process.cwd(), file) + ': ' + err.code, | ||
'(line ' + err.line + ', pos ' + err.character + ')', | ||
err.reason | ||
); | ||
results.push({file: file, error: err}); | ||
} | ||
utils.globSync(src_dir, '.js', function(err, files) { | ||
if (err) { | ||
console.error('Error finding files for linting.', err); | ||
process.exit(1); | ||
} | ||
for (var i = 0, file; file = files[i++];) { | ||
// Skip over files in any `lib/` directory. | ||
if (path.dirname(file).split(path.sep).indexOf('lib') !== -1) { | ||
continue; | ||
} | ||
// Skip over `templates.js`. | ||
if (path.basename(file) === 'templates.js') { | ||
continue; | ||
} | ||
var code = fs.readFileSync(file); | ||
if (!jshint(code.toString())) { | ||
jshint.errors.forEach(function(err) { | ||
if (!err) { | ||
return; | ||
} | ||
report(file, err); | ||
}); | ||
} | ||
} | ||
}); | ||
if (results.length) { | ||
console.warn(results.length + ' errors found'); | ||
process.exit(1); | ||
} else { | ||
console.log('No errors found.'); | ||
} | ||
} | ||
function fiddle() { | ||
@@ -332,3 +282,2 @@ var now = (new Date()).getTime(); | ||
module.exports.extract_l10n = extract_l10n; | ||
module.exports.lint = lint; | ||
module.exports.fiddle = fiddle; | ||
@@ -335,0 +284,0 @@ |
{ | ||
"name": "commonplace", | ||
"description": "Reusable components for Firefox Marketplace frontend projects.", | ||
"version": "0.6.2", | ||
"version": "0.6.3", | ||
"main": "lib/commonplace", | ||
@@ -6,0 +6,0 @@ "preferGlobal": true, |
@@ -43,4 +43,3 @@ # Commonplace | ||
Clone the | ||
[Commonplace base template](https://github.com/mozilla/commonplace-template). | ||
Clone the [Marketplace template](https://github.com/mozilla/marketplace-template). | ||
@@ -55,2 +54,1 @@ Run ```make init```. This will download dependencies from Commonplace via Bower | ||
documentation about the project and the Commonplace framework. | ||
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
869765
6945
53