From 0438f119ed49b6387941ffbc65a3a380c380b81a Mon Sep 17 00:00:00 2001 From: David Chambers Date: Sat, 16 Jun 2018 16:43:55 +0200 Subject: [PATCH] integrate sanctuary-scripts --- .config | 2 ++ .eslintrc.json | 4 ++++ .gitignore | 3 ++- CONTRIBUTING.md | 4 ++++ index.js | 6 ++---- package.json | 20 ++++++++++---------- test/index.js | 10 ++++++++++ test/mocha.opts | 1 + 8 files changed, 35 insertions(+), 15 deletions(-) create mode 100644 .config create mode 100644 .eslintrc.json create mode 100644 CONTRIBUTING.md create mode 100644 test/index.js create mode 100644 test/mocha.opts diff --git a/.config b/.config new file mode 100644 index 0000000..1f35983 --- /dev/null +++ b/.config @@ -0,0 +1,2 @@ +repo-owner = fantasyland +repo-name = fantasy-land diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..d3c776b --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,4 @@ +{ + "root": true, + "extends": ["./node_modules/sanctuary-style/eslint-es3.json"] +} diff --git a/.gitignore b/.gitignore index b512c09..cba87a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -node_modules \ No newline at end of file +/coverage/ +/node_modules/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..4e6450b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,4 @@ +# Contributing + +Additions and modifications to the specification are best proposed in issues. +If there is support for a proposal, the next step is to submit a pull request. diff --git a/index.js b/index.js index f26368e..f414193 100644 --- a/index.js +++ b/index.js @@ -2,9 +2,6 @@ 'use strict'; - /* eslint comma-dangle: ["off"], no-var: ["off"], strict: ["error", "function"] */ - /* global self */ - var mapping = { equals: 'fantasy-land/equals', lte: 'fantasy-land/lte', @@ -30,10 +27,11 @@ promap: 'fantasy-land/promap' }; + /* istanbul ignore else */ if (typeof module === 'object' && typeof module.exports === 'object') { module.exports = mapping; } else { self.FantasyLand = mapping; } -}()); +} ()); diff --git a/package.json b/package.json index 5922e82..35995a9 100644 --- a/package.json +++ b/package.json @@ -20,23 +20,23 @@ }, "dependencies": {}, "devDependencies": { - "eslint": "3.8.x", - "sanctuary-style": "0.2.x", - "xyz": "2.0.x" + "sanctuary-scripts": "2.x.x" }, "repository": { "type": "git", - "url": "https://github.com/fantasyland/fantasy-land.git" + "url": "git://github.com/fantasyland/fantasy-land.git" }, "files": [ - "index.js" + "/LICENSE", + "/README.md", + "/index.js", + "/package.json" ], "main": "index.js", "scripts": { - "lint": "eslint --config node_modules/sanctuary-style/eslint-es6.json --env es6 --env node --rule 'max-len: [off]' -- *.js", - "test": "npm run lint", - "release-major": "xyz --repo git@github.com:fantasyland/fantasy-land.git --increment major", - "release-minor": "xyz --repo git@github.com:fantasyland/fantasy-land.git --increment minor", - "release-patch": "xyz --repo git@github.com:fantasyland/fantasy-land.git --increment patch" + "doctest": "sanctuary-doctest", + "lint": "sanctuary-lint", + "release": "sanctuary-release", + "test": "npm run lint && sanctuary-test && npm run doctest" } } diff --git a/test/index.js b/test/index.js new file mode 100644 index 0000000..6494c12 --- /dev/null +++ b/test/index.js @@ -0,0 +1,10 @@ +'use strict'; + +const assert = require ('assert'); + +const FL = require ('..'); + + +test ('exports', () => { + assert.strictEqual (FL.map, 'fantasy-land/map'); +}); diff --git a/test/mocha.opts b/test/mocha.opts new file mode 100644 index 0000000..5efaf24 --- /dev/null +++ b/test/mocha.opts @@ -0,0 +1 @@ +--ui tdd