[Pkg-javascript-commits] [node-ignore-by-default] 01/02: Import Upstream version 1.0.1

Shanavas M shanavas-guest at moszumanska.debian.org
Fri Nov 4 17:59:01 UTC 2016


This is an automated email from the git hooks/post-receive script.

shanavas-guest pushed a commit to branch master
in repository node-ignore-by-default.

commit ebf243ef8d28aad332c52217896a493e4b9e4063
Author: Shanavas M <shanavas at disroot.org>
Date:   Fri Nov 4 17:43:10 2016 +0000

    Import Upstream version 1.0.1
---
 .gitignore      |  2 ++
 .travis.yml     |  9 +++++++++
 CONTRIBUTING.md | 12 ++++++++++++
 LICENSE         | 14 ++++++++++++++
 README.md       | 26 ++++++++++++++++++++++++++
 index.js        | 12 ++++++++++++
 package.json    | 34 ++++++++++++++++++++++++++++++++++
 test.js         | 20 ++++++++++++++++++++
 8 files changed, 129 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9dddf79
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+.node-version
+node_modules
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..ff52beb
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,9 @@
+language: node_js
+node_js:
+  - "0.10"
+  - "0.12"
+  - "4"
+  - "5"
+script: npm test
+notifications:
+  email: false
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..e47e050
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,12 @@
+# Contributions welcome!
+
+Please open an issue or pull request if you have a directory you think
+development tools should be ignoring.
+
+`index.js` contains the list of directories, [sorted by Unicode code
+points](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort).
+Please add your suggested directory in the correct place with a comment
+explaining what it's used for and where to find out more.
+
+The code should follow [Standard Style](https://github.com/feross/standard). Run
+`npm test` to verify adherence.
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..ee1e367
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,14 @@
+ISC License (ISC)
+Copyright (c) 2016, Mark Wubben
+
+Permission to use, copy, modify, and/or distribute this software for any purpose
+with or without fee is hereby granted, provided that the above copyright notice
+and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..ee77191
--- /dev/null
+++ b/README.md
@@ -0,0 +1,26 @@
+# ignore-by-default
+
+This is a package aimed at Node.js development tools. It provides a list of
+directories that should probably be ignored by such tools, e.g. when watching
+for file changes.
+
+It's used by [AVA](https://www.npmjs.com/package/ava) and
+[nodemon](https://www.npmjs.com/package/nodemon).
+
+[Please contribute!](./CONTRIBUTING.md)
+
+## Installation
+
+```
+npm install --save ignore-by-default
+```
+
+## Usage
+
+The `ignore-by-default` module exports a `directories()` function, which will
+return an array of directory names. These are the ones you should ignore.
+
+```js
+// ['.git', '.sass_cache', …]
+var ignoredDirectories = require('ignore-by-default').directories()
+```
diff --git a/index.js b/index.js
new file mode 100644
index 0000000..c65857d
--- /dev/null
+++ b/index.js
@@ -0,0 +1,12 @@
+'use strict'
+
+exports.directories = function () {
+  return [
+    '.git', // Git repository files, see <https://git-scm.com/>
+    '.nyc_output', // Temporary directory where nyc stores coverage data, see <https://github.com/bcoe/nyc>
+    '.sass-cache', // Cache folder for node-sass, see <https://github.com/sass/node-sass>
+    'bower_components', // Where Bower packages are installed, see <http://bower.io/>
+    'coverage', // Standard output directory for code coverage reports, see <https://github.com/gotwarlost/istanbul>
+    'node_modules' // Where Node modules are installed, see <https://nodejs.org/>
+  ]
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..38e0d2b
--- /dev/null
+++ b/package.json
@@ -0,0 +1,34 @@
+{
+  "name": "ignore-by-default",
+  "version": "1.0.1",
+  "description": "A list of directories you should ignore by default",
+  "main": "index.js",
+  "files": [
+    "index.js"
+  ],
+  "scripts": {
+    "test": "standard && node test.js"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/novemberborn/ignore-by-default.git"
+  },
+  "keywords": [
+    "ignore",
+    "chokidar",
+    "watcher",
+    "exclude",
+    "glob",
+    "pattern"
+  ],
+  "author": "Mark Wubben (https://novemberborn.net/)",
+  "license": "ISC",
+  "bugs": {
+    "url": "https://github.com/novemberborn/ignore-by-default/issues"
+  },
+  "homepage": "https://github.com/novemberborn/ignore-by-default#readme",
+  "devDependencies": {
+    "figures": "^1.4.0",
+    "standard": "^6.0.4"
+  }
+}
diff --git a/test.js b/test.js
new file mode 100644
index 0000000..e21fe95
--- /dev/null
+++ b/test.js
@@ -0,0 +1,20 @@
+'use strict'
+
+var assert = require('assert')
+var figures = require('figures')
+
+var actual = require('./').directories()
+var expected = actual.slice().sort()
+
+var pass = false
+try {
+  assert.deepEqual(actual, expected)
+  pass = true
+} catch (err) {}
+
+console[pass ? 'log' : 'error'](figures[pass ? 'tick' : 'cross'] + ' directories are sorted correctly')
+if (!pass) {
+  console.error('  got: ' + JSON.stringify(actual, null, 2).split('\n').join('\n  '))
+  console.error('  expected: ' + JSON.stringify(expected, null, 2).split('\n').join('\n  '))
+  process.exit(1)
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-ignore-by-default.git



More information about the Pkg-javascript-commits mailing list