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

DRY things out and tidy up #454

Merged
merged 10 commits into from
Mar 6, 2021
Merged

DRY things out and tidy up #454

merged 10 commits into from
Mar 6, 2021

Conversation

Rich-Harris
Copy link
Member

Found a few opportunities to improve the packages/kit code while working on #453:

  • Now that tests are in the same package, we don't actually need to export the API at all — we just expose the CLI and @sveltejs/kit/ssr (formerly @sveltejs/kit/renderer)
  • Slimmed down the package by omitting sourcemaps, since they're not useful anywhere
  • Simplified the src folder — we now have core, runtime, cli.js and types.d.ts
  • The src/runtime folder contains client and server directories (stuff that Kit needs in each of those environments — server/index.js is the entry point for @sveltejs/kit/ssr), the app directory which is exposed in both cases, and a couple of module (paths.js and load.js) that are needed in both environments but shouldn't be accessible to the developer

Much happier with the state of things now.

`);

write_if_changed(`${output}/service-worker.js`, code);
// let files = ['service-worker-index.html'];
Copy link
Member

Choose a reason for hiding this comment

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

This big block of commented-out code looks suspicious.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah it's not actually called anywhere at the moment, that'll be the focus of #10, which i was hoping to make a start on very soon

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.

2 participants