Skip to content

Commit

Permalink
feat: switch to monorepo
Browse files Browse the repository at this point in the history
This PR merges the core and ui packages into one monorepo for easier maintenance.

Husky has been added to automate eslint, prettier and jest execution.

Commit messages are now validated both by the pre-commit hook and GitHub Actions.

Closes: #23
Closes: #86
Closes: #49
  • Loading branch information
aarthificial committed Aug 3, 2022
1 parent a3a2e06 commit 6c8d190
Show file tree
Hide file tree
Showing 152 changed files with 18,433 additions and 18,597 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
name: Release Package to GitHub
name: Publish Packages to GitHub

on: workflow_dispatch

env:
HUSKY: 0

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
cache: npm
- run: git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- run: git config --global user.name "github-actions[bot]"
- run: npm ci
- run: npm run build
- run: npm run docs
- run: npm run release
- run: npx lerna run build
- run: npx lerna publish --yes
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
25 changes: 19 additions & 6 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
name: Test and Build the Package
name: Verify Pull Request

on:
pull_request: {}

env:
HUSKY: 0

jobs:
build:
verification:
name: Verification
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- run: npm ci
- run: npm run lint
- run: npm run prettier
- run: npm run test
- run: npm run build
- name: Commit name
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --verbose
- name: ESLint
run: npx lerna run lint
- name: Prettier
run: npx lerna run prettier
- name: Tests
run: npx lerna run test
- name: Build
run: npx lerna run build
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
lib
api
dist
test
.idea
.idea
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit $1
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
npx --no -- jest --onlyChanged --config=packages/core/jest.config.js
22 changes: 0 additions & 22 deletions .releaserc

This file was deleted.

39 changes: 38 additions & 1 deletion docs/CHANGELOG.md → CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ yield* slideTranstion();

Any transitions must be rewritten to utilize `useTransition`.



# [7.0.0](https://github.com/motion-canvas/core/compare/v6.0.1...v7.0.0) (2022-07-14)


Expand All @@ -73,13 +75,17 @@ bootstrap(...);
import {getset} from '@motion-canvas/core/lib/decorators/getset';
```



## [6.0.1](https://github.com/motion-canvas/core/compare/v6.0.0...v6.0.1) (2022-07-01)


### Bug Fixes

* re-render the scene when canvas changes ([#55](https://github.com/motion-canvas/core/issues/55)) ([191f96d](https://github.com/motion-canvas/core/commit/191f96da1441bc37d6e61e1acdcfde6994a7f9f3))



# [6.0.0](https://github.com/motion-canvas/core/compare/v5.0.0...v6.0.0) (2022-07-01)


Expand All @@ -94,6 +100,8 @@ import {getset} from '@motion-canvas/core/lib/decorators/getset';

Scene files need to export a special `SceneDescription` object instead of a simple generator function.



# [5.0.0](https://github.com/motion-canvas/core/compare/v4.1.0...v5.0.0) (2022-06-29)


Expand All @@ -114,6 +122,8 @@ Scene files need to export a special `SceneDescription` object instead of a simp
The names of all public events now use the following pattern: "on[WhatHappened]".
Example: "onValueChanged".



# [4.1.0](https://github.com/motion-canvas/core/compare/v4.0.1...v4.1.0) (2022-06-22)


Expand All @@ -122,13 +132,17 @@ Example: "onValueChanged".
* improve surface clipping ([#41](https://github.com/motion-canvas/core/issues/41)) ([003b7d5](https://github.com/motion-canvas/core/commit/003b7d58d6490170cea81b2d1b37cf59b4d698cf))
* make surfaces transparent by default ([#42](https://github.com/motion-canvas/core/issues/42)) ([cd71285](https://github.com/motion-canvas/core/commit/cd712857579ec45b3e6f40d0e48fce80fefed5b9)), closes [#25](https://github.com/motion-canvas/core/issues/25)



## [4.0.1](https://github.com/motion-canvas/core/compare/v4.0.0...v4.0.1) (2022-06-22)


### Bug Fixes

* add missing public path ([#40](https://github.com/motion-canvas/core/issues/40)) ([48213de](https://github.com/motion-canvas/core/commit/48213de087d6bb35f29919f5588e3a4517e080b6))



# [4.0.0](https://github.com/motion-canvas/core/compare/v3.0.3...v4.0.0) (2022-06-22)


Expand All @@ -144,27 +158,35 @@ Example: "onValueChanged".
By default, importing images will now return their urls instead of a SpriteData object.
This behavior can be adjusted using the `?img` and `?anim` queries.



## [3.0.3](https://github.com/motion-canvas/core/compare/v3.0.2...v3.0.3) (2022-06-21)


### Bug Fixes

* display newlines in Code correctly ([#38](https://github.com/motion-canvas/core/issues/38)) ([df8f390](https://github.com/motion-canvas/core/commit/df8f390848d7a8e03193d64e460142e00ed95031))



## [3.0.2](https://github.com/motion-canvas/core/compare/v3.0.1...v3.0.2) (2022-06-17)


### Bug Fixes

* save time events only if they're actively used ([#35](https://github.com/motion-canvas/core/issues/35)) ([bd78c89](https://github.com/motion-canvas/core/commit/bd78c8967ba395beeb352006b5f33768b4a4c498)), closes [#33](https://github.com/motion-canvas/core/issues/33) [#34](https://github.com/motion-canvas/core/issues/34)



## [3.0.1](https://github.com/motion-canvas/core/compare/v3.0.0...v3.0.1) (2022-06-16)


### Bug Fixes

* fix meta file version and timing ([#32](https://github.com/motion-canvas/core/issues/32)) ([a369610](https://github.com/motion-canvas/core/commit/a36961007eb7ac238b87ade3a03da101a1940800))



# [3.0.0](https://github.com/motion-canvas/core/compare/v2.2.0...v3.0.0) (2022-06-16)


Expand All @@ -177,6 +199,8 @@ This behavior can be adjusted using the `?img` and `?anim` queries.

* change time events API



# [2.2.0](https://github.com/motion-canvas/core/compare/v2.1.1...v2.2.0) (2022-06-16)


Expand All @@ -189,6 +213,8 @@ This behavior can be adjusted using the `?img` and `?anim` queries.

* add ease back interp functions ([#30](https://github.com/motion-canvas/core/issues/30)) ([c11046d](https://github.com/motion-canvas/core/commit/c11046d939bf5a29e28bda0ef97feabe2f985a0f))



## [2.1.1](https://github.com/motion-canvas/core/compare/v2.1.0...v2.1.1) (2022-06-15)


Expand All @@ -198,6 +224,8 @@ This behavior can be adjusted using the `?img` and `?anim` queries.
* code will trigger PrismJS such that JSX is correctly highlighted ([#20](https://github.com/motion-canvas/core/issues/20)) ([b323231](https://github.com/motion-canvas/core/commit/b32323184b5f479bc09950fdf9c570b5276ea600)), closes [#17](https://github.com/motion-canvas/core/issues/17)
* fix hot reload ([#26](https://github.com/motion-canvas/core/issues/26)) ([2ad746e](https://github.com/motion-canvas/core/commit/2ad746e1eff705c2eb29ea9c83ad9810eeb54b05))



# [2.1.0](https://github.com/motion-canvas/core/compare/v2.0.0...v2.1.0) (2022-06-14)


Expand All @@ -211,6 +239,8 @@ This behavior can be adjusted using the `?img` and `?anim` queries.
* force rendering to restart seek time ([#14](https://github.com/motion-canvas/core/issues/14)) ([e94027a](https://github.com/motion-canvas/core/commit/e94027a36fe2a0b11f3aa42bb3fa869c10fbe1ea)), closes [#6](https://github.com/motion-canvas/core/issues/6)
* move back playhead by a frame ([#18](https://github.com/motion-canvas/core/issues/18)) ([b944cd7](https://github.com/motion-canvas/core/commit/b944cd71c075e10622bd7bc81de90024c73438b7))



# [2.0.0](https://github.com/motion-canvas/core/compare/v1.1.0...v2.0.0) (2022-06-12)


Expand All @@ -231,6 +261,8 @@ This behavior can be adjusted using the `?img` and `?anim` queries.

They should be imported from `@motion-canvas/core/lib/flow`.



# [1.1.0](https://github.com/motion-canvas/core/compare/v1.0.0...v1.1.0) (2022-06-08)


Expand All @@ -243,7 +275,9 @@ They should be imported from `@motion-canvas/core/lib/flow`.

* add support for npm workspaces ([741567f](https://github.com/motion-canvas/core/commit/741567f8af4185a2b1bc5284064514d96e75f5f2))

# 1.0.0 (2022-06-08)


# [1.0.0](https://github.com/motion-canvas/core/compare/49254fc36cc03c8f8557c14ff86ab38f56229b04...v1.0.0) (2022-06-08)


### Bug Fixes
Expand Down Expand Up @@ -301,3 +335,6 @@ They should be imported from `@motion-canvas/core/lib/flow`.
* use Web Audio API for waveform generation ([817e244](https://github.com/motion-canvas/core/commit/817e244bb2187532df7142199917412ccfe8d218))
* useAnimator utility ([ad32e8a](https://github.com/motion-canvas/core/commit/ad32e8a0add494021d4c5c9fe5b3915189f00a08))
* waveform data ([400a756](https://github.com/motion-canvas/core/commit/400a756ebf7ee174d8cbaf03f1f74eddd1b75925))



8 changes: 3 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,16 @@ the public release to npm, the version will be reset back to `1.0.0`.
git checkout -b my-fix-branch master
```
3. Update the code.
4. Format your code with prettier (`npm run prettier:fix`).
5. Make sure your code lints (`npm run lint:fix`)
6. Commit your changes using a **descriptive commit message** that follows
4. Commit your changes using a **descriptive commit message** that follows
[Angular Commit Message Conventions][commit-format].
```shell
git commit --all
```
7. Push your branch to GitHub:
5. Push your branch to GitHub:
```shell
git push origin my-fix-branch
```
8. In GitHub, send a pull request to [the master branch][master]
6. In GitHub, send a pull request to [the master branch][master]
and **request a review** from [aarthificial](https://github.com/aarthificial).

### Addressing review feedback
Expand Down

0 comments on commit 6c8d190

Please sign in to comment.