Skip to content

Commit

Permalink
Merge pull request #4446 from remotion-dev/npm-run-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyBurger authored Nov 1, 2024
2 parents dd877b8 + c4cf1cf commit 9492666
Show file tree
Hide file tree
Showing 35 changed files with 74 additions and 77 deletions.
2 changes: 1 addition & 1 deletion packages/create-video/src/patch-readme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const patchReadmeMd = (
return getInstallCommand(packageManager);
}

if (c.startsWith('npm start')) {
if (c.startsWith('npm run dev')) {
return getDevCommand(packageManager, template);
}

Expand Down
8 changes: 4 additions & 4 deletions packages/create-video/src/pkg-managers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,19 @@ export const getInstallCommand = (manager: PackageManager) => {

const getStartCommand = (manager: PackageManager) => {
if (manager === 'npm') {
return `npm start`;
return `npm run dev`;
}

if (manager === 'yarn') {
return `yarn start`;
return `yarn dev`;
}

if (manager === 'pnpm') {
return `pnpm start`;
return `pnpm run dev`;
}

if (manager === 'bun') {
return `bun start`;
return `bun run dev`;
}
};

Expand Down
6 changes: 3 additions & 3 deletions packages/docs/docs/contributing/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ You can start the Testbed using

```sh
cd packages/example
pnpm start
pnpm run dev
```

You can render a test video using

```sh
cd packages/example
pnpm render
pnpm exec remotion render
```

You can run tests using
Expand All @@ -99,7 +99,7 @@ You can test changes to [@remotion/player](https://remotion.dev/docs/player) by

```sh
cd packages/player-example
pnpm start
pnpm run dev
```

For information about testing, please consult [TESTING.md](https://github.com/remotion-dev/remotion/blob/main/TESTING.md). Issues and pull requests of all sorts are welcome!
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/docs/env-variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
image: /generated/articles-docs-env-variables.png
id: env-variables
title: Environment variables
crumb: "How To"
crumb: 'How To'
---

_Available from v2.1.2._
Expand All @@ -16,7 +16,7 @@ If you want to pass an environment variable from the CLI, you need to prefix it
You can pass environment variables in development mode and while rendering. For example:

```bash
REMOTION_MY_VAR=hello_world npm start
REMOTION_MY_VAR=hello_world npm run dev
```

In your project, you can access the variable using `process.env.REMOTION_MY_VAR`.
Expand Down
6 changes: 3 additions & 3 deletions packages/docs/docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ slug: /
crumb: "Let's begin!"
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

## Prerequisites

Expand Down Expand Up @@ -81,7 +81,7 @@ values={[
After the project has been scaffolded, we recommend to open the project in your text editor and starting the [Remotion Studio](/docs/studio):

```bash
npm start
npm run dev
```

</TabItem>
Expand Down
12 changes: 8 additions & 4 deletions packages/docs/docs/preview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
image: /generated/articles-docs-preview.png
title: Preview your video
id: preview
crumb: "Timeline basics"
crumb: 'Timeline basics'
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

You can preview your video by starting the [Remotion Studio](/docs/studio):

Expand All @@ -20,7 +20,7 @@ values={[
<TabItem value="Regular templates">

```bash
npm start
npm run dev
```

</TabItem>
Expand All @@ -45,3 +45,7 @@ A server will be started on port `3000` (or a higher port if it isn't available)
<img src="/img/timeline.png"></img>

Learn more about the [Remotion Studio](/docs/studio).

:::note
In older projects, `npm start` was used over `npm run dev`.
:::
2 changes: 1 addition & 1 deletion packages/example-without-zod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"author": "Jonny Burger",
"main": "dist/index.js",
"scripts": {
"start": "remotion preview",
"dev": "remotion studio",
"render": "remotion render react-svg"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
],
"scripts": {
"formatting": "prettier src --check",
"start": "remotion studio --props src/my-props.json",
"dev": "remotion studio --props src/my-props.json",
"start-bun": "PATCH_BUN_DEVELOPMENT=true bun --bun remotion studio",
"start-js": "remotion preview src/entry.jsx",
"comps": "remotion compositions",
Expand Down
9 changes: 1 addition & 8 deletions packages/it-tests/src/templates/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@ const publish = async (template: Template) => {
.split('\n')
.filter(Boolean);

const branchName = `${Math.random().toString().replace('0.', '')}`;

await $`git clone git@github.com:${template.org}/${template.repoName}.git ${workingDir} --depth 1`;

const defaultBranch = await $`git branch --show-current`
.cwd(workingDir)
.text();
await $`git checkout -b ${branchName}`.cwd(workingDir);
const existingFilesInRepo = await $`git ls-files`.cwd(workingDir).quiet();
for (const file of existingFilesInRepo.stdout
.toString('utf-8')
Expand Down Expand Up @@ -64,11 +61,7 @@ const publish = async (template: Template) => {
}

await $`git commit -m "Update template"`.cwd(workingDir);
await $`git diff ${defaultBranch.trim()} ${branchName}`
.cwd(workingDir)
.quiet()
.text();
await $`git push origin ${branchName}`.cwd(workingDir);
await $`git push origin ${defaultBranch.trim()}`.cwd(workingDir);
};

for (const template of folders) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ export const lockFilePaths: LockfilePath[] = [
path: 'package-lock.json',
manager: 'npm',
installCommand: 'npm i',
startCommand: 'npm start',
startCommand: 'npx remotion studio',
},
{
path: 'yarn.lock',
manager: 'yarn',
installCommand: 'yarn add',
startCommand: 'yarn start',
startCommand: 'yarn remotion studio',
},
{
path: 'pnpm-lock.yaml',
manager: 'pnpm',
installCommand: 'pnpm i',
startCommand: 'pnpm start',
startCommand: 'pnpm exec remotion studio',
},
{
path: 'bun.lockb',
manager: 'bun',
installCommand: 'bun i',
startCommand: 'bun start',
startCommand: 'bunx remotion studio',
},
];

Expand Down
2 changes: 1 addition & 1 deletion packages/template-audiogram/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ npm install
**Start Preview**

```console
npm start
npm run dev
```

**Render video**
Expand Down
2 changes: 1 addition & 1 deletion packages/template-audiogram/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"description": "My Remotion video",
"scripts": {
"start": "remotion studio",
"dev": "remotion studio",
"build": "remotion render Audiogram out/video.mp4",
"upgrade": "remotion upgrade",
"test": "eslint src --ext ts,tsx,js,jsx && tsc"
Expand Down
2 changes: 1 addition & 1 deletion packages/template-blank/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ npm install
**Start Preview**

```console
npm start
npm run dev
```

**Render video**
Expand Down
2 changes: 1 addition & 1 deletion packages/template-blank/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"description": "My Remotion video",
"scripts": {
"start": "remotion studio",
"dev": "remotion studio",
"build": "remotion render MyComp out/video.mp4",
"upgrade": "remotion upgrade",
"test": "eslint src --ext ts,tsx,js,jsx && tsc"
Expand Down
2 changes: 1 addition & 1 deletion packages/template-code-hike/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ npm i
**Start Preview**

```console
npm start
npm run dev
```

**Change code snippets**
Expand Down
2 changes: 1 addition & 1 deletion packages/template-code-hike/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"typescript": "5.5.4"
},
"scripts": {
"start": "remotion studio",
"dev": "remotion studio",
"build": "remotion render Main out/video.mp4",
"upgrade": "remotion upgrade",
"test": "eslint src --ext ts,tsx,js,jsx && tsc"
Expand Down
2 changes: 1 addition & 1 deletion packages/template-helloworld/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ npm install
**Start Preview**

```console
npm start
npm run dev
```

**Render video**
Expand Down
2 changes: 1 addition & 1 deletion packages/template-helloworld/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"description": "My Remotion video",
"scripts": {
"start": "remotion studio",
"dev": "remotion studio",
"build": "remotion render HelloWorld out/video.mp4",
"upgrade": "remotion upgrade",
"test": "eslint src --ext ts,tsx,js,jsx && tsc"
Expand Down
2 changes: 1 addition & 1 deletion packages/template-javascript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ npm install
**Start Preview**

```console
npm start
npm run dev
```

**Render video**
Expand Down
2 changes: 1 addition & 1 deletion packages/template-javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"description": "My Remotion video",
"scripts": {
"start": "remotion studio",
"dev": "remotion studio",
"build": "remotion render HelloWorld out/video.mp4",
"upgrade": "remotion upgrade",
"test": "eslint src --ext ts,tsx,js,jsx"
Expand Down
2 changes: 1 addition & 1 deletion packages/template-overlay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ npm i
**Start Preview**

```console
npm start
npm run dev
```

**Render video**
Expand Down
2 changes: 1 addition & 1 deletion packages/template-overlay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"description": "My Remotion video",
"scripts": {
"start": "remotion studio",
"dev": "remotion studio",
"build": "remotion render",
"upgrade": "remotion upgrade",
"test": "eslint src --ext ts,tsx,js,jsx && tsc"
Expand Down
2 changes: 1 addition & 1 deletion packages/template-remix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ npm run build
Start the app in production mode (after build is done):

```
npm start
npm run dev
```

Start the Remotion preview:
Expand Down
6 changes: 3 additions & 3 deletions packages/template-skia/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ npm install
**Start Preview**

```console
npm start
npm run dev
```

**Render video**
Expand All @@ -43,11 +43,11 @@ This template uses a [custom Webpack override](https://www.remotion.dev/docs/web

```ts
bundle(entry, () => undefined, {
webpackOverride: (config) => enableSkia(config),
webpackOverride: (config) => enableSkia(config),
});
// or
deploySite({
webpackOverride: (config) => enableSkia(config),
webpackOverride: (config) => enableSkia(config),
});
```

Expand Down
2 changes: 1 addition & 1 deletion packages/template-skia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"description": "My Remotion video",
"scripts": {
"start": "remotion studio",
"dev": "remotion studio",
"build": "remotion render HelloSkia out/video.mp4",
"upgrade": "remotion upgrade",
"test": "eslint src --ext ts,tsx,js,jsx && tsc"
Expand Down
2 changes: 1 addition & 1 deletion packages/template-stargazer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ npm i
4. Start the preview:

```
npm start
npm run dev
```

5. Open the right sidebar, enter your repo name and click "Render".
Expand Down
2 changes: 1 addition & 1 deletion packages/template-stargazer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "template-stargazer",
"version": "1.0.0",
"scripts": {
"start": "remotion studio",
"dev": "remotion studio",
"build": "remotion render main out/Main.mp4 --log verbose",
"test": "eslint src --ext ts,tsx,js,jsx && tsc"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/template-three/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ npm install
**Start Preview**

```console
npm start
npm run dev
```

**Render MP4 video**
Expand Down
2 changes: 1 addition & 1 deletion packages/template-three/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"description": "A React Three Fiber Project",
"scripts": {
"start": "remotion studio",
"dev": "remotion studio",
"build": "remotion render Scene",
"upgrade": "remotion upgrade",
"test": "eslint src --ext ts,tsx,js,jsx && tsc"
Expand Down
2 changes: 1 addition & 1 deletion packages/template-tiktok/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ npm i
**Start Preview**

```console
npm start
npm run dev
```

**Render video**
Expand Down
Loading

0 comments on commit 9492666

Please sign in to comment.