Downstream webpack will need any dependencies src/ depends on so it can
successfully build. Also if multiple packages being built into a larger
script share a common dependency version range, they can share the
dependency instead of duplicating it. This will save built file size,
execution time, and memory.
Whenever there is more than one source configured, the storage should be able to test for existence on each source and resolve to the first that responds sucessfully. This commit will only pass the data of the HTTP request if it resolves with a HTTP status code starting with 2
Using UMD for the web build conflicts with the old `index-web.js` file,
since they both try to do roughly the same thing. This change should
have been part of the recent switch to UMD output for `dist/web`.
Using UMD makes the build output more flexible and adds a very small
amount of overhead.
The "browser" field is one of the key features we've been missing and
should solve many of our build frustrations. See here for details on the
"browser" field in `project.json`:
https://github.com/defunctzombie/package-browser-field-spec
When calling `load`, you may now explicitly state a data format / file extension. If you don't
specify one, the default for that asset type will be used.
Resolves#7
Because the project ID doesn't indicate its contents, it should not be cached when it's loaded. Additionally the id should not be calculated from its contents.
- Add `cache` method to BuiltinHelper, to store retrieved assets
- Cache assets retrieved with other helpers with BuiltinHelper
- Flatten the BuiltinHelper cache structure, so only the md5 is needed to retrieve an asset. A collision between two types would be interesting but unlikely
- Add a synchronous `get` method to ScratchStorage that passes through to the BuiltinHelper for cached assets
- Fix WebHelper, so it sets the dataFormat on the Asset it returns
Since we publish through Travis CI there's no need for a `prepublish`
script in our `package.json` file -- in fact it complicates efficient
building and testing through CI. This change removes our `prepublish`
script in favor of developers running `npm run build` (or `npm run
watch`, etc.) locally and including an explicit build step in our CI
script.