build-machine
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -18,3 +18,6 @@ const path = require('path'); | ||
it('builds without error', () => { | ||
return dumpsterFire(buildConfig).build().then(() => { | ||
return dumpsterFire(buildConfig).build().then((manifests) => { | ||
// should have generated a manifest | ||
expect(Array.isArray(manifests)).to.equal(true); | ||
expect(manifests[0][require.resolve('./src/index.bundle.js')].outputPath).to.equal(require.resolve('./dist/index.bundle.js')); | ||
expect(require('./dist/index.bundle.js')).to.equal(3); // eslint-disable-line import/no-unresolved | ||
@@ -21,0 +24,0 @@ }); |
{ | ||
"name": "build-machine", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "", | ||
@@ -11,3 +11,3 @@ "main": "src/index.js", | ||
"author": "Gary Borton <gdborton@gmail.com>", | ||
"repository": "git@github.com:gdborton/dumpster-fire.git", | ||
"repository": "git@github.com:gdborton/build-machine.git", | ||
"devDependencies": { | ||
@@ -14,0 +14,0 @@ "chai": "^4.1.1", |
@@ -1,21 +0,7 @@ | ||
# dumpster-fire [![Build Status](https://travis-ci.org/in-need-of-rename/dumpster-fire.svg?branch=master)](https://travis-ci.org/in-need-of-rename/dumpster-fire) | ||
# build-machine [![Build Status](https://travis-ci.org/in-need-of-rename/build-machine.svg?branch=master)](https://travis-ci.org/in-need-of-rename/build-machine) | ||
<div style="text-align:center"><img src ="https://user-images.githubusercontent.com/4172067/33363981-5df42498-d497-11e7-805c-78cc6b1dd9d6.jpg" width=500/></div> | ||
This is a personal hobby project. Until (unless) this notice is removed, you shouldn't take it seriously or use it in production. This is simply an experiment in how fast I can make very large builds. Currently build-machine is riddled with bugs and inconsistencies, and until I decide on a long term plan it'll likely stay that way. | ||
> Image used with permission from [Maggie Appleton](https://twitter.com/Mappletons) and [Egghead.io](egghead.io) | ||
# | ||
This is a personal hobby project. Until (unless) this notice is removed, you shouldn't take it seriously or use it in production. This is simply an experiment in how fast I can make very large builds. Currently dumpster-fire is riddled with bugs and inconsistencies, and until I decide on a long term plan it'll likely stay that way. | ||
## Why the name dumpster-fire? | ||
The name really serves two purposes. The first is to highlight the current state of bundling JavaScript. The second purpose is to highlight the fact that you really shouldn't be using this library for production (for real). | ||
## If this project is successful will you change the name? | ||
Maybe. Probably not if I can help it. I like the name, it makes me giggle. | ||
## Isn't this where the documentation is supposed to go? | ||
Yup, but it's way too early in the project to pretend like I've got any of the api nailed down. If anything comes of this, I promise to improve the documentation. |
@@ -211,2 +211,3 @@ /* eslint no-param-reassign:0 */ | ||
task(ctx, task) { | ||
ctx.results = []; | ||
const start = Date.now(); | ||
@@ -253,9 +254,18 @@ let toBeAssembled = 0; | ||
outputBaseName | ||
}).then(() => { | ||
}).then((data) => { | ||
assembled += 1; | ||
update(); | ||
return data; | ||
}); | ||
}); | ||
return Promise.all(assemblePromises); | ||
return Promise.all(assemblePromises).then((data) => { | ||
ctx.results.push(data.reduce((acc, compileResult) => { | ||
acc[compileResult.path] = { | ||
outputPath: compileResult.outputPath, | ||
}; | ||
return acc; | ||
}, {})); | ||
}); | ||
}); | ||
@@ -279,3 +289,3 @@ | ||
buildTask = tasks.run(); | ||
buildTask = tasks.run().then(ctx => ctx.results); | ||
} | ||
@@ -282,0 +292,0 @@ |
@@ -145,4 +145,7 @@ const fs = require('fs'); | ||
fs.writeFileSync(mapLocation, JSON.stringify(finalMap, null, 2)); // map | ||
callback(null); | ||
callback(null, { | ||
outputPath: targetLocation, | ||
path: input.entry.path, | ||
}); | ||
}); | ||
}; |
33797686
3693
8