mirror of
https://github.com/vale981/metalsmith-layouts
synced 2025-03-05 09:31:39 -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
|
5
Makefile
5
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
|
node_modules: package.json
|
||||||
@npm install
|
@npm install
|
||||||
|
|
||||||
test: node_modules
|
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 consolidate = require('consolidate');
|
||||||
var debug = require('debug')('metalsmith-layouts');
|
var debug = require('debug')('metalsmith-layouts');
|
||||||
var each = require('async').each;
|
var each = require('async').each;
|
||||||
|
@ -31,7 +30,7 @@ var settings = ['engine', 'directory', 'pattern', 'default'];
|
||||||
|
|
||||||
function plugin(opts){
|
function plugin(opts){
|
||||||
opts = 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');
|
if (!opts.engine) throw new Error('"engine" option required');
|
||||||
|
|
||||||
var engine = opts.engine;
|
var engine = opts.engine;
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"assert-dir-equal": "^1.0.1",
|
"assert-dir-equal": "^1.0.1",
|
||||||
|
"eslint": "^0.24.1",
|
||||||
"metalsmith": "^2.0.1",
|
"metalsmith": "^2.0.1",
|
||||||
"mocha": "^2.2.5",
|
"mocha": "^2.2.5",
|
||||||
"swig": "^1.4.2"
|
"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 assert = require('assert');
|
||||||
var equal = require('assert-dir-equal');
|
var equal = require('assert-dir-equal');
|
||||||
var Metalsmith = require('metalsmith');
|
var Metalsmith = require('metalsmith');
|
||||||
|
|
Loading…
Add table
Reference in a new issue