-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: switch to lottie_worker, updated code style (#210)
* feat: switch to lottie_worker, updated code style
- Loading branch information
1 parent
56e1f4f
commit cec4885
Showing
67 changed files
with
5,542 additions
and
43,117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "master", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@lottiefiles/lottie-player': major | ||
--- | ||
|
||
uses the lottie_worker script and deprecates html renderer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,6 @@ dist/ | |
# Testing | ||
coverage/ | ||
examples/ | ||
cypress/ | ||
cypress.config.ts | ||
commitlint.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,59 @@ | ||
/** | ||
* Copyright 2022 Design Barn Inc. | ||
* Copyright 2023 Design Barn Inc. | ||
*/ | ||
|
||
module.exports = { | ||
plugins: ["@lottiefiles", "only-warn"], | ||
root: true, | ||
|
||
plugins: ['@lottiefiles'], | ||
|
||
extends: [ | ||
// "plugin:@lottiefiles/nodejs", | ||
"plugin:@lottiefiles/typescript", | ||
"plugin:@lottiefiles/typescript-typechecking", | ||
"plugin:@lottiefiles/prettier", | ||
'plugin:@lottiefiles/esnext', | ||
'plugin:@lottiefiles/typescript', | ||
'plugin:@lottiefiles/typescript-typechecking', | ||
'plugin:@lottiefiles/nodejs', | ||
'plugin:@lottiefiles/prettier', | ||
], | ||
|
||
globals: { | ||
cep: true, | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['*.ts', '*.tsx', '*.cts', '*.mts'], | ||
|
||
parserOptions: { | ||
sourceType: "module", | ||
project: "tsconfig.json", | ||
ecmaVersion: 2017, | ||
}, | ||
parserOptions: { | ||
project: ['./packages/*/tsconfig.json', './tsconfig.json'], | ||
tsconfigRootDir: __dirname, | ||
ecmaversion: 2022, | ||
}, | ||
}, | ||
|
||
// Allow code in bin and scripts folders to do CLI things | ||
{ | ||
files: ['**/@(bin|scripts|examples)/**/*.@(js|ts|cjs|mjs|cts|mts)'], | ||
rules: { | ||
'no-console': 'off', | ||
'node/shebang': 'off', | ||
}, | ||
}, | ||
], | ||
|
||
rules: { | ||
"no-console": "warn", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"jsx-a11y/anchor-is-valid": "off", | ||
'default-param-last': 'off', | ||
'@typescript-eslint/default-param-last': ['error'], | ||
'@typescript-eslint/prefer-for-of': 'off', | ||
'@typescript-eslint/dot-notation': 'off', | ||
'no-case-declarations': 'off', | ||
|
||
// Disable project specific | ||
'func-style': 'off', | ||
|
||
// Disable the async generator warning | ||
'no-restricted-syntax': 'off', | ||
|
||
// Disable deprecation testing | ||
'deprecation/deprecation': 'off', | ||
|
||
'no-undefined': 'off', | ||
'import/extensions': 'off', | ||
'no-invalid-this': 'off', | ||
}, | ||
ignorePatterns: ["node_modules", "dist", "packages"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,112 +1,131 @@ | ||
name: Release | ||
name: main | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
validate: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
|
||
strategy: | ||
matrix: | ||
node-version: [14.x] | ||
|
||
steps: | ||
- name: Checkout | ||
- name: 🛑 Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@0.9.0 | ||
|
||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: ⎔ Setup pnpm@7 | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Cache NPM | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-npm | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
- name: Setup Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
version: 7 | ||
|
||
- name: ⎔ Setup Node@18 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
registry-url: "https://npm.pkg.github.com" | ||
- name: Install dependencies | ||
run: yarn | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Build project | ||
run: yarn build | ||
- name: Serve example app | ||
continue-on-error: false | ||
run: yarn run serve | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Build project and run tests | ||
continue-on-error: false | ||
run: yarn run run-tests | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
cache: 'pnpm' | ||
node-version: 18 | ||
# scope: "@lottiefiles" | ||
# registry-url: "https://npm.pkg.github.com/" | ||
# always-auth: true | ||
|
||
- name: 📥 Download deps | ||
run: pnpm install | ||
|
||
- name: 🏗 Build | ||
run: pnpm build | ||
|
||
# - name: 🔍 Verify types | ||
# run: pnpm type-check | ||
|
||
- name: 💅 Verify format (`pnpm format` committed?) | ||
run: pnpm format --check --no-write | ||
|
||
# - name: 🕵️ Lint | ||
# run: pnpm lint | ||
|
||
release-npm: | ||
needs: build | ||
name: Release npm | ||
- name: 🛡️ Test | ||
run: pnpm test | ||
release: | ||
needs: validate | ||
runs-on: ubuntu-latest | ||
if: ${{ github.repository == 'LottieFiles/lottie-player' && github.event_name == 'push' }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: ⎔ Setup pnpm@7 | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
registry-url: https://registry.npmjs.org/ | ||
- run: yarn install | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Build project | ||
continue-on-error: false | ||
run: yarn build | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- run: npm publish --access public | ||
version: 7 | ||
|
||
- name: ⎔ Setup Node@18 for Github Packages | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: 'pnpm' | ||
node-version: 18 | ||
# scope: "@lottiefiles" | ||
# registry-url: "https://npm.pkg.github.com/" | ||
# always-auth: true | ||
|
||
- name: 📥 Download deps | ||
run: pnpm install | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.GPR_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPMJS_TOKEN }} | ||
GIT_COMMIT: ${{ github.sha }} | ||
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }} | ||
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} | ||
GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }} | ||
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }} | ||
|
||
release-gpr: | ||
needs: build | ||
name: Release gpr | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
|
||
- name: 🏗 Build | ||
run: pnpm build | ||
|
||
- name: Setup npmrc | ||
run: echo "//registry.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc | ||
|
||
- name: 🚀 Release to Github Packages | ||
uses: changesets/action@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
registry-url: https://npm.pkg.github.com/ | ||
scope: "@lottiefiles" | ||
- run: yarn install | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Build project | ||
continue-on-error: false | ||
run: yarn build | ||
commit: 'chore: 🤖 update versions' | ||
title: 'chore: 🤖 update versions' | ||
publish: pnpm release:publish | ||
version: pnpm release:version | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- run: | ||
echo "//npm.pkg.github.com:_authToken=${{ secrets.GITHUB_TOKEN }}" > | ||
~/.npmrc | ||
- run: npm publish --@lottiefiles:registry=https://npm.pkg.github.com/ | ||
|
||
- name: Delete npmrc | ||
run: rm -rf ~/.npmrc | ||
|
||
- name: ⎔ Setup Node@18 for NPM | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: 'pnpm' | ||
node-version: 18 | ||
scope: '@lottiefiles' | ||
registry-url: https://registry.npmjs.org/ | ||
|
||
- name: Setup npmrc | ||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPMJS_TOKEN }}" >> ~/.npmrc | ||
|
||
- name: 🚀 Release to NPM | ||
uses: changesets/action@v1 | ||
with: | ||
commit: 'chore: 🤖 update versions' | ||
title: 'chore: 🤖 update versions' | ||
publish: pnpm release:publish | ||
version: pnpm release:version | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPMJS_TOKEN }} | ||
GIT_COMMIT: ${{ github.sha }} | ||
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }} | ||
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} | ||
GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }} | ||
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }} | ||
|
||
# - name: 🏷 Push tags | ||
# uses: changesets/action@v1 | ||
# with: | ||
# commit: "chore: 🤖 update versions" | ||
# title: "chore: 🤖 update versions" | ||
# tag: pnpm release:tag | ||
# # publish: pnpm release:publish | ||
# version: pnpm release:version | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# NPM_TOKEN: ${{ secrets.NPMJS_TOKEN }} | ||
# NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
coverage/ | ||
cypress/ | ||
dist/ | ||
.changeset/ | ||
.nyc_output | ||
CHANGELOG.md | ||
cypress.config.ts | ||
pnpm-lock.yaml | ||
README.md | ||
src/index.html | ||
src/tgs-player-demo.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.