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

Try calypso-build for our builds #62

Closed
allendav opened this issue May 6, 2019 · 8 comments
Closed

Try calypso-build for our builds #62

allendav opened this issue May 6, 2019 · 8 comments

Comments

@allendav
Copy link
Contributor

allendav commented May 6, 2019

https://github.com/Automattic/wp-calypso/blob/master/packages/calypso-build/README.md

If it works for us, use this issue to commit it too.

cc @ockham @DanReyLop @v18

@DanReyLop
Copy link
Contributor

Let's keep @Automattic/isotope in the loop. If calypso-build is useful for WCPay and we're going to end up in WooCommerce Core, WC-Admin should eventually use it too.

@dechov
Copy link
Contributor

dechov commented May 6, 2019

Is there a relationship or comparison to be aware of between @automattic/calypso-build and the build/config functionality and standardization in @wordpress/scripts [doc]?

@ockham
Copy link

ockham commented May 6, 2019

Is there a relationship or comparison to be aware of between @automattic/calypso-build and the build/config functionality and standardization in @wordpress/scripts [doc]?

They're currently pretty much unrelated. I've elaborated a bit on reasons and design decisions in this Slack thread: p1557146190076100-slack-io

@DanReyLop
Copy link
Contributor

Hum... then I think we shouldn't jump to use "the new shiny thing" if it's at odds with the more standard @wordpress/scripts and may very well be consolidated with it in the future.

Curiously, WooCommerce Admin only uses wp-scripts to run tests (source), so any explanation on how did y'all went that way would be appreciated.

I see that @wordpress/scripts has a similar way of customizing the Webpack bits as calypso-build (#), so it should fit our use case.

calypso-build may very well be a better choice for WooCommerce Services though, as it relies more heavily on Calypso's stack. WooCommerce Payments will rely on Gutenberg/WC-Admin instead, so going with @wordpress/scripts seems like a better fit.

The only big thing I see missing from @wordpress/scripts is SASS support, and it's coming: WordPress/gutenberg#14847

@ockham
Copy link

ockham commented May 7, 2019

Hum... then I think we shouldn't jump to use "the new shiny thing" if it's at odds with the more standard @wordpress/scripts and may very well be consolidated with it in the future.

I just failed one of my life goals: To never, ever, release a tool that people call "the shiny new thing" 😅 I was always striving to only publish tools that are stable, well thought of, and have been battle-tested in practical applications. I thought that calypso-build fulfilled all those criteria, but that obviously doesn't mean that others perceive it that way.

Since I've also been asked by others, I've elaborated more about the difference between the two build tools here: p4TIVU-9fc-p2

[...]
The only big thing I see missing from @wordpress/scripts is SASS support, and it's coming: WordPress/gutenberg#14847

Just a note (I'm also touching upon this in my above mentioned P2 post), it will work differently from calypso-build, i.e. no import './style.css' webpack-loader based syntax.

@DanReyLop
Copy link
Contributor

I just failed one of my life goals: To never, ever, release a tool that people call "the shiny new thing" 😅 I was always striving to only publish tools that are stable, well thought of, and have been battle-tested in practical applications. I thought that calypso-build fulfilled all those criteria, but that obviously doesn't mean that others perceive it that way.

Please don't take it that way, that wording was just some poor attempt at humour :)
My apologies if I came across too snarky. What I was trying to say by calling it "the shiny new thing" is that it's something that we probably don't need, we just feel compelled to try it because it's new. In our case, since we're going to use WooCommerce Admin components (which use wp-scripts partially) and Gutenberg components, it makes more sense to use the Gutenberg build toolkit too.

That doesn't discount calypso-build's quality or stability, of course. In fact, we'll probably try it on WooCommerce Services, which is a Calypso-derived project.

Since I've also been asked by others, I've elaborated more about the difference between the two build tools here: p4TIVU-9fc-p2

Thanks! That helps. Looks like the biggest difference is regarding the styles, which isn't catastrophic. We are developing a plugin that will work in a Gutenberg / WP-Admin context, so the assumptions made by wp-scripts (use @wordpress/element, extern lodash and @wordpress/*) are fine for us.

Just a note (I'm also touching upon this in my above mentioned P2 post), it will work differently from calypso-build, i.e. no import './style.css' webpack-loader based syntax.

I just skimmed over the PR, but it looks like that's still an ongoing discussion. In any case, that wouldn't be a deal-breaker for our case, and probably wouldn't be a deal-breaker for WC-Admin either.

@allendav
Copy link
Contributor Author

allendav commented Jun 7, 2019

@DanReyLop wrote:

WooCommerce Payments will rely on Gutenberg/WC-Admin instead, so going with @wordpress/scripts seems like a better fit.

Agreed at this time, and it looks like changing later is not horrible, so I'm removing this from the v0.2 milestone and we can revisit it later in the project

@dwainm
Copy link
Contributor

dwainm commented Jul 9, 2021

Closing as this has become stale. We can always revisit and create a new issue if we need to change the build system.

@dwainm dwainm closed this as completed Jul 9, 2021
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

No branches or pull requests

5 participants