mirror of
https://github.com/vale981/metalsmith-layouts
synced 2025-03-04 09:11:38 -05:00
Add dotfiles
This commit is contained in:
parent
4ef99e34a9
commit
f436db5cf0
8 changed files with 63 additions and 6 deletions
19
.editorconfig
Normal file
19
.editorconfig
Normal file
|
@ -0,0 +1,19 @@
|
|||
# For more information about the properties used in
|
||||
# this file, please see the EditorConfig documentation:
|
||||
# http://editorconfig.org/
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[Makefile]
|
||||
indent_style = tab
|
16
.eslintrc
Normal file
16
.eslintrc
Normal file
|
@ -0,0 +1,16 @@
|
|||
env:
|
||||
node: true
|
||||
rules:
|
||||
indent: [2, 2]
|
||||
linebreak-style: 2
|
||||
no-irregular-whitespace: 2
|
||||
no-trailing-spaces: 2
|
||||
quotes: [2, "single", "avoid-escape"]
|
||||
|
||||
# Relax rules to allow current code-style
|
||||
curly: [2, "multi"]
|
||||
new-cap: 0
|
||||
no-shadow: 0
|
||||
no-unused-vars: 0
|
||||
no-use-before-define: 0
|
||||
strict: 0
|
17
.gitattributes
vendored
Normal file
17
.gitattributes
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Automatically normalize line endings for all text-based files
|
||||
# http://git-scm.com/docs/gitattributes#_end_of_line_conversion
|
||||
* text=auto
|
||||
|
||||
# For the following file types, normalize line endings to LF on
|
||||
# checkin and prevent conversion to CRLF when they are checked out
|
||||
# (this is required in order to prevent newline related issues like,
|
||||
# for example, after the build script is run)
|
||||
.* text eol=lf
|
||||
*.css text eol=lf
|
||||
*.html text eol=lf
|
||||
*.js text eol=lf
|
||||
*.json text eol=lf
|
||||
*.md text eol=lf
|
||||
*.sh text eol=lf
|
||||
*.txt text eol=lf
|
||||
*.xml text eol=lf
|
7
Makefile
7
Makefile
|
@ -1,8 +1,11 @@
|
|||
eslint=node_modules/.bin/eslint lib/index.js test/index.js
|
||||
mocha=node_modules/.bin/mocha --reporter spec --harmony-generators
|
||||
|
||||
node_modules: package.json
|
||||
@npm install
|
||||
|
||||
test: node_modules
|
||||
@./node_modules/.bin/mocha --reporter spec --harmony-generators
|
||||
@$(mocha)
|
||||
@$(eslint)
|
||||
|
||||
.PHONY: test
|
||||
.PHONY: test
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
var consolidate = require('consolidate');
|
||||
var debug = require('debug')('metalsmith-layouts');
|
||||
var each = require('async').each;
|
||||
|
@ -31,7 +30,7 @@ var settings = ['engine', 'directory', 'pattern', 'default'];
|
|||
|
||||
function plugin(opts){
|
||||
opts = opts || {};
|
||||
if ('string' == typeof opts) opts = { engine: opts };
|
||||
if (typeof opts === 'string') opts = { engine: opts };
|
||||
if (!opts.engine) throw new Error('"engine" option required');
|
||||
|
||||
var engine = opts.engine;
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"assert-dir-equal": "^1.0.1",
|
||||
"eslint": "^0.24.1",
|
||||
"metalsmith": "^2.0.1",
|
||||
"mocha": "^2.2.5",
|
||||
"swig": "^1.4.2"
|
||||
|
|
3
test/.eslintrc
Normal file
3
test/.eslintrc
Normal file
|
@ -0,0 +1,3 @@
|
|||
extends: ../.eslintrc
|
||||
env:
|
||||
mocha: true
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
var assert = require('assert');
|
||||
var equal = require('assert-dir-equal');
|
||||
var Metalsmith = require('metalsmith');
|
||||
|
@ -75,4 +74,4 @@ describe('metalsmith-layouts', function(){
|
|||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue