MCPcopy
hub / github.com/sveltejs/svelte

github.com/sveltejs/svelte @v3.59.2 sqlite

repository ↗ · DeepWiki ↗ · release v3.59.2 ↗ · compare 2 versions
3,335 symbols 7,234 edges 1,786 files 13 documented · 0%
README

Cybernetically enhanced web apps: Svelte

npm version license Chat

What is Svelte?

Svelte is a new way to build web applications. It's a compiler that takes your declarative components and converts them into efficient JavaScript that surgically updates the DOM.

Learn more at the Svelte website, or stop by the Discord chatroom.

Supporting Svelte

Svelte is an MIT-licensed open source project with its ongoing development made possible entirely by fantastic volunteers. If you'd like to support their efforts, please consider:

Funds donated via Open Collective will be used for compensating expenses related to Svelte's development such as hosting costs. If sufficient donations are received, funds may also be used to support Svelte's development more directly.

Roadmap

You may view our roadmap if you'd like to see what we're currently working on.

Development

Pull requests are encouraged and always welcome. Pick an issue and help us out!

To install and work on Svelte locally:

git clone https://github.com/sveltejs/svelte.git
cd svelte
npm install

Do not use Yarn to install the dependencies, as the specific package versions in package-lock.json are used to build and test Svelte.

To build the compiler and all the other modules included in the package:

npm run build

To watch for changes and continually rebuild the package (this is useful if you're using npm link to test out changes in a project locally):

npm run dev

The compiler is written in TypeScript, but don't let that put you off — it's basically just JavaScript with type annotations. You'll pick it up in no time. If you're using an editor other than Visual Studio Code, you may need to install a plugin in order to get syntax highlighting and code hints, etc.

Running Tests

npm run test

To filter tests, use -g (aka --grep). For example, to only run tests involving transitions:

npm run test -- -g transition

svelte.dev

The source code for https://svelte.dev lives in the sites repository, with all the documentation in the site/content directory. The site is built with SvelteKit.

Is svelte.dev down?

Probably not, but it's possible. If you can't seem to access any .dev sites, check out this SuperUser question and answer.

License

MIT

Extension points exported contracts — how you extend this code

Source (Interface)
(no doc) [1 implementers]
src/compiler/preprocess/types.ts
SvelteComponentDev (Interface)
(no doc) [1 implementers]
src/runtime/internal/dev.ts
DOMAttributes (Interface)
(no doc)
elements/index.d.ts
Timing (Interface)
(no doc)
src/compiler/Stats.ts
SvelteComponentTyped (Interface)
(no doc) [1 implementers]
src/runtime/internal/dev.ts
AriaAttributes (Interface)
(no doc)
elements/index.d.ts
BaseNode (Interface)
(no doc)
src/compiler/interfaces.ts
AnimationConfig (Interface)
(no doc)
src/runtime/animate/index.ts

Core symbols most depended-on inside this repo

push
called by 667
src/compiler/compile/render_ssr/Renderer.ts
b
called by 493
test/js/samples/computed-collapsed-if/expected.js
detach
called by 220
src/runtime/internal/dom.ts
insert
called by 209
src/runtime/internal/dom.ts
get
called by 180
src/compiler/utils/fuzzymatch.ts
element
called by 156
src/runtime/internal/dom.ts
get_unique_name
called by 110
src/compiler/compile/Component.ts
set
called by 102
src/runtime/store/index.ts

Shape

Function 2,296
Method 506
Class 390
Interface 140
Enum 3

Languages

TypeScript100%

Modules by API surface

src/runtime/internal/dom.ts90 symbols
elements/index.d.ts59 symbols
src/compiler/compile/Component.ts48 symbols
src/runtime/internal/dev.ts39 symbols
src/compiler/compile/css/Stylesheet.ts38 symbols
src/compiler/compile/css/Selector.ts34 symbols
src/runtime/internal/utils.ts32 symbols
src/runtime/easing/index.ts30 symbols
src/compiler/compile/render_dom/wrappers/Element/index.ts26 symbols
src/compiler/compile/nodes/Element.ts26 symbols
src/compiler/interfaces.ts24 symbols
test/helpers.ts21 symbols

Dependencies from manifests, versioned

@ampproject/remapping0.3.0 · 1×
@jridgewell/sourcemap-codec1.4.15 · 1×
@rollup/plugin-commonjs11.0.0 · 1×
@rollup/plugin-json6.0.0 · 1×
@rollup/plugin-node-resolve11.2.1 · 1×
@rollup/plugin-replace5.0.2 · 1×
@rollup/plugin-sucrase3.1.0 · 1×
@rollup/plugin-typescript2.0.1 · 1×
@rollup/plugin-virtual3.0.1 · 1×
@sveltejs/eslint-configgithub:sveltejs/esli · 1×
@types/aria-query5.0.1 · 1×
@types/mocha7.0.0 · 1×

For agents

$ claude mcp add svelte \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact