Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
thetarnav committed Jan 2, 2024
1 parent e6c0aa6 commit f7b5cac
Show file tree
Hide file tree
Showing 25 changed files with 7,915 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org
root = true

[*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{yml,yaml}]
indent_size = 2
66 changes: 66 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "no-only-tests", "eslint-comments"],
"ignorePatterns": ["node_modules", "dist"],
"parserOptions": {
"project": ["./tsconfig.json", "./tsconfig.node.json"],
"tsconfigRootDir": ".",
"sourceType": "module"
},
"rules": {
/*
forgot to remove/implement
*/
"no-console": "warn",
"no-debugger": "warn",
"prefer-const": "warn",
"require-await": "warn",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
"@typescript-eslint/no-unnecessary-condition": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "warn",
"@typescript-eslint/no-unnecessary-type-arguments": "warn",
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
"@typescript-eslint/no-unnecessary-type-constraint": "warn",
"@typescript-eslint/no-useless-empty-export": "warn",
"@typescript-eslint/no-empty-function": "warn",
"no-empty": "warn",
"@typescript-eslint/no-unused-expressions": [
"warn",
{"allowShortCircuit": true, "allowTernary": true}
],
"eslint-comments/no-unused-disable": "warn",
/*
code style | readability
*/
"@typescript-eslint/explicit-function-return-type": [
"warn",
{
"allowExpressions": true,
"allowTypedFunctionExpressions": true,
"allowHigherOrderFunctions": true,
"allowDirectConstAssertionInArrowFunctions": true,
"allowConciseArrowFunctionExpressionsStartingWithVoid": true,
"allowIIFEs": true
}
],
/*
prevent unexpected behavior
*/
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/switch-exhaustiveness-check": "warn",
"no-fallthrough": ["warn", {"allowEmptyCase": true}],
/*
tests
*/
"no-only-tests/no-only-tests": "warn"
}
}
46 changes: 46 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Format

on:
push:
branches: [main]

jobs:
format:
runs-on: ubuntu-latest

permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write

steps:
- uses: actions/checkout@v3

- uses: pnpm/action-setup@v2.2.4

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm

- name: Install dependencies
run: |
pnpm install --no-frozen-lockfile --ignore-scripts
git restore .
- name: Setup prettier cache
uses: actions/cache@v3
with:
path: node_modules/.cache/prettier
key: prettier-${{ github.sha }}
restore-keys: |
prettier-
- name: Format
run: pnpm run format

- name: Add, Commit and Push
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Format"
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and Test

on:
push:
branches: [main]
pull_request:
branches: [main]

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
build_test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: pnpm/action-setup@v2.2.4
with:
version: 8

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install --no-frozen-lockfile --ignore-scripts

- name: Build package
run: pnpm run build

- name: Test
run: pnpm run test

- name: Lint
run: pnpm lint
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.vscode/settings.json

dist
node_modules
20 changes: 20 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"trailingComma": "all",
"tabWidth": 4,
"printWidth": 100,
"semi": false,
"singleQuote": false,
"useTabs": true,
"arrowParens": "avoid",
"bracketSpacing": false,
"endOfLine": "lf",
"plugins": [],
"overrides": [
{
"files": ["*.yml", "*.yaml"],
"options": {
"tabWidth": 2
}
}
]
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Damian Tarnawski, David Di Biase

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# motionone

A repository containing the Solid MotionOne implementation.
74 changes: 74 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"name": "solid-motionone",
"version": "1.0.0",
"description": "A tiny, performant animation library for SolidJS",
"license": "MIT",
"author": "Damian Tarnawski <gthetarnav@gmail.com>; David Di Biase <dave.dibiase@gmail.com>",
"contributors": [],
"private": false,
"sideEffects": false,
"scripts": {
"prepublishOnly": "pnpm build",
"build": "tsup",
"test": "pnpm run test:client & pnpm run test:ssr",
"test:client": "vitest",
"test:ssr": "vitest --mode ssr",
"format": "prettier --cache --ignore-path .gitignore -w .",
"lint": "pnpm run lint:code & pnpm run lint:types",
"lint:code": "eslint --ignore-path .gitignore --max-warnings 0 src/**/*.{js,ts,tsx,jsx}",
"lint:types": "tsc --noEmit"
},
"type": "module",
"files": [
"dist"
],
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"browser": {},
"exports": {
"solid": "./dist/index.jsx",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"typesVersions": {},
"dependencies": {
"@motionone/dom": "^10.16.4",
"@motionone/utils": "^10.16.3",
"@solid-primitives/props": "^3.1.8",
"@solid-primitives/refs": "^1.0.5",
"@solid-primitives/transition-group": "^1.0.3",
"csstype": "^3.1.0"
},
"devDependencies": {
"@solidjs/testing-library": "^0.8.5",
"@types/node": "^20.10.6",
"@typescript-eslint/eslint-plugin": "^6.17.0",
"@typescript-eslint/parser": "^6.17.0",
"eslint": "^8.56.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-no-only-tests": "^3.1.0",
"jsdom": "^23.0.1",
"prettier": "^3.1.1",
"solid-js": "^1.8.7",
"tsup": "^8.0.1",
"tsup-preset-solid": "^2.2.0",
"typescript": "^5.3.3",
"vite-plugin-solid": "^2.8.0",
"vitest": "^1.1.1"
},
"peerDependencies": {
"solid-js": "^1.8.0"
},
"packageManager": "pnpm@8.13.0",
"engines": {
"node": ">=18",
"pnpm": ">=8.12.0"
}
}
Loading

0 comments on commit f7b5cac

Please sign in to comment.