Skip to content
This repository has been archived by the owner on Nov 17, 2017. It is now read-only.

Moving css preprocessing into webpack #9

Closed
wants to merge 4 commits into from
Closed

Conversation

geekyme
Copy link

@geekyme geekyme commented Dec 14, 2014

Hi, I made some adjustments to allow webpack to handle the css processing instead of using gulp watch + livereload. I think webpack's hot-module reloading is more efficient.

For example sake, I use stylus for preprocessing (stylus is clean and powerful!) and the plugin nib for browser prefixing.

I've checked both the production and dev builds of this approach and functionality-wise, everything remains the same. Resources are correctly generated with cache busting too.

Because I allow webpack to handle css preprocessing, I've also renamed webpack's build folder to /static/ instead of /js/. I've renamed all references in the source files and gulp too.

Shawn Lim added 3 commits December 14, 2014 13:59
- no need for live reload anymore
- combine js & css builds into a /static/ folder
- rename references to this /static/ folder
- make web pack build to this /static/ folder in production
@gpbl
Copy link
Owner

gpbl commented Jan 5, 2015

Hi @geekyme thank you for the tips, I'll definitely check them out. I'm also not happy with the gulp solution – I'd prefer to keep gulp out as much as possible.

Some radical changes are coming (I hope soon), because of recent discoveries and best practices... so I'm not merging the PR for now. Anyway thank you again and sorry for the late answer, the notification went lost somewhere...

@geekyme
Copy link
Author

geekyme commented Jan 5, 2015

Sure. Oh cool recent discoveries and best practices? Tell me more

@gpbl
Copy link
Owner

gpbl commented Jan 5, 2015

yep, mainly the app structure, use of reflux, intl support and deep use of the 6to5 transpiler :-)
not a progress on reflux server-rendering, yet: but I'll dive into that soon. when I'm ready I hope to put the learnings in this template.

@gpbl
Copy link
Owner

gpbl commented Jan 11, 2015

@geekyme how do you tell webpack where is the entry point for the stylus file? I thought this should be made through a a require in the entry js files... but I can't see it in your code.

@geekyme
Copy link
Author

geekyme commented Jan 11, 2015

I have the call in client.jsx :)

Sent from my iPhone

On 11 Jan 2015, at 4:02 pm, Giampaolo Bellavite notifications@github.com wrote:

@geekyme how do you tell webpack where is the entry point for the stylus file? I thought this should be made through a a require in the entry js files... but I can't see it in your code.


Reply to this email directly or view it on GitHub.

@gpbl
Copy link
Owner

gpbl commented Jan 11, 2015

I see... thanks!

@gpbl
Copy link
Owner

gpbl commented Apr 4, 2015

@geekyme I changed everything :-) Now there's no need to use gulp anymore, I moved all to webpack. Thanks again for the invaluable insights!

@gpbl gpbl closed this Apr 4, 2015
@geekyme
Copy link
Author

geekyme commented Apr 4, 2015

You are doing an awesome work with this repo dude.

Question: is there any reason why you prefer fluxible's router over react-router ?

On 4 Apr 2015, at 5:30 pm, Giampaolo Bellavite notifications@github.com wrote:

@geekyme I changed everything :-) Now there's no need to use gulp anymore, I moved all to webpack. Thanks again for the invaluable insights!


Reply to this email directly or view it on GitHub.

@gpbl
Copy link
Owner

gpbl commented Apr 4, 2015

Yeah react-router didn't play well with my flux implementation :( The fluxible's router fits better.

@geekyme
Copy link
Author

geekyme commented Apr 5, 2015

Really? Wat kind of issues did u face?

Sent from my iPhone

On 5 Apr 2015, at 5:10 am, Giampaolo Bellavite notifications@github.com wrote:

Yeah react-router didn't play well with my flux implementation :( The fluxible's router fits better.


Reply to this email directly or view it on GitHub.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants