Skip to content

Commit 9d391f6

Browse files
committed
update
1 parent 3e9aa7f commit 9d391f6

File tree

6 files changed

+176
-5
lines changed

6 files changed

+176
-5
lines changed

.jshintrc

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
// JSHint Default Configuration File (as on JSHint website)
3+
// See http://jshint.com/docs/ for more details
4+
5+
"maxerr" : 50, // {int} Maximum error before stopping
6+
7+
// Enforcing
8+
"bitwise" : false, // true: Prohibit bitwise operators (&, |, ^, etc.)
9+
"camelcase" : false, // true: Identifiers must be in camelCase
10+
"curly" : true, // true: Require {} for every new block or scope
11+
"eqeqeq" : true, // true: Require triple equals (===) for comparison
12+
"forin" : false, // true: Require filtering for..in loops with obj.hasOwnProperty()
13+
"immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`
14+
"indent" : 2, // {int} Number of spaces to use for indentation
15+
"latedef" : false, // true: Require variables/functions to be defined before being used
16+
"newcap" : false, // true: Require capitalization of all constructor functions e.g. `new F()`
17+
"noarg" : false, // true: Prohibit use of `arguments.caller` and `arguments.callee`
18+
"noempty" : true, // true: Prohibit use of empty blocks
19+
"nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment)
20+
"plusplus" : false, // true: Prohibit use of `++` & `--`
21+
"quotmark" : false, // Quotation mark consistency:
22+
// false : do nothing (default)
23+
// true : ensure whatever is used is consistent
24+
// "single" : require single quotes
25+
// "double" : require double quotes
26+
"undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
27+
"unused" : true, // true: Require all defined variables be used
28+
"strict" : true, // true: Requires all functions run in ES5 Strict Mode
29+
"trailing" : false, // true: Prohibit trailing whitespaces
30+
"maxparams" : 6, // {int} Max number of formal params allowed per function
31+
"maxdepth" : 5, // {int} Max depth of nested blocks (within functions)
32+
"maxstatements" : false, // {int} Max number statements per function
33+
"maxcomplexity" : false, // {int} Max cyclomatic complexity per function
34+
"maxlen" : 120, // {int} Max number of characters per line
35+
36+
// Relaxing
37+
"asi" : true, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
38+
"boss" : false, // true: Tolerate assignments where comparisons would be expected
39+
"debug" : false, // true: Allow debugger statements e.g. browser breakpoints.
40+
"eqnull" : false, // true: Tolerate use of `== null`
41+
"es5" : false, // true: Allow ES5 syntax (ex: getters and setters)
42+
"esnext" : true, // true: Allow ES.next (ES6) syntax (ex: `const`)
43+
"moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features)
44+
// (ex: `for each`, multiple try/catch, function expression…)
45+
"evil" : false, // true: Tolerate use of `eval` and `new Function()`
46+
"expr" : false, // true: Tolerate `ExpressionStatement` as Programs
47+
"funcscope" : false, // true: Tolerate defining variables inside control statements"
48+
"globalstrict" : false, // true: Allow global "use strict" (also enables 'strict')
49+
"iterator" : false, // true: Tolerate using the `__iterator__` property
50+
"lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block
51+
"laxbreak" : false, // true: Tolerate possibly unsafe line breakings
52+
"laxcomma" : false, // true: Tolerate comma-first style coding
53+
"loopfunc" : false, // true: Tolerate functions being defined in loops
54+
"multistr" : false, // true: Tolerate multi-line strings
55+
"proto" : false, // true: Tolerate using the `__proto__` property
56+
"scripturl" : false, // true: Tolerate script-targeted URLs
57+
"smarttabs" : false, // true: Tolerate mixed tabs/spaces when used for alignment
58+
"shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
59+
"sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
60+
"supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;`
61+
"validthis" : false, // true: Tolerate using this in a non-constructor function
62+
63+
// Environments
64+
"browser" : false, // Web Browser (window, document, etc)
65+
"couch" : false, // CouchDB
66+
"devel" : false, // Development/debugging (alert, confirm, etc)
67+
"dojo" : false, // Dojo Toolkit
68+
"jquery" : false, // jQuery
69+
"mootools" : false, // MooTools
70+
"node" : true, // Node.js
71+
"nonstandard" : false, // Widely adopted globals (escape, unescape, etc)
72+
"prototypejs" : false, // Prototype and Scriptaculous
73+
"rhino" : false, // Rhino
74+
"worker" : false, // Web Workers
75+
"wsh" : false, // Windows Scripting Host
76+
"yui" : false, // Yahoo User Interface
77+
78+
// Legacy
79+
"nomen" : false, // true: Prohibit dangling `_` in variables
80+
"onevar" : false, // true: Allow only one `var` statement per function
81+
"passfail" : false, // true: Stop on first error
82+
"white" : false, // true: Check against strict whitespace and indentation rules
83+
84+
// Custom Globals
85+
"globals" : {
86+
87+
}
88+
}

.npmignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
.gitignore
3+
.travis.yml
4+
web/
5+
other/
6+
doc/

.travis.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
language: node_js
2+
node_js:
3+
- '0.10'
4+
script:
5+
- "make test-travis"
6+
after_script: "npm install coveralls && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"

Makefile

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
TESTS = test/
2+
REPORTER = spec
3+
TIMEOUT = 10000
4+
MOCHA_OPTS = --recursive
5+
ISTANBUL = ./node_modules/.bin/istanbul
6+
MOCHA = ./node_modules/mocha/bin/_mocha
7+
8+
install:
9+
@npm install
10+
11+
test: install
12+
@NODE_ENV=test ./node_modules/mocha/bin/mocha \
13+
--reporter $(REPORTER) \
14+
--timeout $(TIMEOUT) \
15+
$(MOCHA_OPTS) \
16+
$(TESTS)
17+
@NODE_ENV=test ./node_modules/jshint/bin/jshint lib/
18+
19+
test-cov:
20+
@$(ISTANBUL) cover --report html $(MOCHA) -- -t $(TIMEOUT) --recursive -R spec $(TESTS)
21+
22+
test-travis:
23+
@NODE_ENV=test ./node_modules/jshint/bin/jshint lib/
24+
@$(ISTANBUL) cover --report lcov $(MOCHA) -- -t $(TIMEOUT) --recursive -R spec $(TESTS)
25+
26+
test-all: test test-cov
27+
28+
.PHONY: test-cov test test-all

lib/index.js

-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ var tokenList = require('./util/token.js');
44
var think = require('thinkjs-util');
55

66
module.exports = {
7-
/**
8-
* [version description]
9-
* @type {String}
10-
*/
11-
version: '3.0',
127
/**
138
* [getInstance description]
149
* @return {[type]} [description]

package.json

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "flkit",
3+
"description": "a front-language(html,css,js) toolkit that supoort tempate syntax(smarty,php)",
4+
"version": "3.0",
5+
"author": {
6+
"name": "welefen",
7+
"email": "[email protected]"
8+
},
9+
"scripts": {
10+
"test": "make test"
11+
},
12+
"contributors": [
13+
{
14+
"name": "welefen",
15+
"email": "[email protected]"
16+
}
17+
],
18+
"dependencies": {
19+
"thinkjs-util": ">=1.0.0"
20+
},
21+
"devDependencies": {
22+
"should": "4.0.4",
23+
"jshint": "2.5.1",
24+
"mocha": "1.20.1",
25+
"muk": "0.3.1",
26+
"istanbul": "*"
27+
},
28+
"keywords": [
29+
"fl",
30+
"flkit",
31+
"html-compress",
32+
"html-lexer",
33+
"html-beautify",
34+
"html-filter",
35+
"html-ast"
36+
],
37+
"repository": {
38+
"type": "git",
39+
"url": "https://github.com/flkit/flkit"
40+
},
41+
"engines": {
42+
"node": ">=0.10.0"
43+
},
44+
"readmeFilename": "README.md",
45+
"bugs": {
46+
"url": "https://github.com/flkit/flkit/issues"
47+
}
48+
}

0 commit comments

Comments
 (0)