diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..5c2af09 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +charset = utf-8 + +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..46dbba4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,57 @@ +#### joe made this: https://goel.io/joe + +#####=== Node ===##### + +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- +node_modules + +# Debug log from npm +npm-debug.log + +#####=== OSX ===##### +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear on external disk +.Spotlight-V100 +.Trashes + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..1960c76 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,29 @@ +{ + "node": true, + "esnext": true, + "bitwise": true, + "curly": true, + "eqeqeq": true, + "eqnull": true, + "immed": true, + "latedef": "nofunc", + "newcap": false, + "noarg": true, + "undef": true, + "strict": false, + "trailing": true, + "smarttabs": true, + "indent": 2, + "white": false, + "quotmark": "single", + "laxbreak": true, + "globals" : { + "describe" : false, + "expect" : false, + "it" : false, + "before" : false, + "beforeEach" : false, + "after" : false, + "afterEach" : false + } +} diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..453adf9 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +before_install: + - "export DISPLAY=:99.0" + - "sh -e /etc/init.d/xvfb start" +node_js: + - '0.10' diff --git a/CONTRIBUTING.markdown b/CONTRIBUTING.markdown new file mode 100644 index 0000000..c78e694 --- /dev/null +++ b/CONTRIBUTING.markdown @@ -0,0 +1,15 @@ +# Contributing + +- Always add tests +- Update documentation if needed +- run `gulp test` before submitting + +## Bug fixes + +Always add a test for the bug in a separate commit so we can easily cherry pick +it for verification. + +## New features + +It's recommended to open an issue before sending a pull request to avoid +unnecessary work. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d94c28b --- /dev/null +++ b/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2015 hemanth.hm +Copyright (c) 2015 stoeffel + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/README.markdown b/README.markdown new file mode 100644 index 0000000..78a8518 --- /dev/null +++ b/README.markdown @@ -0,0 +1,21 @@ +# fj-noop + +[![Build Status](https://travis-ci.org/fp-js/fj-noop.svg)](https://travis-ci.org/fp-js/fj-noop) [![npm version](https://badge.fury.io/js/fj-noop.svg)](http://badge.fury.io/js/fj-noop) +> noop + +## Installation + +`npm install fj-noop --save` + +## Usage + +```js +const noop = require('fj-noop'); + +window.console = { + log: noop, + error: noop, + warn: noop, + table: noop +}; +``` diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..e390d1e --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,31 @@ +var gulp = require('gulp'), + watch = require('gulp-watch'), + run = require('gulp-run'), + sourcemaps = require('gulp-sourcemaps'), + rename = require('gulp-rename'), + mochify = require('mochify'), + to5 = require('gulp-babel'); + +gulp.task('babel', function() { + return gulp.src('**/*.es6') + .pipe(sourcemaps.init()) + .pipe(to5({ + stage: 0, + loose: 'all' + })) + .pipe(sourcemaps.write()) + .pipe(rename({ + extname: '.js' + })) + .pipe(gulp.dest('./')); +}); + +gulp.task('test', ['babel'], function() { + mochify('./test.js', { + reporter: 'tap' + }).bundle(); +}); + +gulp.task('default', ['test'], function() { + gulp.watch('**/*.es6', ['test']); +}); diff --git a/index.es6 b/index.es6 new file mode 100644 index 0000000..2d1ec23 --- /dev/null +++ b/index.es6 @@ -0,0 +1 @@ +export default () => {}; diff --git a/index.js b/index.js new file mode 100644 index 0000000..dadfb98 --- /dev/null +++ b/index.js @@ -0,0 +1,5 @@ +"use strict"; + +exports.FUNC = FUNC; +function FUNC() {} +exports.__esModule = true; \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..f62cb0d --- /dev/null +++ b/package.json @@ -0,0 +1,36 @@ +{ + "name": "fj-noop", + "version": "0.0.0", + "description": "noop", + "main": "index.js", + "scripts": { + "test": "gulp test" + }, + "repository": { + "type": "git", + "url": "https://github.com/fp-js/fj-noop.git" + }, + "keywords": [ + "fp-js", + "fp", + "noop" + ], + "contributors": [ + "hemanth.hm (http://www.h3manth.com)", + "stoeffel (http://www.schtoeffel.ch)" + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/fp-js/fj-noop/issues" + }, + "homepage": "https://github.com/fp-js/fj-noop", + "devDependencies": { + "gulp": "^3.8.10", + "gulp-rename": "^1.2.0", + "gulp-babel": "^5.0.0", + "gulp-run": "^1.6.6", + "gulp-sourcemaps": "^1.3.0", + "gulp-watch": "^4.1.0", + "mochify": "^2.2.0" + } +} diff --git a/test.es6 b/test.es6 new file mode 100644 index 0000000..688ecf3 --- /dev/null +++ b/test.es6 @@ -0,0 +1,10 @@ +import { + ok +} +from 'assert'; +import noop from '../noop'; + +test('fj-noop', () => { + ok(typeof noop === 'function'); + ok(noop() === undefined); +}); diff --git a/test.js b/test.js new file mode 100644 index 0000000..5131ced --- /dev/null +++ b/test.js @@ -0,0 +1,13 @@ +"use strict"; + +var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; + +var assert = _interopRequire(require("assert")); + +var FUNC = require("./").FUNC; + + + +it("fj-noop", function () { + assert.equal(typeof document, "object"); +}); \ No newline at end of file