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

feat: run stc from integrations #2342

Merged
merged 65 commits into from Apr 5, 2022
Merged

Conversation

tzachbon
Copy link
Contributor

@tzachbon tzachbon commented Feb 20, 2022

We want to give our users a better experience with the integrations and the stc tool.
Today, the user will probably have to run them in different processes to use them together.
This PR introduces a solution. If the integration finds a stcConfig, it will "merge" the processes programmatically, which will result in better diagnostics experience and consistent build order.

Integrations (The CLI will become a dependency)

  • Support webpack integration.
  • Support rollup integration and add 2.70.0 of rollup as peerDependency of the package
  • Update README files.

Feats

  • loadStylableConfig returns the path of the config too.
  • Create hooks API for the diagnostic manager.
  • reportDiagnostic accepts from to the diagnostic report.
  • CLI supports "config" flag.
  • unified method to resolve stcConfig
  • watchMode flag for stc that does not trigger watch but tells stc to be prepared for watching.

Fixes

  • Log skipped file in stc watcher.
  • stc watcher now knows about the first process's generated files.

Refactor

  • move all e2e-test-kit file-system related helpers to a dedicated file.

Test

  • fix dedup and sort diagnostics test in CLI.

@tzachbon tzachbon self-assigned this Feb 21, 2022
@tzachbon tzachbon added integration Bundler, test-runner and node tooling CLI, stylable-scripts boilerplate labels Feb 21, 2022
this.createStcBuilder(compiler);
});

compiler.hooks.beforeRun.tapPromise(StylableWebpackPlugin.name, async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove async await

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type does not allow it

@tzachbon tzachbon requested a review from barak007 March 16, 2022 14:59
@tzachbon tzachbon merged commit de007a9 into master Apr 5, 2022
@tzachbon tzachbon deleted the tzach/run-stc-inside-intergrations branch April 5, 2022 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration Bundler, test-runner and node tooling CLI, stylable-scripts boilerplate
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

2 participants