feat(async-map): remove build step
This commit is contained in:
parent
be2257153c
commit
57612eeced
@ -1 +0,0 @@
|
|||||||
module.exports = require('../../@xen-orchestra/babel-config')(require('./package.json'))
|
|
@ -9,11 +9,11 @@
|
|||||||
// (V1, K) => MaybePromise<V2>
|
// (V1, K) => MaybePromise<V2>
|
||||||
// ): Promise<V2[]>
|
// ): Promise<V2[]>
|
||||||
|
|
||||||
import map from 'lodash/map'
|
const map = require('lodash/map')
|
||||||
|
|
||||||
// Similar to map() + Promise.all() but wait for all promises to
|
// Similar to map() + Promise.all() but wait for all promises to
|
||||||
// settle before rejecting (with the first error)
|
// settle before rejecting (with the first error)
|
||||||
const asyncMap = (collection, iteratee) => {
|
module.exports = function asyncMap(collection, iteratee) {
|
||||||
let then
|
let then
|
||||||
if (collection != null && typeof (then = collection.then) === 'function') {
|
if (collection != null && typeof (then = collection.then) === 'function') {
|
||||||
return then.call(collection, collection => asyncMap(collection, iteratee))
|
return then.call(collection, collection => asyncMap(collection, iteratee))
|
||||||
@ -39,5 +39,3 @@ const asyncMap = (collection, iteratee) => {
|
|||||||
return values
|
return values
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export { asyncMap as default }
|
|
@ -17,10 +17,9 @@
|
|||||||
"url": "https://vates.fr"
|
"url": "https://vates.fr"
|
||||||
},
|
},
|
||||||
"preferGlobal": false,
|
"preferGlobal": false,
|
||||||
"main": "dist/",
|
|
||||||
"bin": {},
|
"bin": {},
|
||||||
"files": [
|
"files": [
|
||||||
"dist/"
|
"*.js"
|
||||||
],
|
],
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
">2%"
|
">2%"
|
||||||
@ -31,22 +30,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lodash": "^4.17.4"
|
"lodash": "^4.17.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
|
||||||
"@babel/cli": "^7.0.0",
|
|
||||||
"@babel/core": "^7.0.0",
|
|
||||||
"@babel/preset-env": "^7.0.0",
|
|
||||||
"@babel/preset-flow": "^7.0.0",
|
|
||||||
"babel-plugin-lodash": "^3.3.2",
|
|
||||||
"cross-env": "^7.0.2",
|
|
||||||
"rimraf": "^3.0.0"
|
|
||||||
},
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
|
|
||||||
"clean": "rimraf dist/",
|
|
||||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
|
||||||
"prebuild": "yarn run clean",
|
|
||||||
"predev": "yarn run prebuild",
|
|
||||||
"prepublishOnly": "yarn run build",
|
|
||||||
"postversion": "npm publish"
|
"postversion": "npm publish"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const asyncMapSettled = require('@xen-orchestra/async-map').default
|
const asyncMapSettled = require('@xen-orchestra/async-map')
|
||||||
const Disposable = require('promise-toolbox/Disposable')
|
const Disposable = require('promise-toolbox/Disposable')
|
||||||
const ignoreErrors = require('promise-toolbox/ignoreErrors')
|
const ignoreErrors = require('promise-toolbox/ignoreErrors')
|
||||||
const limitConcurrency = require('limit-concurrency-decorator').default
|
const limitConcurrency = require('limit-concurrency-decorator').default
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const asyncMapSettled = require('@xen-orchestra/async-map').default
|
const asyncMapSettled = require('@xen-orchestra/async-map')
|
||||||
const Disposable = require('promise-toolbox/Disposable')
|
const Disposable = require('promise-toolbox/Disposable')
|
||||||
const fromCallback = require('promise-toolbox/fromCallback')
|
const fromCallback = require('promise-toolbox/fromCallback')
|
||||||
const fromEvent = require('promise-toolbox/fromEvent')
|
const fromEvent = require('promise-toolbox/fromEvent')
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const asyncMapSettled = require('@xen-orchestra/async-map').default
|
const asyncMapSettled = require('@xen-orchestra/async-map')
|
||||||
const ignoreErrors = require('promise-toolbox/ignoreErrors')
|
const ignoreErrors = require('promise-toolbox/ignoreErrors')
|
||||||
const { formatDateTime } = require('@xen-orchestra/xapi')
|
const { formatDateTime } = require('@xen-orchestra/xapi')
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const asyncMapSettled = require('@xen-orchestra/async-map').default
|
const asyncMapSettled = require('@xen-orchestra/async-map')
|
||||||
const ignoreErrors = require('promise-toolbox/ignoreErrors')
|
const ignoreErrors = require('promise-toolbox/ignoreErrors')
|
||||||
const { formatDateTime } = require('@xen-orchestra/xapi')
|
const { formatDateTime } = require('@xen-orchestra/xapi')
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const asyncMap = require('@xen-orchestra/async-map').default
|
const asyncMap = require('@xen-orchestra/async-map')
|
||||||
const cancelable = require('promise-toolbox/cancelable')
|
const cancelable = require('promise-toolbox/cancelable')
|
||||||
const defer = require('golike-defer').default
|
const defer = require('golike-defer').default
|
||||||
const groupBy = require('lodash/groupBy')
|
const groupBy = require('lodash/groupBy')
|
||||||
|
Loading…
Reference in New Issue
Block a user