forked from RandomEtc/ejs-locals
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from JacksonTian/ejs2
Ejs2
- Loading branch information
Showing
18 changed files
with
518 additions
and
732 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.debug.js | ||
*.min.js | ||
node_modules/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"rules": { | ||
"indent": [ | ||
2, | ||
2 | ||
], | ||
"quotes": [ | ||
2, | ||
"single", | ||
{"avoidEscape": true, "allowTemplateLiterals": true} | ||
], | ||
"linebreak-style": [ | ||
2, | ||
"unix" | ||
], | ||
"semi": [2, "always"], | ||
"strict": [2, "global"], | ||
"curly": 2, | ||
"eqeqeq": 2, | ||
"no-eval": 2, | ||
"guard-for-in": 2, | ||
"no-caller": 2, | ||
"no-else-return": 2, | ||
"no-eq-null": 2, | ||
"no-extend-native": 2, | ||
"no-extra-bind": 2, | ||
"no-floating-decimal": 2, | ||
"no-implied-eval": 2, | ||
"no-labels": 2, | ||
"no-with": 2, | ||
"no-loop-func": 1, | ||
"no-native-reassign": 2, | ||
"no-redeclare": [2, {"builtinGlobals": true}], | ||
"no-delete-var": 2, | ||
"no-shadow-restricted-names": 2, | ||
"no-undef-init": 2, | ||
"no-use-before-define": 2, | ||
"no-unused-vars": 2, | ||
"no-undef": 2, | ||
"global-require": 0, | ||
"no-console": 0, | ||
"generator-star-spacing": ["error", "after"] | ||
}, | ||
"env": { | ||
"es6": true, | ||
"node": true, | ||
"browser": true | ||
}, | ||
"globals": { | ||
"describe": true, | ||
"it": true, | ||
"before": true, | ||
"after": true | ||
}, | ||
"extends": "eslint:recommended" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
language: node_js | ||
node_js: | ||
- "0.12" | ||
- "0.11" | ||
- "0.10" | ||
- "8" | ||
- "6" | ||
|
||
script: make test-coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
'use strict'; | ||
|
||
class Block { | ||
constructor() { | ||
this.html = []; | ||
} | ||
|
||
toString() { | ||
return this.html.join('\n'); | ||
} | ||
|
||
append(more) { | ||
this.html.push(more); | ||
} | ||
|
||
prepend(more) { | ||
this.html.unshift(more); | ||
} | ||
|
||
replace(instead) { | ||
this.html = [ instead ]; | ||
} | ||
} | ||
|
||
module.exports = Block; |
Oops, something went wrong.