GithubHelp home page GithubHelp logo

rohanharikr / kit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sveltejs/kit

1.0 0.0 0.0 5.68 MB

The fastest way to build Svelte apps

Home Page: https://kit.svelte.dev

License: MIT License

JavaScript 85.80% Svelte 11.93% HTML 0.47% CSS 0.49% TypeScript 1.30% Shell 0.01%

kit's Introduction

READ THIS FIRST!

SvelteKit is still in beta. Expect bugs! Read more here, and track progress towards 1.0 here.

Documentation

Please see the documentation for information about getting started and developing with SvelteKit.

Packages

Package Changelog
@sveltejs/kit Changelog
create-svelte Changelog
@sveltejs/adapter-node Changelog
@sveltejs/adapter-static Changelog
@sveltejs/adapter-cloudflare-workers Changelog
@sveltejs/adapter-netlify Changelog
@sveltejs/adapter-vercel Changelog

The SvelteKit community also makes additional SvelteKit adapters available for use.

Developing

This monorepo uses pnpm. Install it...

npm i -g pnpm

...then install this repo's dependencies...

pnpm i

...then build SvelteKit and the other packages:

pnpm build

You should now be able to run the examples by navigating to one of the directories and doing pnpm dev.

Run pnpm dev inside the packages/kit directory to continually rebuild @sveltejs/kit as you make changes to SvelteKit. Restarting the example/test apps will cause the newly built version to be used.

To use the git hooks in the repo, which will save you waiting for CI to tell you that you forgot to lint, run this:

git config core.hookspath .githooks

Coding style

There are a few guidelines we follow:

  • Internal variables are written with snake_case while external APIs are written with camelCase
  • Provide a single object as the argument to public APIs. This object can have multiple properties
  • Avoid creating new test projects under packages/kit/test/apps but reuse an existing one when possible
  • Ensure pnpm lint and pnpm check pass. You can run pnpm format to format the code

Generating changelogs

For changes to be reflected in package changelogs, run pnpx changeset and follow the prompts. All changesets should be patch until SvelteKit 1.0

Testing

Run pnpm test to run the tests from all subpackages. Browser tests live in subdirectories of packages/kit/test such as packages/kit/test/apps/basics.

You can run the tests for only a single package by first moving to that directory. E.g. cd packages/kit.

You must rebuild each time before running the tests if you've made code changes.

To run a single integration test, provide the FILTER env var with the test name. E.g. FILTER="includes paths" pnpm test:integration. You can also open up the file and change test to test.only.

You can run the test server with cd packages/kit/test/apps/basics; pnpm run dev to hit it with your browser.

You may need to install some dependencies first e.g. with npx playwright install-deps (which only works on Ubuntu).

Documentation

All documentation for SvelteKit is in the documentation directory, any improvements should be made as a Pull Request to this repository. The documentation is served via and API, the site itself is located in the sites repository.

If you wish to preview documentation changes locally, please follow the instructions here: Previewing local docs changes.

Releases

The Changesets GitHub action will create and update a PR that applies changesets and publishes new versions of changed packages to npm.

It uses pnpm publish rather than pnpx changeset publish so that we can use the --filter and (while in beta) --tag flags โ€” though perhaps they work with pnpx changeset publish?

New packages will need to be published manually the first time if they are scoped to the @sveltejs organisation, by running this from the package directory:

npm publish --access=public

Bug reporting

Please make sure the issue you're reporting involves SvelteKit. Many issues related to how a project builds originate from Vite, which SvelteKit uses to build a project. It's important to note that new Vite projects don't use SSR by default and so if you create a new Vite project from scratch many issues won't reproduce eventhough they're caused by Vite. You should thus start with a project that utilizes SSR such as:

If an issue is caused by Vite, please report in the Vite issue tracker.

kit's People

Contributors

rich-harris avatar benmccann avatar github-actions[bot] avatar ehrencrona avatar grygrflzr avatar ignatiusmb avatar antony avatar conduitry avatar dummdidumm avatar pngwn avatar dominikg avatar jeanjpnm avatar stalkerg avatar samccone avatar babichjacob avatar lukeed avatar bjon avatar fredkschott avatar tanhauhau avatar bluwy avatar jthegedus avatar halfnelson avatar mohe2015 avatar lukasio avatar kvn-shn avatar nick-mazuk avatar mlocik97 avatar johnnysprinkles avatar gelio avatar hgl avatar

Stargazers

Roman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.