Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor build routine (WIP) #1703

Merged
merged 7 commits into from
Sep 5, 2016
Merged

Refactor build routine (WIP) #1703

merged 7 commits into from
Sep 5, 2016

Conversation

QWp6t
Copy link
Member

@QWp6t QWp6t commented Sep 1, 2016

Update: Apparently this is not compatible with anything lower than Node 6.x. I'll have to take care of that.

Right now this should work. You should be able to run the following commands out of the box.

npm start
npm run build
npm run build:production
npm run clean
npm test

npm start and npm test are aliases for npm run watch and npm run lint (although test could be modified to run actual tests as well, obviously).

I haven't done much testing, and the commits are a little messy. I'll likely rebase it and add some better commit messages before merging.

QWp6t added 4 commits August 28, 2016 04:22
- Relocate webpack stuff to assets/build
- Switch all js to airbnb code style
- Update webpack to v2.0 (beta)
- Update all other dependencies
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"
}
```
@ptrckvzn
Copy link

ptrckvzn commented Sep 1, 2016

That's cool ! I'm looking forward testing and using this !

Two things (I tested no. 1, but not no. 2):

  1. 'public-path.js' should be added to every entry in assets/config.js, otherwise css url() won't load properly when running the watcher.
  2. shouldn't the loader for node_modules|bower_components images and fonts add a [hash] to the filenames at all time? Since it doesn't replicate the folder tree and put everything in dist/vendor/ there is a slim chance of collision for two assets with the same name.

@QWp6t QWp6t force-pushed the s9-refactor-build-routine branch from 0417907 to 65b3049 Compare September 2, 2016 03:22
@QWp6t QWp6t force-pushed the s9-refactor-build-routine branch from 65b3049 to f6cee29 Compare September 2, 2016 06:14
@QWp6t QWp6t force-pushed the s9-refactor-build-routine branch from 35ae7f6 to 054cd83 Compare September 2, 2016 13:02
@QWp6t QWp6t merged commit f6bdc7b into master Sep 5, 2016
@QWp6t QWp6t deleted the s9-refactor-build-routine branch September 5, 2016 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants