Skip to content

Commit 7275119

Browse files
hannahli2010AndroxiumRobNadallinda-zheng
authored andcommitted
Beginnings of the bezier-rs math library (#662)
Co-authored-by: Thomas Cheng <[email protected]> Co-authored-by: Robert Nadal <[email protected]> Co-authored-by: ll2zheng <[email protected]>
1 parent 04d6bd9 commit 7275119

30 files changed

+20185
-2
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
// ESLint config
2525
"eslint.format.enable": true,
2626
"eslint.workingDirectories": [
27-
"./frontend"
27+
"./frontend",
28+
"./bezier-rs/docs/interactive-docs",
2829
],
2930
"eslint.validate": [
3031
"javascript",

Cargo.lock

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ members = [
44
"graphene",
55
"proc-macros",
66
"frontend/wasm",
7+
"bezier-rs/lib",
8+
"bezier-rs/docs/interactive-docs/wasm",
79
]
810

911
[profile.release.package.graphite-wasm]
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
const webpackConfigPath = require.resolve("@vue/cli-service/webpack.config.js");
2+
3+
module.exports = {
4+
root: true,
5+
env: {
6+
browser: true,
7+
node: true,
8+
es2020: true,
9+
},
10+
parserOptions: {
11+
ecmaVersion: 2020,
12+
// parser: '@typescript-eslint/parser'
13+
},
14+
extends: [
15+
// Vue-specific defaults
16+
"plugin:vue/vue3-essential",
17+
// Vue-compatible JS defaults
18+
"@vue/airbnb",
19+
// Vue-compatible TS defaults
20+
"@vue/typescript/recommended",
21+
// Vue-compatible Prettier defaults
22+
"plugin:prettier-vue/recommended",
23+
// General Prettier defaults
24+
"prettier",
25+
],
26+
settings: {
27+
// https://github.com/import-js/eslint-plugin-import#resolvers
28+
"import/resolver": {
29+
// `node` must be listed first!
30+
node: {},
31+
webpack: { config: webpackConfigPath },
32+
},
33+
// https://github.com/meteorlxy/eslint-plugin-prettier-vue
34+
"prettier-vue": {
35+
// Use Prettier to format the HTML, CSS, and JS blocks of .vue single-file components
36+
SFCBlocks: {
37+
template: true,
38+
style: true,
39+
script: true,
40+
},
41+
},
42+
},
43+
ignorePatterns: [
44+
// Ignore generated directories
45+
"node_modules/",
46+
"dist/",
47+
"pkg/",
48+
"wasm/pkg/",
49+
// Don't ignore JS and TS dotfiles in this folder
50+
"!.*.js",
51+
"!.*.ts",
52+
],
53+
rules: {
54+
// Standard ESLint config
55+
indent: "off",
56+
quotes: ["error", "double"],
57+
camelcase: ["error", { properties: "always" }],
58+
"linebreak-style": ["error", "unix"],
59+
"eol-last": ["error", "always"],
60+
"max-len": ["error", { code: 200, tabWidth: 4 }],
61+
"prefer-destructuring": "off",
62+
"no-console": "warn",
63+
"no-debugger": "warn",
64+
"no-param-reassign": ["error", { props: false }],
65+
"no-bitwise": "off",
66+
"no-shadow": "off",
67+
"no-use-before-define": "off",
68+
"no-restricted-imports": ["error", { patterns: [".*", "!@/*"] }],
69+
70+
// TypeScript plugin config
71+
"@typescript-eslint/indent": "off",
72+
"@typescript-eslint/camelcase": "off",
73+
"@typescript-eslint/no-use-before-define": "off",
74+
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_", ignoreRestSiblings: true }],
75+
"@typescript-eslint/explicit-function-return-type": ["error"],
76+
77+
// Import plugin config (used to intelligently validate module import statements)
78+
"import/prefer-default-export": "off",
79+
"import/no-relative-packages": "error",
80+
"import/order": [
81+
"error",
82+
{
83+
alphabetize: {
84+
order: "asc",
85+
caseInsensitive: true,
86+
},
87+
warnOnUnassignedImports: true,
88+
"newlines-between": "always-and-inside-groups",
89+
pathGroups: [
90+
{
91+
pattern: "**/*.vue",
92+
group: "unknown",
93+
position: "after",
94+
},
95+
],
96+
},
97+
],
98+
99+
// Prettier plugin config (used to enforce HTML, CSS, and JS formatting styles as an ESLint plugin, where fixes are reported to ESLint to be applied when linting)
100+
"prettier-vue/prettier": [
101+
"error",
102+
{
103+
tabWidth: 4,
104+
tabs: true,
105+
printWidth: 200,
106+
},
107+
],
108+
109+
// Vue plugin config (used to validate Vue single-file components)
110+
"vue/multi-word-component-names": "off",
111+
112+
// Vue Accessibility plugin config (included by airbnb defaults but undesirable for a web app project)
113+
"vuejs-accessibility/form-control-has-label": "off",
114+
"vuejs-accessibility/label-has-for": "off",
115+
"vuejs-accessibility/click-events-have-key-events": "off",
116+
},
117+
overrides: [
118+
{
119+
files: ["*.js"],
120+
rules: {
121+
"@typescript-eslint/explicit-function-return-type": ["off"],
122+
},
123+
},
124+
],
125+
};
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
/wasm/pkg
5+
6+
7+
# local env files
8+
.env.local
9+
.env.*.local
10+
11+
# Log files
12+
npm-debug.log*
13+
yarn-debug.log*
14+
yarn-error.log*
15+
pnpm-debug.log*
16+
17+
# Editor directories and files
18+
.idea
19+
.vscode
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# interactive-docs
2+
3+
## Project setup
4+
```
5+
npm install
6+
```
7+
8+
### Compiles and hot-reloads for development
9+
```
10+
npm run serve
11+
```
12+
13+
### Compiles and minifies for production
14+
```
15+
npm run build
16+
```
17+
18+
### Lints and fixes files
19+
```
20+
npm run lint
21+
```
22+
23+
### Customize configuration
24+
See [Configuration Reference](https://cli.vuejs.org/config/).
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"compilerOptions": {
3+
"jsx": "preserve",
4+
"target": "es5",
5+
"module": "esnext",
6+
"baseUrl": "./",
7+
"moduleResolution": "node",
8+
"paths": {
9+
"@/*": [
10+
"src/*"
11+
]
12+
},
13+
"lib": [
14+
"esnext",
15+
"dom",
16+
"dom.iterable",
17+
"scripthost"
18+
]
19+
}
20+
}

0 commit comments

Comments
 (0)