Skip to content

Visualize Your Ideas With Code

docs: remove migration section (#177)

Jacob804a082911b2
diff --git a/packages/docs/docs/migration/10.0.0.md b/packages/docs/docs/migration/10.0.0.md
deleted file mode 100644
index 26e3f800..00000000
--- a/packages/docs/docs/migration/10.0.0.md
+++ /dev/null
@@ -1,113 +0,0 @@
----
-title: v10.0.0
----
-
-# Migrating to version 10.0.0
-
-:::tip
-
-If you're starting a new project, you can quickly scaffold it using:
-
-```bash
-npm init @motion-canvas
-```
-
-:::
-
-## Install the new version
-
-Upgrade the versions of all motion-canvas packages in your `package.json` file:
-
-```diff
-- "@motion-canvas/core": "^9.0.0",
-- "@motion-canvas/ui": "^9.0.0",
-+ "@motion-canvas/core": "^10.0.0",
-+ "@motion-canvas/ui": "^10.0.0",
-```
-
-To apply the changes, run:
-
-```bash
-npm install
-```
-
-## Switch to Vite
-
-Since version 10, Motion Canvas no longer includes an out-of-the box webpack
-configuration. Instead, you should use `vite` together with our
-`@motion-canvas/vite-plugin` to build your projects. This requires more
-boilerplate code, but it allows developers to customize the build process
-according to their needs.
-
-First, install `vite` and `@motion-canvas/vite-plugin`:
-
-```bash
-npm install --save-dev vite @motion-canvas/vite-plugin
-```
-
-Next, create a `vite.config.ts` file in the root of your project with the
-following content:
-
-```ts
-import {defineConfig} from 'vite';
-import motionCanvas from '@motion-canvas/vite-plugin';
-
-export default defineConfig({
- plugins: [motionCanvas()],
-});
-```
-
-In `package.json`, replace the `motion-canvas` command with `vite`:
-
-```diff
- "scripts": {
-- "serve": "motion-canvas src/project.ts"
-+ "serve": "vite"
- }
-```
-
-Notice that we don't specify the input file when invoking the `vite` command. By
-default, our vite plugin will look for the `./src/project.ts` file and use it as
-an entry point. You can change that in `vite.config.ts`:
-
-```ts
-export default defineConfig({
- plugins: [
- motionCanvas({
- project: './src/custom.ts', // your custom entry file.
- }),
- ],
-});
-```
-
-## Update the entry file
-
-The project file (usually `src/project.ts`) needs the following adjustments:
-
-```diff
-- import '@motion-canvas/core/lib/patches';
-- import {bootstrap} from '@motion-canvas/core/lib/bootstrap';
-+ import {Project} from '@motion-canvas/core/lib';
-
- import example from './scenes/example.scene';
-
-- bootstrap({
-+ export default new Project({
- name: 'base-project',
- scenes: [example],
- });
-```
-
-First of all, we no longer import the `@motion-canvas/core/lib/patches` module
-at the top of the file.<br/> Additionally, the file should now export and
-instance of the `Project` class.
-
-## Reference the types
-
-The types exposed by Motion Canvas are no longer global.<br/> Because of this,
-you need to create an additional `motion-canvas.d.ts` file in the `src`
-directory:
-
-```ts
-/// <reference types="@motion-canvas/core/project" />
-```
diff --git a/packages/docs/docs/migration/11.0.0.md b/packages/docs/docs/migration/11.0.0.md
deleted file mode 100644
index 17ce029d..00000000
--- a/packages/docs/docs/migration/11.0.0.md
+++ /dev/null
@@ -1,75 +0,0 @@
----
-title: v11.0.0
----
-
-# Migrating to version 11.0.0
-
-:::tip
-
-If you're starting a new project, you can quickly scaffold it using:
-
-```bash
-npm init @motion-canvas
-```
-
-:::
-
-## Install the new version
-
-Upgrade the versions of all motion-canvas packages in your `package.json` file:
-
-```diff
-- "@motion-canvas/core": "^10.0.0",
-- "@motion-canvas/ui": "^10.0.0",
-- "@motion-canvas/vite-plugin": "^10.0.0",
-+ "@motion-canvas/core": "^11.0.0",
-+ "@motion-canvas/ui": "^11.0.0",
-+ "@motion-canvas/vite-plugin": "^11.0.0",
-```
-
-To apply the changes, run:
-
-```bash
-npm install
-```
-
-## Update project file
-
-Since version 11, scene file names no longer need to follow the pattern:
-`[name].scene.tsx`. Instead, a dedicated `?scene` query flag is used when
-importing a scene in the project file:
-
-```diff title="src/project.tsx"
-- import example from './scenes/example.scene';
-+ import example from './scenes/example?scene';
-
-export default new Project({
- name: 'project',
- scenes: [example],
-});
-```
-
-:::note
-
-In the above example, we also changed the name of the scene file from
-`example.scene.tsx` to `example.tsx`. This way we avoid the redundant `scene`
-when importing it.
-
-Of course, if you want, you can keep the old file name and import it as:
-`example.scene?scene`.
-
-:::
-
-This instructs our Vite plugin to turn the imported module into a scene. It will
-instantiate an adequate class, load its metadata, and set up hot module
-replacement.
-
-Thanks to this change, the name of your scene generator function no longer needs
-to match its file name. In fact, it can be completely omitted:
-
-```diff title="src/scenes/example.tsx"
-- export default makeKonvaScene(function* example(view) {
-+ export default makeKonvaScene(function* (view) {
- // ...
-});
-```
diff --git a/packages/docs/docs/migration/12.0.0.md b/packages/docs/docs/migration/12.0.0.md
deleted file mode 100644
index 3f6e0bc0..00000000
--- a/packages/docs/docs/migration/12.0.0.md
+++ /dev/null
@@ -1,17 +0,0 @@
----
-title: v12.0.0
----
-
-# Migrating to version 12.0.0
-
-Migrating from version 11 to 12 would be really cumbersome due to the amount of
-changes between the two versions.
-
-It's recommended to first finish any animations started with version 11 and only
-use version 12 for new projects.
-
-You can quickly scaffold a project using the following command:
-
-```bash
-npm init @motion-canvas
-```
diff --git a/packages/docs/docs/migration/12.1.0.md b/packages/docs/docs/migration/12.1.0.md
deleted file mode 100644
index aae5e72e..00000000
--- a/packages/docs/docs/migration/12.1.0.md
+++ /dev/null
@@ -1,53 +0,0 @@
----
-title: v12.1.0
----
-
-# Migrating to version 12.1.0
-
-:::tip
-
-If you're starting a new project, you can quickly scaffold it using:
-
-```bash
-npm init @motion-canvas
-```
-
-:::
-
-## Install the new version
-
-Update your packages:
-
-```bash
-npm update
-```
-
-## Update project file
-
-```diff title="src/project.tsx"
-- import {Project} from '@motion-canvas/core';
-+ import {makeProject} from '@motion-canvas/core';
-
-import scene from './scenes/example.tsx';
-
-- export default new Project({
-+ export default makeProject({
- scenes: [scene],
-});
-```
-
-## Update imports
-
-`createSignal` and `createComputed` have been moved to a new module:
-
-```diff title="src/project.tsx"
-- import {createSignal, createComputed} from '@motion-canvas/core/lib/utils';
-+ import {createSignal, createComputed} from '@motion-canvas/core/lib/signals';
-```
-
-`useRef` has been renamed to `createRef`:
-
-```diff title="src/project.tsx"
-- import {useRef} from '@motion-canvas/core/lib/utils';
-+ import {createRef} from '@motion-canvas/core/lib/utils';
-```
diff --git a/packages/docs/docs/migration/_category_.yml b/packages/docs/docs/migration/_category_.yml
deleted file mode 100644
index bad39362..00000000
--- a/packages/docs/docs/migration/_category_.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-label: Migration
-position: 4