xonecas.io
818
Du

dustymarkdown / commit b467f89

updated the modules

xonecas2011-06-04 b467f89d48f2fe923d80305b5109ffe7cb56da07 parent 27a26d7

58 files changed

This diff is too big to show in full. The first 1000 lines are below, and every file is listed with its counts.

htdocs/index.html+6−2
@@ -1,6 +1,10 @@
11 <!doctype html>
2-<!--[if lt IE 9 ]> <html class="no-js oldie" lang="en"> <![endif]-->
3-<!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
2+<!--[if lt IE 9 ]>
3+ <html class="no-js oldie" lang="en">
4+<![endif]-->
5+<!--[if (gte IE 9)|!(IE)]>
6+ <!--> <html class="no-js" lang="en"> <!--
7+<![endif]-->
48 <head>
59 <meta charset="utf-8">
610
lib/build.js+2−3
@@ -1,6 +1,5 @@
11 // modules
22 var fs = require('fs'),
3- jshint = require('jshint').JSHINT,
43 jsp = require("uglify-js").parser,
54 pro = require("uglify-js").uglify,
65 dust = require('dust'),
@@ -118,7 +117,7 @@ function html (min, cb) {
118117
119118 //@TODO compress html
120119 if (min) htmlFiles.forEach(function (file, idx) {
121- htmlFiles[idx].src = kompressor(file.src);
120+ htmlFiles[idx].src = kompressor(file.src, true);
122121 });
123122
124123 // write them down
@@ -190,7 +189,7 @@ function js (min, cb) {
190189 });
191190 }
192191
193-module.exports = function (prod, hint) {
192+module.exports = function (prod) {
194193 html(prod, function (err) {
195194 if (err) throw err;
196195
markdown/about.md+8−8
@@ -1,7 +1,7 @@
1-> This project is the new content manager under [xonecas.com](http://xonecas.com).
1+> This project is the new content manager under [xonecas.com](http://xonecas.com).
22 > It's very minimal and light, developer friendly. The idea
3-> is that you can write the dynamic content in markdown and
4-> use dust to combine static and dynamic.
3+> is that you can write the dynamic content in markdown and
4+> use dust to combine static and dynamic.
55
66 This app is only possible thanks to:
77 ------------------------------------
@@ -12,9 +12,9 @@ This app is only possible thanks to:
1212
1313 ### The gist:
1414
15-So the build.js file grabs the source files you write and
15+So the build.js file grabs the source files you write and
1616 compiles them into static assets (@TODO add compression
17-and concatenation). The way it knows what to do with your
17+and concatenation). The way it knows what to do with your
1818 files is because it expects a specific folder/naming
1919 convention.
2020
@@ -42,9 +42,9 @@ This app is the example of that convention:
4242 // files are created by build.js
4343 // so don't edit them by hand
4444
45-The default htdocs folder is from HTML5 Boilerplate and so is
46-the static file server. One difference is that this app uses
47-Ender for the js library, but you're welcome to change it.
45+The default htdocs folder is from HTML5 Boilerplate and so is
46+the static file server. One difference is that this app uses
47+Ender for the js library, but you're welcome to change it.
4848 There is also a very simple unique visitors/request counter.
4949
5050 See the example page [here](/about).
node_modules/.bin/jshint+0−1
@@ -1 +0,0 @@
1-../jshint/bin/hint
node_modules/htmlKompressor/lib/kompressor.js+15−11
@@ -1,5 +1,9 @@
11 // by @xonecas based on https://github.com/tylerhall/html-compressor.git
22 module.exports = function (source, noComments) {
3+ if (noComments) { // remove comments
4+ source = source.replace(/<\!--.*?--\>/g, "");
5+ }
6+
37 var lines = source.split("\n"),
48 insidePre = false, kompressed = "";
59
@@ -9,35 +13,35 @@ module.exports = function (source, noComments) {
913 if (!insidePre) {
1014 var start = line.match(/<pre/);
1115 if (start) {
12- line.replace(/^\s+/, ""); // only before the pre tag
16+ line = line.replace(/^\s+/, ""); // only before the pre tag
1317
1418 // does it end in the same line?
1519 var end = line.match(/<\/pre>/);
1620 if (end && end.index > start.index)
17- line.replace(/\s+$/, "");
21+ line = line.replace(/\s+$/, "");
1822 else
1923 insidePre = true;
2024 }
21- else { // no pre
22- line.trim();
23- line.replace(/\s\s+/, ""); // condense spaces
25+ else if (line !== "") { // no pre, don't parse blank lines.
26+ line = line.trim();
27+ line = line.replace(/\s+/g, " "); // condense spaces
28+ line += " "; // separate what would be 2 lines with a space
29+ // so that we don't mangle content.
2430 }
2531 }
2632 else { // inside pre tag
2733 var end = line.match(/<\/pre>/);
2834 if (end) {
29- line.replace(/\s+$/, "");
35+ line = line.replace(/\s+$/, "");
3036 insidePre = false;
3137 }
38+ else
39+ line += "\n"; //put back new line
3240 }
3341
34- kompressed += (insidePre)? line+"\n": line;
42+ kompressed += line;
3543 } // end while
3644
37- if (noComments) { // remove comments
38- kompressed = kompressed.replace(/<\!--.*?--\>/g, "");
39- }
40-
4145 return kompressed;
4246 }
4347
node_modules/htmlKompressor/package.json+1−1
@@ -1,7 +1,7 @@
11 {
22 "name": "htmlKompressor",
33 "description": "Node.js Module for compressing html files",
4- "version": "0.0.1",
4+ "version": "0.0.4",
55 "main": "lib/kompressor.js",
66 "homepage": "https://github.com/xonecas/htmlKompressor",
77 "repository": {
node_modules/htmlKompressor/test/index.html+2−2
@@ -1,4 +1,4 @@
1-<!doctype html><!--[if lt IE 9 ]> <html class="no-js oldie" lang="en"> <![endif]--><!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]--><head><meta charset="utf-8"><title>Dusty Markdown</title><meta name="description" content="simple command line content manager"><meta name="author" content="@xonecas"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link rel="shortcut icon" href="/favicon.ico"><link rel="apple-touch-icon" href="/apple-touch-icon.pn …
1+<!doctype html> <!--[if lt IE 9 ]> <html class="no-js oldie" lang="en"> <![endif]--><!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]--><head><meta charset="utf-8"><title>Dusty Markdown</title><meta name="description" content="simple command line content manager"><meta name="author" content="@xonecas"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link rel="shortcut icon" href="/favicon.ico"><link rel="apple-touch-icon" href="/apple-touch-icon. …
22 <p>This project is the new content manager under <a href="http://xonecas.com">xonecas.com</a>.
33 It's very minimal and light, developer friendly. The idea
44 is that you can write the dynamic content in markdown and
@@ -64,4 +64,4 @@ There is also a very simple unique visitors/request counter.</p>
6464 <li><a href="http://h5bp.com/"><em>HTML5 Boilerplate</em> →</a></li>
6565 <li><a href="http://akdubya.github.com/dustjs/"><em>Dust</em> →</a></li>
6666 <li><a href="http://daringfireball.net/projects/markdown/basics"><em>Markdown</em> →</a></li>
67-</ul></section><script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script><script>window.jQuery || document.write("<script src='js/libs/jquery-1.5.1.min.js'>\x3C/script>")</script><!-- scripts concatenated and minified via ant build script--><script src="js/plugins.js"></script><script src="js/script.js"></script><!-- end scripts--><!--[if lt IE 7 ]><script src="js/libs/dd_belatedpng.js"></script><script>DD_belatedPNG.fix("img, .png_bg");</script><![endif]--></body></html>
67+</ul></section><script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script><script>window.jQuery || document.write("<script src='js/libs/jquery-1.5.1.min.js'>\x3C/script>")</script><!-- scripts concatenated and minified via ant build script--><script src="js/plugins.js"></script><script src="js/script.js"></script><!-- end scripts--><!--[if lt IE 7 ]><script src="js/libs/dd_belatedpng.js"></script><script>DD_belatedPNG.fix("img, .png_bg");</script><![endif]--></body></html>
node_modules/htmlKompressor/test/test.js+2−2
@@ -1,7 +1,7 @@
1-var kompressor = require("./lib/kompressor.js"),
1+var kompressor = require("../lib/kompressor.js"),
22 fs = require('fs');
33
4-fs.readFile("./index.html", "utf8", function (err, file) {
4+fs.readFile("./test/index.html", "utf8", function (err, file) {
55 if (err) throw err;
66
77 console.log(kompressor(file, true));
node_modules/jshint/.gitignore+0−2
@@ -1,2 +0,0 @@
1-tags
2-node_modules
node_modules/jshint/.gitmodules+0−3
@@ -1,3 +0,0 @@
1-[submodule "packages/jshint"]
2- path = packages/jshint
3- url = git://github.com/jshint/jshint.git
node_modules/jshint/CHANGELOG.md+0−62
@@ -1,62 +0,0 @@
1-## v0.2.2 - 25/05/2011
2-
3-* fixed a problem that occurs when predef is defined in a project file but there is no homeconfig
4-* bumped JSHint to 2011-04-16
5-
6-## v0.2.1 - 06/05/2011
7-
8-* fixed bug when either the $HOME/.jshintrc or the project specific .jshintrc is missing, neither is used
9-* added the path to the executable for npm 1.0.x
10-
11-## v0.2.0 - 06/04/2011
12-
13-* added the ability for a project specific .jshintrc file (in the current working directory)
14-* switched custom reporter to be module that exports a reporter function (instead of evaluating a file)
15-* bumped JSHint to 2011-04-06
16-
17-## v0.1.9 - 29/03/2011
18-
19-* remove ./ from file name in jslint xml reporter
20-
21-## v0.1.8 - 27/03/2011
22-
23-* jshint already removes shebangs itself
24-* added a jslint compatible xml output formatter option
25-
26-## v0.1.7 - 23/03/2011
27-
28-* fixed line number reporting being off by one when file has a shebang
29-
30-## v0.1.6 - 21/03/2011
31-
32-* removed bin property in package.json
33-
34-## v0.1.5 - 20/03/2011
35-
36-* exit process with appropriate status code after lint
37-* use ~/.jshintrc as default options if available
38-* added --version option
39-
40-## v0.1.4 - 01/03/2011
41-
42-* updated JSHint to 2011-03-01 edition (7c4d2acec850beceff8b)
43-
44-## v0.1.3 - 26/02/2011
45-
46-* enable require('jshint') when installed through npm
47-* omitted "node-" prefix in cli and npm package name
48-* bumped jshint to latest (b81e938959444dd2a9e2)
49-
50-## v0.1.2 - 24/02/2011
51-
52-* bumped jshint to latest (3b018b1e454d3917e33c)
53-
54-## v0.1.1 - 21/02/2011
55-
56-* reafactored portion of cli into hint module
57-* switched to jasmine for tests
58-* custom reporters
59-
60-## v0.1.0 - 20/02/2011
61-
62-* initial commit
node_modules/jshint/HELP+0−8
@@ -1,8 +0,0 @@
1-Usage: jshint path path2 [options]
2-
3-Options:
4-
5- --version display package version
6- --config custom config file
7- --reporter custom reporter
8- --jslint-reporter use a jslint compatible xml reporter
node_modules/jshint/Jakefile+0−3
@@ -1,3 +0,0 @@
1-task('default', [], require('./build/test'));
2-task('test', [], require('./build/test'));
3-task('lint', [], require('./build/lint'));
node_modules/jshint/LICENSE+0−16
@@ -1,16 +0,0 @@
1-** Licensed Under **
2-
3- The MIT License
4- http://www.opensource.org/licenses/mit-license.php
5-
6-Maintainers:
7- Brent Lintner (github.com/brentlintner)
8- Anton Kovalyov (github.com/antonkovalyov)
9- Paul Irish (github.com/paulirish)
10-
11-Contributors:
12- Marco Rogers (github.com/polotek)
13- Matthew Kitt (github.com/mkitt)
14- Vasili Sviridov (github.com/vsviridov)
15- Julien P (github.com/julienp)
16- Jonas Wagner (github.com/jwagner)
node_modules/jshint/README.md+0−57
@@ -1,57 +0,0 @@
1-# node-jshint
2-
3-A command line interface and npm package for jshint.
4-
5-## Install
6-
7-To use jshint from any location (for npm v1.x) you need to install using the global (-g) flag.
8-
9- npm install -g jshint
10-
11-## Usage
12-
13-The command line interface looks like this.
14-
15- jshint path path2 [options]
16-
17-You can also require JSHint itself as a module.
18-
19- var jshint = require('jshint');
20-
21-Note: If you are using npm v1.x be sure to install jshint locally (without the -g flag) or link it globally.
22-
23-## Custom Reporters
24-
25-Specify a custom reporter module (see example/reporter.js).
26-
27- --reporter path/to/reporter.js
28-
29-Use a jslint compatible xml reporter.
30-
31- --jslint-reporter
32-
33-## Custom Options
34-
35-Specify custom lint options (see example/config.json).
36-
37- --config path/to/config.json
38-
39-Note: This bypasses any .jshintrc files.
40-
41-## Default Options
42-
43-The CLI uses the default options that come with JSHint. However, if it locates a .jshintrc file in your home directory (~/) it will use those options first.
44-
45-## Per Directory Options
46-
47-If there is a .jshintrc file in the current working directory, any of those options will take precedence over (or be merged with) any options found in the ~/.jshintrc file (if it exists).
48-
49-## Installing dependencies for development
50-
51- npm install argparser jasmine-node
52- git submodule init
53- git submodule update
54-
55-## Running Tests
56-
57- jake test
node_modules/jshint/bin/hint+0−2
@@ -1,2 +0,0 @@
1-#!/usr/bin/env node
2-require('./../lib/cli').interpret(process.argv);
node_modules/jshint/build/lint.js+0−8
@@ -1,8 +0,0 @@
1-module.exports = function (files) {
2- var args = files && files.length > 0 ? files : ["build", "test", "lib"],
3- spawn = require('child_process').spawn,
4- cmd = spawn("jshint", args.concat(["--config", "build/lint.json"])),
5- sys = require('sys');
6- cmd.stdout.on('data', sys.print);
7- cmd.stderr.on('data', sys.print);
8-};
node_modules/jshint/build/lint.json+0−37
@@ -1,37 +0,0 @@
1-{
2- "predef": [
3- "jasmine",
4- "spyOn",
5- "it",
6- "console",
7- "describe",
8- "expect",
9- "beforeEach"
10- ],
11-
12- "node" : true,
13- "es5" : true,
14- "browser" : true,
15-
16- "boss" : false,
17- "curly": false,
18- "debug": false,
19- "devel": false,
20- "eqeqeq": true,
21- "evil": true,
22- "forin": true,
23- "immed": true,
24- "laxbreak": false,
25- "newcap": true,
26- "noarg": true,
27- "noempty": false,
28- "nonew": false,
29- "nomen": false,
30- "onevar": true,
31- "plusplus": false,
32- "regexp": false,
33- "undef": true,
34- "sub": true,
35- "strict": false,
36- "white": true
37-}
node_modules/jshint/build/test.js+0−26
@@ -1,26 +0,0 @@
1-module.exports = function () {
2- var jasmine = require('jasmine-node'),
3- verbose = false,
4- colored = true,
5- key;
6-
7- for (key in jasmine) {
8- if (Object.prototype.hasOwnProperty.call(jasmine, key)) {
9- global[key] = jasmine[key];
10- }
11- }
12-
13- process.argv.forEach(function (arg) {
14- switch (arg) {
15- case '--no-color':
16- colored = false;
17- break;
18- case '--silent':
19- verbose = false;
20- break;
21- }
22- });
23-
24- jasmine.executeSpecsInFolder(__dirname + "/../test/", function (runner, log) {
25- }, verbose, colored);
26-};
node_modules/jshint/example/config.json+0−35
@@ -1,35 +0,0 @@
1-{
2- "predef": [
3- "jasmine",
4- "spyOn",
5- "it",
6- "describe",
7- "expect"
8- ],
9-
10- "node" : true,
11- "es5" : true,
12- "browser" : true,
13-
14- "boss" : false,
15- "curly": false,
16- "debug": false,
17- "devel": false,
18- "eqeqeq": true,
19- "evil": false,
20- "forin": false,
21- "immed": true,
22- "laxbreak": false,
23- "newcap": true,
24- "noarg": true,
25- "noempty": false,
26- "nonew": false,
27- "nomen": false,
28- "onevar": true,
29- "plusplus": false,
30- "regexp": false,
31- "undef": true,
32- "sub": true,
33- "strict": false,
34- "white": true
35-}
node_modules/jshint/example/reporter.js+0−18
@@ -1,18 +0,0 @@
1-module.exports = {
2- reporter: function reporter(results) {
3- var sys = require('sys'),
4- len = results.length,
5- str = '',
6- file, error;
7-
8- results.forEach(function (result) {
9- file = result.file;
10- error = result.error;
11- str += file + ': line ' + error.line + ', col ' +
12- error.character + ', ' + error.reason + '\n';
13- });
14-
15- sys.puts(len > 0 ? (str + "\n" + len + ' error' + ((len === 1) ? '' : 's')) : "Lint Free!");
16- process.exit(len > 0 ? 1 : 0);
17- }
18-};
node_modules/jshint/lib/cli.js+0−97
@@ -1,97 +0,0 @@
1-var _fs = require('fs'),
2- _path = require('path'),
3- _sys = require('sys');
4-
5-function _help() {
6- _sys.print(_fs.readFileSync(__dirname + "/../HELP", "utf-8"));
7-}
8-
9-function _version() {
10- _sys.print(JSON.parse(_fs.readFileSync(__dirname + "/../package.json", "utf-8")).version + "\n");
11-}
12-
13-function _mergeConfigs(homerc, cwdrc) {
14- var homeConfig = {},
15- cwdConfig = {},
16- prop;
17-
18- try{
19- if (_path.existsSync(homerc)) homeConfig = JSON.parse(_fs.readFileSync(homerc, "utf-8"));
20- } catch (e) {
21- _sys.puts("Error opening config file " + homerc + '\n');
22- _sys.puts(e + "\n");
23- }
24- try{
25- if (_path.existsSync(cwdrc)) cwdConfig = JSON.parse(_fs.readFileSync(cwdrc, "utf-8"));
26- } catch (e) {
27- _sys.puts("Error opening config file " + cwdrc + '\n');
28- _sys.puts(e + "\n");
29- }
30-
31- for (prop in cwdConfig) {
32- if (typeof prop === 'string') {
33- if (prop === 'predef') {
34- homeConfig.predef = (homeConfig.predef || []).concat(cwdConfig.predef);
35- } else {
36- homeConfig[prop] = cwdConfig[prop];
37- }
38- }
39- }
40- return homeConfig;
41-}
42-
43-module.exports = {
44- interpret: function (args) {
45- var config, reporter,
46- options = require('argsparser').parse(args),
47- defaultConfig = _path.join(process.env.HOME, '.jshintrc'),
48- projectConfig = _path.join(process.cwd(), '.jshintrc'),
49- customConfig = options["--config"],
50- customReporter = options["--reporter"] ? _path.resolve(process.cwd(), options["--reporter"]) : null,
51- targets = typeof options.node === "string" ?
52- null : options.node.slice(1);
53-
54- if (options["--version"]) {
55- _version();
56- return;
57- }
58-
59- if (!targets || options["--help"]) {
60- _help();
61- return;
62- }
63-
64- if (options["--jslint-reporter"]) {
65- customReporter = "./jslint_reporter.js";
66- }
67-
68- if (customConfig) {
69- try {
70- config = JSON.parse(_fs.readFileSync(customConfig, "utf-8"));
71- } catch (e) {
72- _sys.puts("Error opening config file: " + customConfig);
73- _sys.puts(e + "\n");
74- process.exit(1);
75- }
76- } else {
77- try {
78- config = _mergeConfigs(defaultConfig, projectConfig);
79- } catch (f) {
80- _sys.puts("Error opening config file " + defaultConfig + " or " + projectConfig);
81- _sys.puts(e + "\n");
82- }
83- }
84-
85- if (customReporter) {
86- try {
87- reporter = require(customReporter).reporter;
88- } catch (r) {
89- _sys.puts("Error opening reporter file: " + customReporter);
90- _sys.puts(r + "\n");
91- process.exit(1);
92- }
93- }
94-
95- require('./hint').hint(targets, config, reporter);
96- }
97-};
node_modules/jshint/lib/hint.js+0−70
@@ -1,70 +0,0 @@
1-var _fs = require('fs'),
2- _sys = require('sys'),
3- _path = require('path'),
4- _jshint = require('./../packages/jshint/jshint.js'),
5- _config;
6-
7-function _lint(file, results) {
8- var buffer;
9-
10- try {
11- buffer = _fs.readFileSync(file, 'utf-8');
12- } catch (e) {
13- _sys.puts("Error: Cant open: " + file);
14- _sys.puts(e + '\n');
15- }
16-
17- if (!_jshint.JSHINT(buffer, _config)) {
18- _jshint.JSHINT.errors.forEach(function (error) {
19- if (error) {
20- results.push({file: file, error: error});
21- }
22- });
23- }
24-}
25-
26-function _collect(path, files) {
27- if (_fs.statSync(path).isDirectory()) {
28- _fs.readdirSync(path).forEach(function (item) {
29- _collect(_path.join(path, item), files);
30- });
31- } else if (path.match(/\.js$/)) {
32- files.push(path);
33- }
34-}
35-
36-function _reporter(results) {
37- var len = results.length,
38- str = '',
39- file, error;
40-
41- results.forEach(function (result) {
42- file = result.file;
43- error = result.error;
44- str += file + ': line ' + error.line + ', col ' +
45- error.character + ', ' + error.reason + '\n';
46- });
47-
48- _sys.puts(len > 0 ? (str + "\n" + len + ' error' + ((len === 1) ? '' : 's')) : "Lint Free!");
49- process.exit(len > 0 ? 1 : 0);
50-}
51-
52-module.exports = {
53- hint: function (targets, config, reporter) {
54- var files = [],
55- results = [];
56-
57- if (!reporter) reporter = _reporter;
58- _config = config || null;
59-
60- targets.forEach(function (target) {
61- _collect(target, files);
62- });
63-
64- files.forEach(function (file) {
65- _lint(file, results);
66- });
67-
68- reporter(results);
69- }
70-};
node_modules/jshint/lib/jslint_reporter.js+0−48
@@ -1,48 +0,0 @@
1-// Author: Vasili Sviridov
2-// http://github.com/vsviridov
3-module.exports =
4-{
5- reporter: function (results)
6- {
7- "use strict";
8- console.log("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
9- console.log("<jslint>");
10-
11- var files = {},
12- pairs = {
13- "&": "&amp;",
14- '"': "&quot;",
15- "'": "&apos;",
16- "<": "&lt;",
17- ">": "&gt;"
18- },
19- file, i, issue;
20-
21- function encode(s) {
22- for (var r in pairs) {
23- if (typeof(s) !== "undefined") {
24- s = s.replace(new RegExp(r, "g"), pairs[r]);
25- }
26- }
27- return s || "";
28- }
29-
30- results.forEach(function (result) {
31- result.file = result.file.replace(/^\.\//, '');
32- if (!files[result.file]) {
33- files[result.file] = [];
34- }
35- files[result.file].push(result.error);
36- });
37-
38- for (file in files) {
39- console.log("\t<file name=\"%s\">", file);
40- for (i = 0; i < files[file].length; i++) {
41- issue = files[file][i];
42- console.log("\t\t<issue line=\"%d\" char=\"%d\" reason=\"%s\" evidence=\"%s\" />", issue.line, issue.character, encode(issue.reason), encode(issue.evidence));
43- }
44- console.log("\t</file>");
45- }
46- console.log("</jslint>");
47- }
48-};
node_modules/jshint/package.json+0−27
@@ -1,27 +0,0 @@
1-{
2- "name": "jshint",
3- "version": "0.2.2",
4- "description": "a cli for jshint",
5- "homepage": "http://github.com/jshint/node-jshint",
6- "author": {
7- "name": "Brent Lintner",
8- "email": "brent.lintner@gmail.com",
9- "url": "http://github.com/brentlintner"
10- },
11- "licenses": [{
12- "type": "MIT",
13- "url": "http://www.opensource.org/licenses/mit-license.php"
14- }],
15- "bin": { "jshint": "./bin/hint" },
16- "main": "packages/jshint/jshint",
17- "files": [
18- "packages/jshint/README.markdown",
19- "packages/jshint/jshint.js",
20- "README.md",
21- "LICENSE",
22- "HELP"
23- ],
24- "dependencies": {
25- "argsparser": ">=0.0.3"
26- }
27-}
node_modules/jshint/packages/jshint/CHANGELOG+0−63
@@ -1,63 +0,0 @@
1-April 16, 2011
2- * New edition: 2011-04-16
3-
4- * Unit tests for all options and some core functions
5- * A number of small typo and message fixes
6- * JSHint is now a JavaScript/JSON parser only
7- (ADSafe, HTML, CSS related code was removed)
8- * JSHint now supports function-scoped options
9- * JSHint now supports both /*jshint and /*jslint
10-
11- * JSHint now supports shebangs (#!)
12- * Added support for typed array globals
13- * Allowed the use of variables/functions before definition.
14- (option 'latedef' to disallow)
15- * Fixed a bug with 'forin' option
16- * Fixed Rhino wrapper's CLI options support
17- * Fixed a bug with JSHint leaking internal variables
18- * Added option 'expr' to allow ExpressionStatement as valid Program
19- * Added an option 'prototypejs' to pre-define Prototype globals
20- * Added XPathResult et al. to the 'browser' option
21- * Added support for 'undefined' as a function parameter
22- * Option 'boss' has now precedence over 'eqeqeq' when it comes to '== null'
23- * Fixed a bug with JSHint parsing getters/setters as function statements
24- * Added an option 'mootools' to pre-define MooTools globals
25- * Added an option 'globalstrict' to allow the use of global strict mode
26- * Added HTMLElement to the browser environment
27- * Added support for the void operator
28- * Fixed a bug with 'new Array'
29- * Added option 'white' to check for trailing whitespaces
30-
31-March 01, 2011
32- * New edition: 2011-03-02
33-
34- * When library is used from Rhino, you can provide options via command line arguments
35-
36- * Added new HTML5 globals to the 'browser' option
37- * Tolerate == null when boss:true
38- * Tolerate undefined variables in the typeof and delete
39- * Tolerate undefined as a formal parameter
40- * Recognize new Array(<expr>) as a valid expression
41- * Added support for explicit case statement fallthroughs (using special comments)
42- * Added third formal parameter to JSHINT for specifying pre-defined globals
43-
44- * New option 'asi' to tolerate the use of automatic semicolon insertion
45- * New option 'jquery' to assume jQuery environment
46- * New option 'couch' to assume CouchDB environment
47-
48-February 19, 2011
49- * New edition: 2011-02-19
50-
51- * Library can act as a Node.js module and a Rhino program
52-
53- * Tolerate single statements in if/for/while constructions ('curly' to disallow)
54- * Tolerate arguments.callee and arguments.caller ('noarg' to disallow)
55- * Tolerate empty blocks ('noempty' to disallow)
56- * Tolerate the use of `new` for side-effects ('nonew' to disallow)
57- * Less strict styling check by default ('white' to revert)
58-
59- * New option 'boss' to tolerate assignments inside if/for/while
60- * New option 'node' to assume Node environment
61-
62-January 19, 2011
63- * Forked JSLint from the edition 2010-12-16
node_modules/jshint/packages/jshint/README.markdown+0−62
@@ -1,62 +0,0 @@
1-JSHint, The (Gentler) JavaScript Code Quality Tool
2-==================================================
3-
4-JSHint is a fork of Douglas Crockford's [JSLint](http://jslint.com/) that does
5-not tyrannize your code. It is designed to detect errors that actually break your
6-code while skipping things that, according to Crockford, “are known to
7-contribute mistakes in projects”. In other words, JSHint is a fork of JSLint
8-for the real world.
9-
10-For example, JSLint does not tolerate the following constructions:
11-
12- if (cond) statement();
13-
14-It expects all blocks to be enclosed in braces ({}):
15-
16- if (cond) {
17- statement();
18- }
19-
20-JSHint removes that requirement (but it is still available as an option).
21-
22-
23-Community
24----------
25-
26-The most important part is that JSHint is developed and supported by
27-the JavaScript developers community and not by one very opinionated person.
28-
29-If you use JSLint and think that it is too strict, use
30-[Issues](https://github.com/jshint/jshint/issues) to describe most annoying
31-JSLint gripes you encounter.
32-
33-
34-Development
35------------
36-
37-JSHint was forked from the JSLint, edition 2010-12-16.
38-The current stable edition is [2011-02-19](http://jshint.com/jshint.js).
39-
40-
41-Environments
42-------------
43-
44-JSHint can be used as a Node module out of the box:
45-
46- var JSHINT = require("jshint.js").JSHINT;
47-
48-If you use Rhino, we have a special wrapper script for that:
49-
50- java -jar /path/to/js.jar env/rhino.js myscript.js
51-
52-Tests
53------
54-
55-To run tests you will need to install [node.js](http://nodejs.org/) and
56-expresso. You can install the latter with npm:
57-
58- npm install expresso
59-
60-After that, running tests is as easy as:
61-
62- expresso tests/*.js
node_modules/jshint/packages/jshint/env/rhino.js+0−49
@@ -1,49 +0,0 @@
1-/*jshint boss: true */
2-
3-load("jshint.js");
4-
5-(function (args) {
6- var name = args[0],
7- optstr = args[1], // arg1=val1,arg2=val2,...
8- opts = { rhino: true },
9- input;
10-
11- if (!name) {
12- print('Usage: jshint.js file.js');
13- quit(1);
14- }
15-
16- if (optstr) {
17- optstr.split(',').forEach(function (arg) {
18- var o = arg.split('=');
19- opts[o[0]] = (function (ov) {
20- switch (ov) {
21- case 'true':
22- return true;
23- case 'false':
24- return false;
25- default:
26- return ov;
27- }
28- })(o[1]);
29- });
30- }
31-
32- input = readFile(name);
33-
34- if (!input) {
35- print('jshint: Couldn\'t open file ' + name);
36- quit(1);
37- }
38-
39- if (!JSHINT(input, opts)) {
40- for (var i = 0, err; err = JSHINT.errors[i]; i++) {
41- print(err.reason + ' (line: ' + err.line + ', character: ' + err.character + ')');
42- print('> ' + (err.evidence || '').replace(/^\s*(\S*(\s+\S+)*)\s*$/, "$1"));
43- print('');
44- }
45- quit(1);
46- }
47-
48- quit(0);
49-}(arguments));
node_modules/jshint/packages/jshint/jshint.js+0−3854
@@ -1,3854 +0,0 @@
1-/*
2- * JSHint, by JSHint Community.
3- *
4- * Licensed under the same slightly modified MIT license that JSLint is.
5- * It stops evil-doers everywhere.
6- *
7- * JSHint is a derivative work of JSLint:
8- *
9- * Copyright (c) 2002 Douglas Crockford (www.JSLint.com)
10- *
11- * Permission is hereby granted, free of charge, to any person obtaining
12- * a copy of this software and associated documentation files (the "Software"),
13- * to deal in the Software without restriction, including without limitation
14- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15- * and/or sell copies of the Software, and to permit persons to whom
16- * the Software is furnished to do so, subject to the following conditions:
17- *
18- * The above copyright notice and this permission notice shall be included
19- * in all copies or substantial portions of the Software.
20- *
21- * The Software shall be used for Good, not Evil.
22- *
23- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29- * DEALINGS IN THE SOFTWARE.
30- *
31- * JSHint was forked from 2010-12-16 edition of JSLint.
32- *
33- */
34-
35-/*
36- JSHINT is a global function. It takes two parameters.
37-
38- var myResult = JSHINT(source, option);
39-
40- The first parameter is either a string or an array of strings. If it is a
41- string, it will be split on '\n' or '\r'. If it is an array of strings, it
42- is assumed that each string represents one line. The source can be a
43- JavaScript text or a JSON text.
44-
45- The second parameter is an optional object of options which control the
46- operation of JSHINT. Most of the options are booleans: They are all
47- optional and have a default value of false. One of the options, predef,
48- can be an array of names, which will be used to declare global variables,
49- or an object whose keys are used as global names, with a boolean value
50- that determines if they are assignable.
51-
52- If it checks out, JSHINT returns true. Otherwise, it returns false.
53-
54- If false, you can inspect JSHINT.errors to find out the problems.
55- JSHINT.errors is an array of objects containing these members:
56-
57- {
58- line : The line (relative to 0) at which the lint was found
59- character : The character (relative to 0) at which the lint was found
60- reason : The problem
61- evidence : The text line in which the problem occurred
62- raw : The raw message before the details were inserted
63- a : The first detail
64- b : The second detail
65- c : The third detail
66- d : The fourth detail
67- }
68-
69- If a fatal error was found, a null will be the last element of the
70- JSHINT.errors array.
71-
72- You can request a Function Report, which shows all of the functions
73- and the parameters and vars that they use. This can be used to find
74- implied global variables and other problems. The report is in HTML and
75- can be inserted in an HTML <body>.
76-
77- var myReport = JSHINT.report(limited);
78-
79- If limited is true, then the report will be limited to only errors.
80-
81- You can request a data structure which contains JSHint's results.
82-
83- var myData = JSHINT.data();
84-
85- It returns a structure with this form:
86-
87- {
88- errors: [
89- {
90- line: NUMBER,
91- character: NUMBER,
92- reason: STRING,
93- evidence: STRING
94- }
95- ],
96- functions: [
97- name: STRING,
98- line: NUMBER,
99- last: NUMBER,
100- param: [
101- STRING
102- ],
103- closure: [
104- STRING
105- ],
106- var: [
107- STRING
108- ],
109- exception: [
110- STRING
111- ],
112- outer: [
113- STRING
114- ],
115- unused: [
116- STRING
117- ],
118- global: [
119- STRING
120- ],
121- label: [
122- STRING
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/core.js+0−143
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/envs.js+0−342
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/boss.js+0−12
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/curly.js+0−8
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/curly2.js+0−11
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/eqeqeq.js+0−10
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/es5.funcexpr.js+0−15
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/es5.js+0−18
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/forin.js+0−9
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/functionScopedOptions.js+0−8
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/immed.js+0−11
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/jslintOptions.js+0−9
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/latedef.js+0−11
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/laxbreak.js+0−19
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/loopfunc.js+0−11
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/newcap.js+0−5
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/noarg.js+0−7
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/onevar.js+0−11
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/redef.js+0−11
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/supernew.js+0−11
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/switchFallThrough.js+0−40
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/undef.js+0−10
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/fixtures/white.js+0−9
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/packages/jshint/tests/options.js+0−627
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/test/cli.js+0−108
Cut short: this commit's diff is over 1000 lines.
node_modules/jshint/test/hint.js+0−135
Cut short: this commit's diff is over 1000 lines.
server.js+2−1
Cut short: this commit's diff is over 1000 lines.
static/about.html+1−1
Cut short: this commit's diff is over 1000 lines.
static/index.html+2−2
Cut short: this commit's diff is over 1000 lines.