chore: convert to monorepo (#8644)

pull/8654/head
Ben McCann 1 year ago committed by GitHub
parent 1c581bc56f
commit ddfff4df8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -49,4 +49,4 @@ jobs:
with:
node-version: 16
cache: pnpm
- run: 'pnpm i && pnpm format:check && pnpm lint'
- run: 'pnpm i && pnpm check && pnpm lint'

20
.gitignore vendored

@ -2,24 +2,4 @@
.DS_Store
.vscode
node_modules
*.map
/src/compiler/compile/internal_exports.js
/src/shared/version.js
/compiler.d.ts
/compiler.cjs
/index.d.ts
/action.d.ts
/internal.d.ts
/store.d.ts
/easing.d.ts
/motion.d.ts
/transition.d.ts
/animate.d.ts
/scratch/
/test/*/samples/_
/test/runtime/shards
/yarn-error.log
_actual*.*
_output
/types
.eslintcache

@ -14,7 +14,7 @@ There are many ways to contribute to Svelte, and many of them do not involve wri
- Simply start using Svelte. Go through the [Getting Started](https://svelte.dev/docs#getting-started) guide. Does everything work as expected? If not, we're always looking for improvements. Let us know by [opening an issue](#reporting-new-issues).
- Look through the [open issues](https://github.com/sveltejs/svelte/issues). A good starting point would be issues tagged [good first issue](https://github.com/sveltejs/svelte/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). Provide workarounds, ask for clarification, or suggest labels. Help [triage issues](#triaging-issues-and-pull-requests).
- If you find an issue you would like to fix, [open a pull request](#pull-requests).
- Read through our [tutorials](https://svelte.dev/tutorial/basics). If you find anything that is confusing or can be improved, you can make edits by clicking "Edit this chapter" at the bottom left of the tutorial page.
- Read through our [tutorials](https://learn.svelte.dev/). If you find anything that is confusing or can be improved, you can make edits by clicking "Edit this page" at the bottom left of the tutorial page.
- Take a look at the [features requested](https://github.com/sveltejs/svelte/labels/feature%20request) by others in the community and consider opening a pull request if you see something you want to work on.
Contributions are very welcome. If you think you need help planning your contribution, please ping us on Discord at [svelte.dev/chat](https://svelte.dev/chat) and let us know you are looking for a bit of help.
@ -74,9 +74,10 @@ Small pull requests are much easier to review and more likely to get merged.
### Installation
1. Ensure you have [pnpm](https://pnpm.io/installation) installed.
1. After cloning the repository, run `pnpm install` in the root of the repository.
1. To compile in watch mode, run `pnpm dev`.
1. Ensure you have [pnpm](https://pnpm.io/installation) installed
1. After cloning the repository, run `pnpm install`. You can do this in the root directory or in the `svelte` project
1. Move into the `svelte` directory with `cd packages/svelte`
1. To compile in watch mode, run `pnpm dev`
### Creating a branch

@ -1,8 +1,6 @@
[![Cybernetically enhanced web apps: Svelte](https://sveltejs.github.io/assets/banner.png)](https://svelte.dev)
[![npm version](https://img.shields.io/npm/v/svelte.svg)](https://www.npmjs.com/package/svelte) [![license](https://img.shields.io/npm/l/svelte.svg)](LICENSE.md) [![Chat](https://img.shields.io/discord/457912077277855764?label=chat&logo=discord)](https://svelte.dev/chat)
[![license](https://img.shields.io/npm/l/svelte.svg)](LICENSE.md) [![Chat](https://img.shields.io/discord/457912077277855764?label=chat&logo=discord)](https://svelte.dev/chat)
## What is Svelte?
@ -10,7 +8,6 @@ Svelte is a new way to build web applications. It's a compiler that takes your d
Learn more at the [Svelte website](https://svelte.dev), or stop by the [Discord chatroom](https://svelte.dev/chat).
## 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:
@ -19,13 +16,15 @@ Svelte is an MIT-licensed open source project with its ongoing development made
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](https://svelte.dev/roadmap) if you'd like to see what we're currently working on.
## Contributing
Please see the [Contributing Guide](CONTRIBUTING.md) and [svelte package](packages/svelte) for contributing to Svelte.
## Development
### Development
Pull requests are encouraged and always welcome. [Pick an issue](https://github.com/sveltejs/svelte/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) and help us out!
@ -37,7 +36,7 @@ cd svelte
pnpm 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.
> Do not use Yarn to install the dependencies, as the specific package versions in `pnpm-lock.json` are used to build and test Svelte.
To build the compiler and all the other modules included in the package:
@ -66,12 +65,11 @@ To filter tests, use `-g` (aka `--grep`). For example, to only run tests involvi
pnpm test -- -g transition
```
## svelte.dev
### svelte.dev
The source code for https://svelte.dev lives in the [sites](https://github.com/sveltejs/sites) repository, with all the documentation in the [site/content](site/content) directory. The site is built with [SvelteKit](https://kit.svelte.dev).
### Is svelte.dev down?
## 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](https://superuser.com/q/1413402).

@ -1,145 +1,31 @@
{
"name": "svelte",
"version": "4.0.0-next.0",
"description": "Cybernetically enhanced web apps",
"name": "svelte-monorepo",
"version": "0.0.1",
"description": "monorepo for svelte and friends",
"private": true,
"type": "module",
"module": "src/runtime/index.js",
"main": "src/runtime/index.js",
"files": [
"src",
"types",
"compiler.*",
"register.js",
"index.d.ts",
"internal.d.ts",
"store.d.ts",
"animate.d.ts",
"transition.d.ts",
"easing.d.ts",
"motion.d.ts",
"action.d.ts",
"elements.d.ts",
"README.md"
],
"exports": {
"./package.json": "./package.json",
".": {
"types": "./types/runtime/index.d.ts",
"browser": {
"import": "./src/runtime/index.js"
},
"import": "./src/runtime/ssr.js"
},
"./compiler": {
"types": "./types/compiler/index.d.ts",
"import": "./src/compiler/index.js",
"require": "./compiler.cjs"
},
"./action": {
"types": "./types/runtime/action/index.d.ts"
},
"./animate": {
"types": "./types/runtime/animate/index.d.ts",
"import": "./src/runtime/animate/index.js"
},
"./easing": {
"types": "./types/runtime/easing/index.d.ts",
"import": "./src/runtime/easing/index.js"
},
"./internal": {
"types": "./types/runtime/internal/index.d.ts",
"import": "./src/runtime/internal/index.js"
},
"./motion": {
"types": "./types/runtime/motion/index.d.ts",
"import": "./src/runtime/motion/index.js"
},
"./store": {
"types": "./types/runtime/store/index.d.ts",
"import": "./src/runtime/store/index.js"
},
"./transition": {
"types": "./types/runtime/transition/index.d.ts",
"import": "./src/runtime/transition/index.js"
},
"./elements": {
"types": "./elements.d.ts"
}
},
"engines": {
"node": ">=16"
},
"types": "types/runtime/index.d.ts",
"scripts": {
"format:fix": "prettier . --cache --plugin-search-dir=. --write",
"format:check": "prettier . --cache --plugin-search-dir=. --check",
"test": "vitest run && echo \"manually check that there are no type errors in test/types by opening the files in there\"",
"build": "rollup -c && npm run tsd",
"prepare": "npm run build",
"dev": "rollup -cw",
"posttest": "agadoo src/internal/index.js",
"prepublishOnly": "npm run lint && npm run build && npm test",
"tsd": "node ./generate-types.js",
"lint": "eslint \"{src,test}/**/*.{ts,js}\" --cache"
"test": "pnpm test -r --filter=./packages/*",
"build": "pnpm -r build",
"check": "pnpm -r check",
"lint": "pnpm -r lint",
"format": "pnpm -r format"
},
"repository": {
"type": "git",
"url": "https://github.com/sveltejs/svelte.git"
"url": "git+https://github.com/sveltejs/svelte.git"
},
"keywords": [
"UI",
"framework",
"templates",
"templating"
],
"author": "Rich Harris",
"license": "MIT",
"bugs": {
"url": "https://github.com/sveltejs/svelte/issues"
},
"homepage": "https://svelte.dev",
"dependencies": {
"@ampproject/remapping": "^2.2.1",
"@jridgewell/sourcemap-codec": "^1.4.15",
"acorn": "^8.8.2",
"aria-query": "^5.1.3",
"axobject-query": "^3.1.1",
"code-red": "^1.0.0",
"css-tree": "^2.3.1",
"estree-walker": "^3.0.3",
"is-reference": "^3.0.1",
"locate-character": "^2.0.5",
"magic-string": "^0.30.0",
"periscopic": "^3.1.0"
},
"devDependencies": {
"@playwright/test": "^1.33.0",
"@rollup/plugin-commonjs": "^24.1.0",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-replace": "^5.0.2",
"@sveltejs/eslint-config": "^6.0.1",
"@types/aria-query": "^5.0.1",
"@types/estree": "^1.0.0",
"@types/node": "^14.14.31",
"@typescript-eslint/eslint-plugin": "^5.58.0",
"agadoo": "^3.0.0",
"esbuild": "^0.17.19",
"@changesets/cli": "^2.26.0",
"@svitejs/changesets-changelog-github-compact": "^1.1.0",
"eslint": "^8.40.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-svelte": "^2.28.0",
"eslint-plugin-unicorn": "^47.0.0",
"happy-dom": "^9.18.3",
"jsdom": "^21.1.1",
"kleur": "^4.1.5",
"playwright": "^1.34.3",
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.0",
"rollup": "^3.20.2",
"source-map": "^0.7.4",
"tiny-glob": "^0.2.9",
"typescript": "^5.0.4",
"util": "^0.12.5",
"vitest": "^0.31.1"
"prettier-plugin-svelte": "^2.10.0"
},
"packageManager": "pnpm@8.4.0"
}

@ -0,0 +1,19 @@
*.map
/src/compiler/compile/internal_exports.js
/src/shared/version.js
/compiler.d.ts
/compiler.cjs
/index.d.ts
/action.d.ts
/internal.d.ts
/store.d.ts
/easing.d.ts
/motion.d.ts
/transition.d.ts
/animate.d.ts
/scratch/
/test/*/samples/_
/test/runtime/shards
_actual*.*
_output
/types

@ -0,0 +1,38 @@
[![Cybernetically enhanced web apps: Svelte](https://sveltejs.github.io/assets/banner.png)](https://svelte.dev)
[![npm version](https://img.shields.io/npm/v/svelte.svg)](https://www.npmjs.com/package/svelte) [![license](https://img.shields.io/npm/l/svelte.svg)](LICENSE.md) [![Chat](https://img.shields.io/discord/457912077277855764?label=chat&logo=discord)](https://svelte.dev/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](https://svelte.dev), or stop by the [Discord chatroom](https://svelte.dev/chat).
## Getting started
You can play around with Svelte in the [tutorial](https://learn.svelte.dev/), [examples](https://svelte.dev/examples), and [REPL](https://svelte.dev/repl).
When you're ready to build a full-fledge application, we recommend using [SvelteKit](https://kit.svelte.dev):
```bash
npm create svelte@latest my-app
cd my-app
npm install
npm run dev
```
See [the SvelteKit documentation](https://kit.svelte.dev/docs) to learn more.
## Changelog
[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md).
## 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:
- [Becoming a backer on Open Collective](https://opencollective.com/svelte).
Funds donated via Open Collective will be used for compensating expenses related to Svelte's development.

@ -0,0 +1,139 @@
{
"name": "svelte",
"version": "4.0.0-next.0",
"description": "Cybernetically enhanced web apps",
"type": "module",
"module": "src/runtime/index.js",
"main": "src/runtime/index.js",
"files": [
"src",
"types",
"compiler.*",
"register.js",
"index.d.ts",
"internal.d.ts",
"store.d.ts",
"animate.d.ts",
"transition.d.ts",
"easing.d.ts",
"motion.d.ts",
"action.d.ts",
"elements.d.ts",
"README.md"
],
"exports": {
"./package.json": "./package.json",
".": {
"types": "./types/runtime/index.d.ts",
"browser": {
"import": "./src/runtime/index.js"
},
"import": "./src/runtime/ssr.js"
},
"./compiler": {
"types": "./types/compiler/index.d.ts",
"import": "./src/compiler/index.js",
"require": "./compiler.cjs"
},
"./action": {
"types": "./types/runtime/action/index.d.ts"
},
"./animate": {
"types": "./types/runtime/animate/index.d.ts",
"import": "./src/runtime/animate/index.js"
},
"./easing": {
"types": "./types/runtime/easing/index.d.ts",
"import": "./src/runtime/easing/index.js"
},
"./internal": {
"types": "./types/runtime/internal/index.d.ts",
"import": "./src/runtime/internal/index.js"
},
"./motion": {
"types": "./types/runtime/motion/index.d.ts",
"import": "./src/runtime/motion/index.js"
},
"./store": {
"types": "./types/runtime/store/index.d.ts",
"import": "./src/runtime/store/index.js"
},
"./transition": {
"types": "./types/runtime/transition/index.d.ts",
"import": "./src/runtime/transition/index.js"
},
"./elements": {
"types": "./elements.d.ts"
}
},
"engines": {
"node": ">=16"
},
"types": "types/runtime/index.d.ts",
"scripts": {
"format": "prettier . --cache --plugin-search-dir=. --write",
"check": "prettier . --cache --plugin-search-dir=. --check",
"test": "vitest run && echo \"manually check that there are no type errors in test/types by opening the files in there\"",
"build": "rollup -c && npm run tsd",
"prepare": "npm run build",
"dev": "rollup -cw",
"posttest": "agadoo src/internal/index.js",
"prepublishOnly": "npm run lint && npm run build && npm test",
"tsd": "node ./generate-types.js",
"lint": "eslint \"{src,test}/**/*.{ts,js}\" --cache"
},
"repository": {
"type": "git",
"url": "https://github.com/sveltejs/svelte.git",
"directory":"packages/svelte"
},
"keywords": [
"UI",
"framework",
"templates",
"templating"
],
"author": "Rich Harris",
"license": "MIT",
"bugs": {
"url": "https://github.com/sveltejs/svelte/issues"
},
"homepage": "https://svelte.dev",
"dependencies": {
"@ampproject/remapping": "^2.2.1",
"@jridgewell/sourcemap-codec": "^1.4.15",
"acorn": "^8.8.2",
"aria-query": "^5.1.3",
"axobject-query": "^3.1.1",
"code-red": "^1.0.0",
"css-tree": "^2.3.1",
"estree-walker": "^3.0.3",
"is-reference": "^3.0.1",
"locate-character": "^2.0.5",
"magic-string": "^0.30.0",
"periscopic": "^3.1.0"
},
"devDependencies": {
"@playwright/test": "^1.34.3",
"@rollup/plugin-commonjs": "^24.1.0",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-replace": "^5.0.2",
"@sveltejs/eslint-config": "^6.0.1",
"@types/aria-query": "^5.0.1",
"@types/estree": "^1.0.1",
"@types/node": "^14.14.31",
"@typescript-eslint/eslint-plugin": "^5.58.0",
"agadoo": "^3.0.0",
"esbuild": "^0.17.19",
"happy-dom": "^9.18.3",
"jsdom": "^21.1.1",
"kleur": "^4.1.5",
"rollup": "^3.20.2",
"source-map": "^0.7.4",
"tiny-glob": "^0.2.9",
"typescript": "^5.0.4",
"util": "^0.12.5",
"vitest": "^0.31.1"
}
}

@ -67,7 +67,7 @@ export default [
},
resolve(),
commonjs({
include: ['node_modules/**']
include: ['../../node_modules/**', 'node_modules/**']
}),
json()
],

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save