-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial work in progress - modularization
Add .DS_Store Extract util methods Fix createTester callback Fix notid exports Refactor settimediate and nexttick Fix dep path Create bundle using browserify Rename main file Rename main file Rename main file Use browserify standalone mode Modular interface for main methods 📦 Deleted unnecessary test Add script to generate modules package.json Delete noconflict module Improve how to generat browser bundle Update util modules references Add a way to generate module scaffold Fix version Remove unnecessary dependencies Require the dependency Add missing methods Add dependencies for each module Bumped 0.4.0 Add useful scripts Add .npmignore Updated Add npmignore files Refactor Fix little issues Fix library name Fix isarray module Update script Fix typo Fix template links Update deps Revert "Fix template links" This reverts commit 112a382. Bump 0.5.1 Fix mapseries reference Bump 0.5.2
- Loading branch information
Showing
453 changed files
with
6,747 additions
and
1,328 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 |
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 |
---|---|---|
|
@@ -4,3 +4,5 @@ perf/versions | |
nyc_output | ||
coverage | ||
*.log | ||
.DS_Store | ||
npm-debug.log |
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,4 @@ | ||
lib | ||
scripts | ||
support/dependencies.json | ||
support/module_template.md |
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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
'use strict'; | ||
|
||
var gulp = require('gulp'); | ||
var path = require('path'); | ||
var fs = require('fs-extra'); | ||
var pkg = require('./package.json'); | ||
var jsonFuture = require('json-future'); | ||
var template = require('lodash.template'); | ||
|
||
var moduleDeps = JSON.parse(template(fs.readFileSync('./support/dependencies.json').toString())({ | ||
version: pkg.version} | ||
)); | ||
|
||
var MODULES_PATH = './lib/'; | ||
|
||
function getFolders(dir) { | ||
return fs.readdirSync(dir) | ||
.filter(function(file) { | ||
return fs.statSync(path.join(dir, file)).isDirectory(); | ||
}); | ||
} | ||
|
||
function generatePackage(name) { | ||
function generateKeywords(name) { | ||
var keywords = [ | ||
'async', | ||
'async-modularized' | ||
]; | ||
|
||
keywords.push(name); | ||
return keywords; | ||
} | ||
|
||
function generateDefaultFields(name) { | ||
var ORIGINAL_FIELDS = [ | ||
'author', | ||
'version', | ||
'repository', | ||
'license' | ||
]; | ||
|
||
var structure = { | ||
name: 'async.' + name, | ||
description: 'async ' + name + 'method as module.', | ||
main: './index.js', | ||
repository: "async-js/async." + name | ||
}; | ||
|
||
ORIGINAL_FIELDS.forEach(function(field) { | ||
structure[field] = pkg[field]; | ||
}); | ||
|
||
if (Object.keys(moduleDeps[name]).length > 0) | ||
structure.dependencies = moduleDeps[name]; | ||
|
||
return structure; | ||
} | ||
|
||
var modulePackage = generateDefaultFields(name); | ||
modulePackage.keywords = generateKeywords(name); | ||
return modulePackage; | ||
} | ||
|
||
function generateReadme(name, dist) { | ||
var filepath = path.resolve('support/module_template.md'); | ||
var tpl = fs.readFileSync(filepath).toString(); | ||
tpl = template(tpl)({name: name}); | ||
fs.writeFileSync(dist, tpl); | ||
} | ||
|
||
function copyMetaFiles(dist) { | ||
var files = ['.editorconfig', '.jscsrc', '.jshintrc', '.gitignore']; | ||
|
||
files.forEach(function(file) { | ||
var metafile = path.resolve(file); | ||
var distFile = path.resolve(dist, file); | ||
fs.copySync(metafile, distFile); | ||
}); | ||
} | ||
|
||
gulp.task('package', function() { | ||
return getFolders(MODULES_PATH).map(function(module) { | ||
var dist = path.resolve(MODULES_PATH, module); | ||
jsonFuture.save(path.resolve(dist, 'package.json'), generatePackage(module)); | ||
generateReadme(module, path.resolve(dist, 'README.md')); | ||
copyMetaFiles(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,10 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 |
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,8 @@ | ||
node_modules | ||
dist | ||
perf/versions | ||
nyc_output | ||
coverage | ||
*.log | ||
.DS_Store | ||
npm-debug.log |
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,3 @@ | ||
{ | ||
"validateIndentation": 4 | ||
} |
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,29 @@ | ||
{ | ||
// Enforcing options | ||
"eqeqeq": false, | ||
"forin": true, | ||
"indent": 4, | ||
"noarg": true, | ||
"undef": true, | ||
"unused": true, | ||
"trailing": true, | ||
"evil": true, | ||
"laxcomma": true, | ||
|
||
// Relaxing options | ||
"onevar": false, | ||
"asi": false, | ||
"eqnull": true, | ||
"expr": false, | ||
"loopfunc": true, | ||
"sub": true, | ||
"browser": true, | ||
"node": true, | ||
"globals": { | ||
"self": true, | ||
"define": true, | ||
"describe": true, | ||
"context": true, | ||
"it": true | ||
} | ||
} |
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,13 @@ | ||
# async.apply | ||
|
||
![Last version](https://img.shields.io/github/tag/async-js/async.apply.svg?style=flat-square) | ||
[![Dependency status](http://img.shields.io/david/async-js/async.apply.svg?style=flat-square)](https://david-dm.org/async-js/async.apply) | ||
[![Dev Dependencies Status](http://img.shields.io/david/dev/async-js/async.apply.svg?style=flat-square)](https://david-dm.org/async-js/async.apply#info=devDependencies) | ||
[![NPM Status](http://img.shields.io/npm/dm/async.apply.svg?style=flat-square)](https://www.npmjs.org/package/async.apply) | ||
[![Donate](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square)](https://paypal.me/kikobeats) | ||
|
||
> [async#apply](https://github.com/async-js/async#async.apply) method as module. | ||
## License | ||
|
||
MIT © [async-js](https://github.com/async-js) |
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,9 @@ | ||
'use strict'; | ||
|
||
var restParam = require('async.util.restparam'); | ||
|
||
module.exports = restParam(function(fn, args) { | ||
return restParam(function(callArgs) { | ||
return fn.apply(null, args.concat(callArgs)); | ||
}); | ||
}); |
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,20 @@ | ||
{ | ||
"name": "async.apply", | ||
"description": "async applymethod as module.", | ||
"main": "./index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/caolan/async.git" | ||
}, | ||
"author": "Caolan McMahon", | ||
"version": "0.5.2", | ||
"license": "MIT", | ||
"dependencies": { | ||
"async.util.restparam": "0.5.2" | ||
}, | ||
"keywords": [ | ||
"async", | ||
"async-modularized", | ||
"apply" | ||
] | ||
} |
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,10 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 |
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,8 @@ | ||
node_modules | ||
dist | ||
perf/versions | ||
nyc_output | ||
coverage | ||
*.log | ||
.DS_Store | ||
npm-debug.log |
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,3 @@ | ||
{ | ||
"validateIndentation": 4 | ||
} |
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,29 @@ | ||
{ | ||
// Enforcing options | ||
"eqeqeq": false, | ||
"forin": true, | ||
"indent": 4, | ||
"noarg": true, | ||
"undef": true, | ||
"unused": true, | ||
"trailing": true, | ||
"evil": true, | ||
"laxcomma": true, | ||
|
||
// Relaxing options | ||
"onevar": false, | ||
"asi": false, | ||
"eqnull": true, | ||
"expr": false, | ||
"loopfunc": true, | ||
"sub": true, | ||
"browser": true, | ||
"node": true, | ||
"globals": { | ||
"self": true, | ||
"define": true, | ||
"describe": true, | ||
"context": true, | ||
"it": true | ||
} | ||
} |
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,13 @@ | ||
# async.applyeach | ||
|
||
![Last version](https://img.shields.io/github/tag/async-js/async.applyeach.svg?style=flat-square) | ||
[![Dependency status](http://img.shields.io/david/async-js/async.applyeach.svg?style=flat-square)](https://david-dm.org/async-js/async.applyeach) | ||
[![Dev Dependencies Status](http://img.shields.io/david/dev/async-js/async.applyeach.svg?style=flat-square)](https://david-dm.org/async-js/async.applyeach#info=devDependencies) | ||
[![NPM Status](http://img.shields.io/npm/dm/async.applyeach.svg?style=flat-square)](https://www.npmjs.org/package/async.applyeach) | ||
[![Donate](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square)](https://paypal.me/kikobeats) | ||
|
||
> [async#applyeach](https://github.com/async-js/async#async.applyeach) method as module. | ||
## License | ||
|
||
MIT © [async-js](https://github.com/async-js) |
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,6 @@ | ||
'use strict'; | ||
|
||
var eachOf = require('async.eachof'); | ||
var applyEach = require('async.util.applyeach'); | ||
|
||
module.exports = applyEach(eachOf); |
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,21 @@ | ||
{ | ||
"name": "async.applyeach", | ||
"description": "async applyeachmethod as module.", | ||
"main": "./index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/caolan/async.git" | ||
}, | ||
"author": "Caolan McMahon", | ||
"version": "0.5.2", | ||
"license": "MIT", | ||
"dependencies": { | ||
"async.eachof": "0.5.2", | ||
"async.util.applyeach": "0.5.2" | ||
}, | ||
"keywords": [ | ||
"async", | ||
"async-modularized", | ||
"applyeach" | ||
] | ||
} |
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,10 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 |
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,8 @@ | ||
node_modules | ||
dist | ||
perf/versions | ||
nyc_output | ||
coverage | ||
*.log | ||
.DS_Store | ||
npm-debug.log |
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,3 @@ | ||
{ | ||
"validateIndentation": 4 | ||
} |
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,29 @@ | ||
{ | ||
// Enforcing options | ||
"eqeqeq": false, | ||
"forin": true, | ||
"indent": 4, | ||
"noarg": true, | ||
"undef": true, | ||
"unused": true, | ||
"trailing": true, | ||
"evil": true, | ||
"laxcomma": true, | ||
|
||
// Relaxing options | ||
"onevar": false, | ||
"asi": false, | ||
"eqnull": true, | ||
"expr": false, | ||
"loopfunc": true, | ||
"sub": true, | ||
"browser": true, | ||
"node": true, | ||
"globals": { | ||
"self": true, | ||
"define": true, | ||
"describe": true, | ||
"context": true, | ||
"it": true | ||
} | ||
} |
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,13 @@ | ||
# async.applyeachseries | ||
|
||
![Last version](https://img.shields.io/github/tag/async-js/async.applyeachseries.svg?style=flat-square) | ||
[![Dependency status](http://img.shields.io/david/async-js/async.applyeachseries.svg?style=flat-square)](https://david-dm.org/async-js/async.applyeachseries) | ||
[![Dev Dependencies Status](http://img.shields.io/david/dev/async-js/async.applyeachseries.svg?style=flat-square)](https://david-dm.org/async-js/async.applyeachseries#info=devDependencies) | ||
[![NPM Status](http://img.shields.io/npm/dm/async.applyeachseries.svg?style=flat-square)](https://www.npmjs.org/package/async.applyeachseries) | ||
[![Donate](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square)](https://paypal.me/kikobeats) | ||
|
||
> [async#applyeachseries](https://github.com/async-js/async#async.applyeachseries) method as module. | ||
## License | ||
|
||
MIT © [async-js](https://github.com/async-js) |
Oops, something went wrong.