Skip to content

Commit b8261c1

Browse files
authored
feat: config publishing workflow
1 parent 848250a commit b8261c1

File tree

5 files changed

+108
-1
lines changed

5 files changed

+108
-1
lines changed

.github/workflows/publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish
2+
on:
3+
workflow_run:
4+
workflows: ["CI"]
5+
types:
6+
- completed
7+
push:
8+
branches:
9+
- "main"
10+
11+
concurrency: ${{ github.workflow }}-${{ github.ref }}
12+
13+
jobs:
14+
publish:
15+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: pnpm/action-setup@v2
20+
with:
21+
version: 7
22+
- uses: actions/setup-node@v3
23+
with:
24+
node-version: 16.x
25+
cache: "pnpm"
26+
27+
- run: pnpm install --frozen-lockfile
28+
- name: Create Release Pull Request or Publish
29+
id: changesets
30+
uses: changesets/action@v1
31+
with:
32+
publish: pnpm run release
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 motion-canvas
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@coord/curves",
33
"private": false,
44
"version": "0.0.0",
5+
"license": "MIT",
56
"scripts": {
67
"build": "turbo run build",
78
"dev": "turbo run dev",
@@ -12,6 +13,7 @@
1213
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
1314
"changeset": "changeset",
1415
"version-packages": "changeset version",
16+
"release": "turbo run build lint test && changeset version && changeset publish",
1517
"clean": "rm -rf ./node_modules && turbo clean"
1618
},
1719
"devDependencies": {

packages/graph/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# @coord/graph
2+
The @coord/graph is a React Library that allows you to create mathematical visualizations on the web.
3+
4+
## Why use it?
5+
6+
I'm a big fans of tools like Desmos. However, I also realize that moving your math logic from code to a separate tool can sometimes be a hassle.
7+
8+
This library aims to solve this problem by allowing developers to utilize the best of coding and graphing tools in a single platform without the extra hassle.
9+
10+
It's still a work in progress, but I'm excited to share it with you and I hope you find it helpful!
11+
12+
Keep in mind that the API is still subject to change.
13+
14+
15+
## Installation
16+
17+
```bash
18+
npm install @coord/graph
19+
```
20+
21+
## Hello World
22+
23+
```tsx collapsed live
24+
import { Graph, Grid, Plot, useNavigationState } from "@coord/graph";
25+
26+
export default function MyGraph() {
27+
const [coordBox, setCoordBox] = useNavigationState();
28+
29+
return (
30+
<Graph
31+
coordBox={coordBox}
32+
onCoordBoxChange={setCoordBox}
33+
height={300}
34+
width="100%"
35+
>
36+
<Grid />
37+
<Plot.ofX f={(x) => Math.sin(x)} />
38+
</Graph>
39+
);
40+
}
41+
```
42+
43+
## Documentation
44+
45+
46+
Check out the official @coord/graph page at https://coord-docs.vercel.app/graph for more details.
47+
48+
49+
50+

packages/graph/src/components/Navigation.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ const Component = ({
9797
};
9898
}
9999
if (!memo) return;
100-
const sensitivityFactor = 0.5;
101100

102101
onCoordBoxChange(
103102
scaleBBoxAroundOrigin(

0 commit comments

Comments
 (0)