-
Notifications
You must be signed in to change notification settings - Fork 10
[In progress] Remove gulp & refactor core API #37
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
base: master
Are you sure you want to change the base?
Conversation
Imagemin CLI is a no-go because it doesn't honor directory structure. |
Webpack config is almost ready, but something is wrong w/ entry point resolution... would love to get your eyes on this @ncphillips |
@budparr added PurgeCSS to C-S-S; it only runs for production builds, and reads all of the Note to self: the CLI still isn't working in the task executor but can confirm the config works when running manually. Just need to figure what's up with the process spawning. |
@chrisdmacrae I imagine you have to use the output HTML because you can't assume too much about your layouts, but fwiw, I run Purge against my layouts: https://github.com/theNewDynamic/hugo-starter/blob/master/webpack.prod.js#L74 And I split my Webpack into dev/prod/common yesterday and it is a breath of fresh air! |
spawn.sync(...scriptCmd, { stdio: "inherit" }) | ||
// Here we define the tasks using orchestrator, | ||
// an extremely lightweight and efficient task executor | ||
const taskMgr = new Orchestrator(); |
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'm a little nervous about orchestrator
because doesn't seem to be maintained. There hasn't been an update in over a year.
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 wasn't too worried because TBH Gulp is in the same boat. Everyone uses 3.x because 4.0 has been stale for over a year as well.
People submit PRs if there's a bug and somebody will merge them, but it isn't being improved actively.
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.
We could do something like this though: https://medium.com/@_jh3y/how-to-build-your-own-task-runner-with-es6-and-node-85d871a4a0c
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.
My thought is that orchestrator is fine for now. We'll consider alternatives if it becomes an issue. That's the beauty of the build process not being API facing.
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.
Exactly! 👯♂️
@budparr You're 100% correct there -- people could be abstracting their classes into variables for all I know, so I need valid, distributable HTML to validate against. |
So, @chrisdmacrae what does that do to performance? It's not hard to have a site with several thousand pages. |
@budparr I'm not too worried about it; PurgeCSS isn't really doing an expensive operation; it's just grabbing text and splitting it into an array by spaces. Something that's worth testing, though. |
@ncphillips I need a second set of eyes on It's using the bulk of CRA's stuff, heavily commented. But it doesn't seem to like the entryPoint resolved from I can hardcode it and it will work. |
@chrisdmacrae just pulled down this branch. I'll get back to you shortly. |
@chrisdmacrae I'm hitting some issues with this branch. When I run
|
Submitting this PR to track the progress of this refactor
Tasks*
Raw CLI input (imagemin-cli
)imagemin-power-cli
)static-scripts.config.js