-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
140 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"root": true, | ||
"extends": [ | ||
"niksy" | ||
"niksy", | ||
"niksy/next", | ||
"niksy/browser" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
.DS_Store | ||
node_modules/ | ||
package-lock.json | ||
yarn.lock | ||
npm-debug.log | ||
test-dist/ | ||
index.cjs.js | ||
index.esm.js | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict'; | ||
|
||
|
||
module.exports = { | ||
input: 'index.js', | ||
output: [ | ||
{ | ||
file: 'index.cjs.js', | ||
format: 'cjs' | ||
}, | ||
{ | ||
file: 'index.esm.js', | ||
format: 'es' | ||
} | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
language: node_js | ||
node_js: | ||
- '4' | ||
before_install: | ||
- export CHROME_BIN=chromium-browser | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
- sleep 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,54 @@ | ||
// Karma configuration | ||
// Generated on Sun May 01 2016 16:50:20 GMT+0200 (CEST) | ||
|
||
module.exports = function(config) { | ||
config.set({ | ||
|
||
// base path that will be used to resolve all patterns (eg. files, exclude) | ||
basePath: '', | ||
|
||
|
||
// frameworks to use | ||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter | ||
frameworks: ['browserify', 'qunit'], | ||
|
||
|
||
// list of files / patterns to load in the browser | ||
files: [ | ||
'test/**/*.js' | ||
], | ||
|
||
|
||
// list of files to exclude | ||
exclude: [ | ||
], | ||
|
||
|
||
// preprocess matching files before serving them to the browser | ||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor | ||
preprocessors: { | ||
'test/**/*.js': 'browserify' | ||
}, | ||
|
||
|
||
// test results reporter to use | ||
// possible values: 'dots', 'progress' | ||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter | ||
reporters: ['mocha'], | ||
|
||
|
||
// web server port | ||
port: 9876, | ||
|
||
|
||
// enable / disable colors in the output (reporters and logs) | ||
colors: true, | ||
|
||
|
||
// level of logging | ||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG | ||
logLevel: config.LOG_INFO, | ||
|
||
|
||
// enable / disable watching file and executing tests whenever any file changes | ||
autoWatch: false, | ||
|
||
|
||
// start these browsers | ||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher | ||
browsers: ['Chrome', 'Firefox'], | ||
|
||
|
||
// Continuous Integration mode | ||
// if true, Karma captures browsers, runs the tests and exits | ||
singleRun: false, | ||
|
||
// Concurrency level | ||
// how many browser should be started simultaneous | ||
concurrency: Infinity | ||
}) | ||
} | ||
/* globals process:false */ | ||
/* eslint-disable no-process-env */ | ||
|
||
'use strict'; | ||
|
||
module.exports = function ( config ) { | ||
|
||
config.set({ | ||
basePath: '', | ||
frameworks: ['browserify', 'qunit'], | ||
files: [ | ||
'test/**/*.html', | ||
'test/**/*.js' | ||
], | ||
exclude: [], | ||
preprocessors: { | ||
'test/**/*.html': ['html2js'], | ||
'test/**/*.js': ['browserify'] | ||
}, | ||
reporters: ['mocha'], | ||
port: 9001, | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: false, | ||
client: { | ||
captureConsole: true, | ||
mocha: { | ||
ui: 'bdd' | ||
} | ||
}, | ||
browserConsoleLogOptions: { | ||
level: 'log', | ||
format: '%b %T: %m', | ||
terminal: true | ||
}, | ||
browserify: { | ||
debug: true, | ||
transform: [ | ||
['rollupify', { config: '.rollup.js', sourceMaps: true }], | ||
|
||
] | ||
}, | ||
customLaunchers: { | ||
'Chrome-CI': { | ||
base: 'Chrome', | ||
flags: ['--no-sandbox'] | ||
} | ||
}, | ||
browsers: [(process.env.TRAVIS ? 'Chrome-CI' : 'Chrome')], | ||
singleRun: true, | ||
concurrency: Infinity | ||
}); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,68 @@ | ||
{ | ||
"name": "throttle-debounce", | ||
"version": "1.1.0", | ||
"description": "Throttle/debounce your functions.", | ||
"main": "index.js", | ||
"typings": "index.d.ts", | ||
"author": "Ivan Nikolić <[email protected]> (http://ivannikolic.com/)", | ||
"description": "Throttle and debounce functions.", | ||
"main": "index.cjs.js", | ||
"module": "index.esm.js", | ||
"author": "Ivan Nikolić <[email protected]> (http://ivannikolic.com)", | ||
"contributors": [ | ||
"Ben Alman (http://benalman.com)" | ||
], | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"files": [ | ||
"index.cjs.js", | ||
"index.esm.js", | ||
"index.d.ts", | ||
"LICENSE.md", | ||
"README.md" | ||
], | ||
"sideEffects": false, | ||
"typings": "index.d.ts", | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"scripts": { | ||
"test": "eslint {index,test/*}.js && karma start --single-run --browsers PhantomJS" | ||
"build": "rollup --config .rollup.js", | ||
"lint": "eslint {index,throttle,debounce}.js", | ||
"prepublish": "npm run build", | ||
"test": "npm run lint && npm run test:automated", | ||
"test:automated": "karma start", | ||
"test:automated:local": "karma start --browsers Chrome", | ||
"test:automated:local:watch": "npm run test:automated:local -- --auto-watch --no-single-run" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"browserify": "^13.0.0", | ||
"eslint": "^1.10.3", | ||
"eslint-config-niksy": "^1.0.6", | ||
"karma": "^0.13.22", | ||
"karma-browserify": "^5.0.4", | ||
"karma-chrome-launcher": "^0.2.3", | ||
"eslint": "^4.19.1", | ||
"eslint-config-niksy": "^5.0.0", | ||
"eslint-plugin-extend": "^0.1.1", | ||
"eslint-plugin-mocha": "^4.9.0", | ||
"eslint-plugin-node": "^6.0.1", | ||
"eslint-plugin-promise": "^3.8.0", | ||
"eslint-plugin-react": "^7.9.1", | ||
"eslint-plugin-unicorn": "^4.0.3", | ||
"karma": "^1.1.0", | ||
"karma-browserify": "^5.0.5", | ||
"karma-chrome-launcher": "^1.0.1", | ||
"karma-firefox-launcher": "^0.1.7", | ||
"karma-mocha-reporter": "^2.0.2", | ||
"karma-html2js-preprocessor": "^1.0.0", | ||
"karma-mocha": "^1.3.0", | ||
"karma-mocha-reporter": "^2.2.5", | ||
"karma-phantomjs-launcher": "^1.0.0", | ||
"karma-qunit": "^0.1.9", | ||
"mocha": "^2.4.5", | ||
"mocha": "^4.1.0", | ||
"phantomjs-prebuilt": "^2.1.7", | ||
"qunitjs": "^1.23.1", | ||
"rollup": "^0.60.1", | ||
"rollupify": "^0.5.0", | ||
"watchify": "^3.7.0" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"keywords": [ | ||
"throttle", | ||
"debounce", | ||
"browserify" | ||
"throttle" | ||
], | ||
"repository": { | ||
"type": "git", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": [ | ||
"niksy", | ||
"niksy/next", | ||
"niksy/tests" | ||
] | ||
} |