diff --git a/index.js b/index.js index dc8fcc8..02f3c39 100644 --- a/index.js +++ b/index.js @@ -13,9 +13,9 @@ // 5. Same goes for Bower as npm. module.exports = [ - ".git", // [1] - ".*", // [2] - "*.*~", // [3] - "node_modules", // [4] - "bower_components" // [5] + '.git', // [1] + '.*', // [2] + '*.*~', // [3] + 'node_modules', // [4] + 'bower_components' // [5] ] diff --git a/package.json b/package.json index a3e648b..811d510 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,17 @@ "surge", "surge.sh" ], + "standard": { + "global": ["describe", "it"] + }, "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "lint": "standard", + "test": "mocha test", + "posttest": "npm run lint" + }, + "devDependencies": { + "fstream-ignore": "^1.0.2", + "mocha": "^2.2.1", + "standard": "5.2.2" } } diff --git a/test/index.js b/test/index.js new file mode 100644 index 0000000..8a4dded --- /dev/null +++ b/test/index.js @@ -0,0 +1,14 @@ +var path = require('path') +var ignore = require('fstream-ignore') + +describe('surge-ignore', function () { + it('Should be cool.', function (done) { + done() + }) + it('Should ignore ~ files.', function () { + ignore({ + path: path.resolve('./fixtures'), + ignoreFiles: ['.surgeignore'] + }) + }) +})