- Relocate webpack stuff to assets/build
- Switch all js to airbnb code style
- Update webpack to v2.0 (beta)
- Update all other dependencies
- Assets manifest uses relative path as key [1]
- Code should be compatible with Node 4.5.0
- All dependencies have been updated
[1]: Previously the assets manifest would use the basename of a file path as
its key when looking up a cachebusted file. This was to be consistent with
Sage 8. This change makes it so that the relative path is used instead.
To clarify, review the following example.
Before:
```
{
"main.js": "scripts/main_5f4bfc9a9f82291c6dea.js",
"main.css": "styles/main_5f4bfc9a9f82291c6dea.css",
"customizer.js": "scripts/customizer_5f4bfc9a9f82291c6dea.js"
}
```
After:
```
{
"scripts/main.js":"scripts/main_5f4bfc9a9f82291c6dea.js",
"styles/main.css":"styles/main_5f4bfc9a9f82291c6dea.css",
"scripts/customizer.js":"scripts/customizer_5f4bfc9a9f82291c6dea.js"
}
```
1. Update dependencies
- Add font-awesome as dependency
- Switch to Bootstrap 4 dev branch
- Remove eslint airbnb style (we're not using it)
2. Imported images and fonts should go into dist/images
and dist/fonts, respectively
3. Only lint our own code, not external code (fixes#1633)
* Isolate scope of included files
* Load composer dependencies before loading Sage procedural code
Note that scope isolation was originally proposed by @al-the-x in 2014,
and we rejected it at the time. Our theory at the time was that shared
scope might be expected by WordPress developers. But since then we've done
quite a number of things that are atypical of WordPress development,
including our use of namespaces, which in itself is a form of scope
isolation.
Remove path.extname() check to fix build:production task.
Currently path.extname() is being supplied an object when it expects a string, resulting in a fatal error during production builds.
Removal is the cleanest solution as it's an unnecessary check, assets[name] will always be an object.