Skip to content

Visualize Your Ideas With Code

build: consistent script names (#748)

Jacobfd0d41103dee
diff --git a/README.md b/README.md
index 69edd0c4..84d88b56 100644
--- a/README.md
+++ b/README.md
@@ -55,23 +55,22 @@ packages.
### Developing Core & 2D
-When developing the core, start both `core:watch` and `template:serve`.
+When developing the core, start both `core:dev` and `template:dev`.
This will pick up any changes you make to the core package, automatically
rebuild the `template` project and refresh the page.
-Similarly, when developing the 2D package, start `2d:watch` and
-`template:serve`.
+Similarly, when developing the 2D package, start `2d:dev` and `template:dev`.
### Developing UI
If you want to develop the UI, first build the template project by running:
-`template:build`. Next, start `ui:serve`.
+`template:build`. Next, start `ui:dev`.
### Developing Player
Like with UI, to develop the player, first build the template: `template:build`.
-Then, start `player:serve`.
+Then, start `player:dev`.
## Contributing
diff --git a/package.json b/package.json
index 0c038b14..4c29e379 100644
--- a/package.json
+++ b/package.json
@@ -6,29 +6,29 @@
],
"scripts": {
"prepare": "husky install",
+ "core:dev": "npm run dev -w packages/core",
"core:build": "npm run build -w packages/core",
"core:bundle": "npm run bundle -w packages/core",
- "core:watch": "npm run watch -w packages/core",
"core:test": "npm run test -w packages/core",
+ "2d:dev": "npm run dev -w packages/2d",
"2d:build": "npm run build -w packages/2d",
"2d:bundle": "npm run bundle -w packages/2d",
- "2d:watch": "npm run watch -w packages/2d",
"2d:test": "npm run test -w packages/2d",
+ "ui:dev": "npm run dev -w packages/ui",
"ui:build": "npm run build -w packages/ui",
- "ui:serve": "npm run dev -w packages/ui",
"ui:showcase": "npm run showcase -w packages/ui",
"ui:type": "npm run type -w packages/ui",
- "template:serve": "npm run serve -w packages/template",
+ "template:dev": "npm run dev -w packages/template",
"template:build": "npm run build -w packages/template",
- "examples:serve": "npm run serve -w packages/examples",
+ "examples:dev": "npm run dev -w packages/examples",
"examples:build": "npm run build -w packages/examples",
- "player:serve": "npm run serve -w packages/player",
+ "player:dev": "npm run dev -w packages/player",
"player:build": "npm run build -w packages/player",
- "docs:start": "npm run start -w packages/docs",
+ "docs:dev": "npm run dev -w packages/docs",
"docs:build": "npm run build -w packages/docs",
"docs:blog": "npm run blog -w packages/docs",
+ "vite-plugin:dev": "npm run dev -w packages/vite-plugin",
"vite-plugin:build": "npm run build -w packages/vite-plugin",
- "vite-plugin:watch": "npm run watch -w packages/vite-plugin",
"e2e:test": "npm run test -w packages/e2e",
"eslint": "eslint \"**/*.ts?(x)\"",
"eslint:fix": "eslint --fix \"**/*.ts?(x)\"",
@@ -52,8 +52,5 @@
"lint-staged": {
"*.{ts,tsx}": "eslint --fix",
"*.{js,jsx,ts,tsx,md,scss}": "prettier --write"
- },
- "dependencies": {
- "@motion-canvas/core": "^3.0.0"
}
}
diff --git a/packages/2d/package.json b/packages/2d/package.json
index 05204719..8ccbe597 100644
--- a/packages/2d/package.json
+++ b/packages/2d/package.json
@@ -9,9 +9,9 @@
"main": "lib/index.js",
"types": "./lib/index.d.ts",
"scripts": {
+ "dev": "ttsc -w",
"build": "ttsc",
"bundle": "rollup -c rollup.config.mjs",
- "watch": "ttsc -w",
"test": "vitest"
},
"sideEffects": false,
diff --git a/packages/core/package.json b/packages/core/package.json
index 372e9477..9af022cc 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -8,9 +8,9 @@
"bugs": "https://github.com/motion-canvas/motion-canvas/issues",
"license": "MIT",
"scripts": {
+ "dev": "ttsc -p tsconfig.build.json -w",
"build": "ttsc -p tsconfig.build.json",
"bundle": "rollup -c rollup.config.mjs",
- "watch": "ttsc -p tsconfig.build.json -w",
"test": "vitest"
},
"sideEffects": false,
diff --git a/packages/docs/package.json b/packages/docs/package.json
index d89569aa..94531ed4 100644
--- a/packages/docs/package.json
+++ b/packages/docs/package.json
@@ -3,8 +3,8 @@
"version": "0.0.0",
"private": true,
"scripts": {
+ "dev": "docusaurus start --no-open",
"docusaurus": "docusaurus",
- "start": "docusaurus start --no-open",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
diff --git a/packages/examples/package.json b/packages/examples/package.json
index f05ee2f6..75c7091a 100644
--- a/packages/examples/package.json
+++ b/packages/examples/package.json
@@ -3,7 +3,7 @@
"private": true,
"version": "0.0.0",
"scripts": {
- "serve": "vite",
+ "dev": "vite",
"build": "tsc && vite build --base /examples/"
},
"dependencies": {
diff --git a/packages/player/package.json b/packages/player/package.json
index a47b5725..ed385cd8 100644
--- a/packages/player/package.json
+++ b/packages/player/package.json
@@ -10,7 +10,7 @@
"license": "MIT",
"type": "module",
"scripts": {
- "serve": "vite",
+ "dev": "vite",
"build": "tsc && vite build"
},
"repository": {
diff --git a/packages/template/package.json b/packages/template/package.json
index 404e6d6e..ee71ab74 100644
--- a/packages/template/package.json
+++ b/packages/template/package.json
@@ -7,7 +7,7 @@
"license": "MIT",
"main": "src/project.ts",
"scripts": {
- "serve": "vite",
+ "dev": "vite",
"build": "tsc && vite build"
},
"dependencies": {
diff --git a/packages/vite-plugin/package.json b/packages/vite-plugin/package.json
index 3170e040..baa705c5 100644
--- a/packages/vite-plugin/package.json
+++ b/packages/vite-plugin/package.json
@@ -8,8 +8,8 @@
"bugs": "https://github.com/motion-canvas/motion-canvas/issues",
"license": "MIT",
"scripts": {
- "build": "ttsc",
- "watch": "ttsc -w"
+ "dev": "ttsc -w",
+ "build": "ttsc"
},
"repository": {
"type": "git",