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

Remove Blaze repo based dependencies from static-html #10267

Merged
merged 5 commits into from Nov 23, 2018

Conversation

hwillson
Copy link
Contributor

(Replaces #9781)

meteor create --minimal pulls tracker into new minimal apps as a dependency. This is because it's being pulled in as one of the dependencies on the Blaze templating tools side. Currently the static-html package is dependent on several Blaze repo based packages, a lot of which include Blaze specific utilities / helpers, that are really not needed when using non-Blaze apps. The static-html package really only needs the following Blaze repo functionality to accomplish its role:

  1. caching-html-compiler
  2. The html-scanner.js file from the templating-tools package.
  3. And of course itself, the static-html package.

Since the above functionality isn't specific to Blaze, let's extract those files / packages from the Blaze repo, and bring them back into Meteor core. By doing so we can reduce a lot of template based dependency overhead, when not using Blaze.

This PR creates a new copy of the static-html and caching-html-compiler packages in core, and creates a new package called html-scanner, to house the html-scanner.js functionality from the templating-tools package. With these changes in place, we're able to replace the following dependencies in a meteor create --minimal app:

blaze-tools
caching-html-compiler
deps
html-tools
htmljs
spacebars-compiler
static-html
templating-tools
tracker

with:

caching-html-compiler
html-scanner
static-html

(And this change will of course benefit non minimal static-html dependent apps as well.)

These changes create a new copy of the static-html and
caching-html-compiler packages in core, as well as a new package
called html-scanner, to house the html-scanner.js functionality
from the templating-tools package. With these changes in place,
we're able to remove all Blaze dependencies from static-html,
which benefits React based Meteor apps.
@hwillson hwillson changed the title Remove Blaze repo based dependencies from static-html [WIP] Remove Blaze repo based dependencies from static-html Oct 11, 2018
@hwillson
Copy link
Contributor Author

Grrr - none of these test failures happen locally 😞.

We don't need the extra `CompileError` class, and using it
was throwing off `caching-html-compiler` error handling.
Errors with messages and line numbers weren't being
interpreted / formatted properly.
@hwillson
Copy link
Contributor Author

This PR is now in working shape technically, but we need to decide how to best update Blaze to reference these new packages (instead of using its own copies). That decision will likely also affect the version numbers used for these packages.

I'll remove the WIP and flag this as being ready for review, since the Blaze updates will happen in a separate repo/PR.

@hwillson hwillson changed the title [WIP] Remove Blaze repo based dependencies from static-html Remove Blaze repo based dependencies from static-html Oct 12, 2018
@benjamn benjamn added this to the Release 1.8.1 milestone Nov 23, 2018
@benjamn benjamn merged commit 4aad077 into devel Nov 23, 2018
benjamn added a commit that referenced this pull request Nov 23, 2018
This reverts commit 4aad077.

@hwillson Travis CI tests were failing after I merged this, and now
they're passing again (locally) with this commit reverted:
https://travis-ci.org/meteor/meteor/builds/458921622
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

Successfully merging this pull request may close these issues.

None yet

2 participants