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
fixes #71 - Collaborate on multiple fixes to setup, live-reload, styling. #72
Conversation
Gulp is making my head hurt. But, what I think needs to happen that's not happening now:
|
Great work, Stephen. It's fantastic to see the live-reload parts working as expected. I have a quick question: was there a reason we joined |
Actually, I thought I was keeping it consistent with generator-gulp-webapp, but I'm clearly mistaken! It's totally ok to revert, but what are the use cases for watching and not serving? Or is it just a matter of modularity that they were separated? |
On your second comment, I understand why you're suggesting we copy the app/styles/*.scss compilations to dist/styles but am missing why the other steps (autoprefixing and so on) need to be changed from how they are done now. It's probably me missing something obvious :) |
Oh, on watch vs serve I believe it was kept separate so that tasks which wanted to call one but not the other had the flexibility to do so. I'd probably revert just that change at the moment but the rest looked good ⭐ |
precision: 10, | ||
loadPath: ['app/styles', 'app/styles/components'] | ||
}))) | ||
.pipe($.if(destination === 'dist', $.autoprefixer('last 1 version'))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually thought about this exact thing and decided to have it in both livereload and dist as some things will not work without the prefixed property, especially as we support browsersync which works in any browser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense. I will run it over css, as I believe it caught a lot of things.
So |
I was initially confused by this too. I'd prefer if we just had a |
Let's go with |
.tmp folder stuff is in! |
Testing! Thanks for addressing! |
I think I asked before how much of a no-no it would be to change from 4 -> 2 spaces, and it was not a no-no. (So, a yes-yes?) Anyway, after this PR is settled, I would love to make the conversion if it's still favored :) |
Hmm. I'm testing the branch you've been working on (ran this 3 times,
Note that I haven't run any other gulp commands after checking out the branch, just |
Strangely, I don't get those at all. Maybe something is confused because of the radically different file structure? My noob suggestion would be cloning in an entirely new directory to see if that magically fixes things. |
Tried again with a new directory and fresh clone but ran into the same problems. @sindresorhus @passy could you verify if you're able to use the branch without these issues? One other thing I noticed: we should be checking in a pre-built version of components.css in styles so that users not using the tooling can still take advantage. I think this is missing at present. It's okay for the file to be overwritten by the serve process. |
Yup, getting it too, when you attach an error handler it becomes pretty clear:
|
The |
@@ -78,26 +104,28 @@ gulp.task('pagespeed', pagespeed.bind(null, { | |||
strategy: 'mobile' | |||
})); | |||
|
|||
gulp.task('clean', rimraf.bind(null, 'dist')); | |||
gulp.task('clean', function (cb) { | |||
rimraf('dist', rimraf.bind({}, '.tmp', cb)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, this is the only way I could figure out how to remove two things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bind to null
, it's clearer that the contents doesn't matter.
Current bugs:
|
This works around the fix introduced for not being able to scroll-y on the menu on phone when many links are included.
Although a worthy addition, we’ll have to drop this Stephen :)
We're at a little bit of an impasse here so any feedback you have on this (at all) is massively useful.
What I'm crankly in light of all this good:
If there's a simper way to solve the above without as much hackery I would love to hear it :) |
Based on discussions in IM, it looks like we're happy to go down this direction. Could we get a few more people testing the very latest to double check it all works before we merge? I might do a pre-merge tag just to be safe. |
It is with a deep sigh and many prayers that I go forth and merge this monster set of changes. Tested workflows as much as possible. Let's pleeease not make major changes for the next few hours. Style tweaks are coolsies but lets keep it that until we're tagged <333333 Thank you once again for your heroic efforts all. |
fixes #71 - Collaborate on multiple fixes to setup, live-reload, styling, guides.
Yay! |
Here's a start!
Changed:
app/styles/sass
toapp/styles/components
gulp watch
andgulp serve
into one task:gulp serve
I haven't thoroughly tested yet, but what I can confirm does work: