Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Get rid of vite #293

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
232 changes: 108 additions & 124 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
"lint-staged": "^15.1.0",
"prettier": "^3.1.0",
"prettier-plugin-organize-imports": "^3.2.4",
"typescript": "^5.2.2"
"typescript": "^5.2.2",
"vitest": "^0.34.6"
},
"lint-staged": {
"*.{ts,tsx}": "eslint --fix",
Expand Down
3 changes: 1 addition & 2 deletions packages/2d/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
"@revideo/ui": "0.5.9",
"clsx": "^2.0.0",
"jsdom": "^22.1.0",
"preact": "^10.19.2",
"vitest": "^0.34.6"
"preact": "^10.19.2"
},
"dependencies": {
"@codemirror/language": "^6.10.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/2d/src/lib/components/Layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -962,9 +962,9 @@ export class Layout extends Node {

@computed()
protected applyFont() {
const loadingFonts = Array.from(document.fonts).filter(
font => font.status === 'loading',
);
const loadingFonts = document.fonts
? Array.from(document.fonts).filter(font => font.status === 'loading')
: [];
if (loadingFonts.length > 0) {
DependencyContext.collectPromise(
(async () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/2d/src/lib/components/__tests__/mockScene2D.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export function mockScene2D() {
const playback = new PlaybackManager();
const status = new PlaybackStatus(playback);
const description = {
...makeScene2D(function* () {
...makeScene2D('scene 1', function* () {
// do nothing
}, 'scene'),
}),
name: 'test',
size: new Vector2(1920, 1080),
resolutionScale: 1,
Expand Down
3 changes: 2 additions & 1 deletion packages/2d/src/lib/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
}
]
},
"include": ["**/*"]
"include": ["**/*"],
"exclude": []
}
108 changes: 54 additions & 54 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -532,9 +532,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -819,9 +819,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -1106,9 +1106,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -1393,9 +1393,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -1680,9 +1680,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -1967,9 +1967,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -2253,9 +2253,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -2539,9 +2539,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -2823,9 +2823,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -3104,9 +3104,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -3383,9 +3383,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -3662,9 +3662,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -3941,9 +3941,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -4219,9 +4219,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -4497,9 +4497,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -4774,9 +4774,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -5050,9 +5050,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -5325,9 +5325,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -5600,9 +5600,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -5875,9 +5875,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -6150,9 +6150,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -6424,9 +6424,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -6698,9 +6698,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -6972,9 +6972,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -7250,9 +7250,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0.
* change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`.
When importing scenes in the project file, a dedicated `?scene` query param should be used:
When importing scenes in the project file, a dedicated `` query param should be used:
```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down Expand Up @@ -7847,11 +7847,11 @@ for more info.
- change the way scenes are imported

Scene files no longer need to follow the pattern: `[name].scene.tsx`. When
importing scenes in the project file, a dedicated `?scene` query param should be
importing scenes in the project file, a dedicated `` query param should be
used:

```ts
import example from './scenes/example?scene';
import example from './scenes/example';

export default new Project({
name: 'project',
Expand Down
3 changes: 1 addition & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"devDependencies": {
"@types/chroma-js": "2.4.4",
"@revideo/internal": "0.0.0",
"jsdom": "^22.1.0",
"vitest": "^0.34.6"
"jsdom": "^22.1.0"
}
}
5 changes: 0 additions & 5 deletions packages/core/project.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,4 @@ declare module '*.glsl' {
export = value;
}

declare module '*?scene' {
const value: import('./lib/scenes/Scene').FullSceneDescription;
export = value;
}

declare type Callback = (...args: any[]) => void;
Loading
Loading