Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
aarthificial committed May 10, 2023
0 parents commit 7a01fd5
Show file tree
Hide file tree
Showing 43 changed files with 11,873 additions and 0 deletions.
81 changes: 81 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"env": {
"browser": true,
"es2021": true
},
"ignorePatterns": [
"**/*.js",
"**/*.d.ts",
"packages/template",
"packages/create/template-*"
],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "eslint-plugin-tsdoc"],
"rules": {
"require-yield": "off",
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-namespace": "off",
"tsdoc/syntax": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "default",
"format": ["camelCase"],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid",
"filter": {
"regex": "^(__html)$",
"match": false
}
},
{
"selector": "variable",
"format": ["camelCase", "PascalCase"]
},
{
"selector": "variable",
"modifiers": ["global"],
"format": ["PascalCase", "UPPER_CASE"]
},
{
"selector": "variable",
"modifiers": ["exported"],
"format": ["camelCase", "PascalCase"]
},
{
"selector": "variable",
"modifiers": ["exported", "global"],
"format": ["camelCase", "PascalCase", "UPPER_CASE"]
},
{
"selector": ["parameter", "variable"],
"modifiers": ["unused"],
"format": ["camelCase"],
"leadingUnderscore": "require"
},
{
"selector": "function",
"modifiers": ["global"],
"format": ["camelCase", "PascalCase"]
},
{
"selector": ["typeLike", "enumMember"],
"format": ["PascalCase"]
},
{
"selector": "typeParameter",
"format": ["PascalCase"],
"prefix": ["T"]
}
]
}
}
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Bug report
about: Create a report to help improve Motion Canvas
title: ''
labels: b-bug
assignees: aarthificial
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior.

**Expected behavior**
If applicable, a clear and concise description of what you expected to happen.

**Console errors**
If applicable, add a screenshot of the errors displayed in the console of your browser (F12) or your terminal.

**Package versions:**

- ffmpeg: [e.g. 1.0.0]

**Additional context**
Add any other context about the problem here.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature request
about: Suggest an idea for Motion Canvas
title: ''
labels: b-enhancement
assignees: aarthificial
---

**Description**
A clear and concise description of why the feature is needed.
What problem does it aim to fix?
What benefits does it bring?

**Proposed solution**
A clear and concise description of how the feature would work.
If applicable, provide an example of the API and how it would be used.

**Considered alternatives**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
45 changes: 45 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Publish Packages to NPM

on:
workflow_dispatch:
inputs:
releaseType:
type: choice
description: Release type
required: true
options:
- release
- prerelease
- graduate

env:
HUSKY: 0

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
NPM_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
GH_TOKEN: ${{secrets.PUBLISH_TOKEN}}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{secrets.PUBLISH_TOKEN}}
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
cache: npm
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "motion-canvas-bot"
- run: npm ci
- run: npx lerna run build
- if: ${{ inputs.releaseType == 'release' }}
run: npx lerna publish --yes
- if: ${{ inputs.releaseType == 'prerelease' }}
run: npx lerna publish --yes --conventional-prerelease --dist-tag alpha
- if: ${{ inputs.releaseType == 'graduate' }}
run: npx lerna publish --yes --conventional-graduate
67 changes: 67 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Verify Pull Request

on:
pull_request: {}
workflow_dispatch: {}

env:
HUSKY: 0

jobs:
commit:
name: Commit name
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: npx commitlint --from ${{ github.event.pull_request.base.sha }} --verbose
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- run: npm ci
- run: npm run eslint
prettier:
name: Code style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- run: npm ci
- run: npm run prettier
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- run: npm ci
- run: npx lerna run test
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- run: npm ci
- run: npx lerna run build
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
lib
dist
test
.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 -- vitest --changed --run -r packages/core/
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
access = public
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
lib
dist
static
.git
.github
package.json
package-lock.json
CHANGELOG.md
lerna.json
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"bracketSpacing": false,
"singleQuote": true,
"printWidth": 80,
"trailingComma": "all",
"arrowParens": "avoid",
"proseWrap": "always"
}
Loading

0 comments on commit 7a01fd5

Please sign in to comment.