Skip to content

Commit dc9093b

Browse files
committed
chore: Added boilerplate files to start project
1 parent 270d5db commit dc9093b

14 files changed

+3993
-0
lines changed

.babelrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"presets": [[
3+
"@babel/preset-env", {
4+
loose: true,
5+
modules: false,
6+
targets: ">1%, not dead, not ie 11, not op_mini all"
7+
}],
8+
"@babel/preset-react"
9+
],
10+
"plugins": []
11+
}

.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
charset = utf-8
12+
indent_style = space
13+
indent_size = 2
14+
15+
# Matches the exact files either package.json or .travis.yml
16+
[{package.json,.travis.yml}]
17+
indent_style = space
18+
indent_size = 2
19+
20+
[*.md]
21+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
tests
2+
package.json
3+
node_modules
4+
*.css
5+
*.md

.eslintrc

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"extends": ["airbnb-base", "prettier", "plugin:react/recommended"],
3+
"parserOptions": {
4+
"ecmaVersion": 2018,
5+
"sourceType": "module"
6+
},
7+
"env": {
8+
"browser": true,
9+
"node": true,
10+
"es6": true,
11+
"mocha": true,
12+
"jest": true,
13+
},
14+
"plugins": [
15+
"react-hooks"
16+
],
17+
"settings": {
18+
"react": {
19+
"pragma": "React",
20+
"version": "detect"
21+
}
22+
},
23+
"rules": {
24+
"no-unused-vars": [
25+
"error",
26+
{
27+
"vars": "local",
28+
"args": "none"
29+
}
30+
],
31+
"no-plusplus": "off",
32+
"no-underscore-dangle": "off",
33+
"react-hooks/rules-of-hooks": "error",
34+
"react-hooks/exhaustive-deps": "warn"
35+
}
36+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,4 @@ typings/
5959

6060
# next.js build output
6161
.next
62+
.DS_Store

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
examples/

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist
2+
node_modules
3+
coverage
4+
build

.prettierrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"printWidth": 80,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"semi": true,
6+
"singleQuote": true,
7+
"trailingComma": "all",
8+
"bracketSpacing": false,
9+
"jsxBracketSameLine": false,
10+
"proseWrap": "always"
11+
}
12+

examples/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('hello world');

package.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"name": "p5-react-renderer",
3+
"version": "0.0.1",
4+
"description": "React-fiber renderer for p5.js",
5+
"main": "dist/index.cjs.js",
6+
"module": "dist/index.esm.js",
7+
"jsnext:main": "dist/parallax-provider.esm.js",
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/adiman9/p5-react-renderer.git"
11+
},
12+
"author": "Adrian Henry <[email protected]>",
13+
"license": "MIT",
14+
"scripts": {
15+
"build": "rollup -c",
16+
"dev": "rollup -c -w",
17+
"lint": "eslint src",
18+
"clean": "rimraf dist",
19+
"precommit": "lint-staged",
20+
"format": "prettier --write \"src/**/*.+(js|md|ts|css|sass|less|graphql|yml|yaml|scss|json|vue)\"",
21+
"test": "echo \"Error: no test specified\" && exit 1",
22+
"prepublishOnly": "npm run clean && npm run lint && npm run test && npm run build"
23+
},
24+
"lint-staged": {
25+
"**/*.+(js|md|ts|css|sass|less|graphql|yml|yaml|scss|json|vue)": [
26+
"eslint --fix",
27+
"prettier --write",
28+
"git add"
29+
]
30+
},
31+
"files": [
32+
"dist"
33+
],
34+
"dependencies": {
35+
"react": "^16.8.4",
36+
"react-reconciler": "^0.20.2"
37+
},
38+
"devDependencies": {
39+
"@babel/cli": "^7.2.3",
40+
"@babel/core": "^7.3.4",
41+
"@babel/preset-env": "^7.3.4",
42+
"@babel/preset-react": "^7.0.0",
43+
"babel-core": "7.0.0-bridge.0",
44+
"babel-eslint": "^10.0.1",
45+
"eslint": "^5.15.1",
46+
"eslint-config-airbnb-base": "^13.1.0",
47+
"eslint-config-prettier": "^4.1.0",
48+
"eslint-plugin-import": "^2.16.0",
49+
"eslint-plugin-react": "^7.12.4",
50+
"eslint-plugin-react-hooks": "^1.4.0",
51+
"husky": "^1.3.1",
52+
"lint-staged": "^8.1.5",
53+
"prettier": "^1.16.4",
54+
"rimraf": "^2.6.3",
55+
"rollup": "^1.5.0",
56+
"rollup-plugin-babel": "^4.3.2"
57+
},
58+
"peerDependencies": {
59+
"p5": "^0.7.3",
60+
"react": ">=16.8",
61+
"react-dom": ">=16.8"
62+
},
63+
"keywords": [
64+
"react",
65+
"renderer",
66+
"fiber",
67+
"p5",
68+
"p5js",
69+
"p5.js"
70+
],
71+
"husky": {
72+
"hooks": {
73+
"pre-commit": "npm run precommit"
74+
}
75+
},
76+
"bugs": {
77+
"url": "https://github.com/adiman9/p5-react-renderer/issues"
78+
},
79+
"homepage": "https://github.com/adiman9/p5-react-renderer#readme"
80+
}

rollup.config.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import pkg from './package.json';
2+
3+
const rollupBabel = require('rollup-plugin-babel');
4+
5+
const LIB_NAME = 'p5-react-renderer';
6+
7+
export default {
8+
input: 'src/index.js',
9+
output: [
10+
{
11+
name: LIB_NAME,
12+
file: pkg.main,
13+
format: 'cjs',
14+
},
15+
{
16+
name: LIB_NAME,
17+
file: pkg.module,
18+
format: 'es',
19+
},
20+
],
21+
plugins: [
22+
rollupBabel({
23+
exclude: '**/node_modules/**',
24+
babelrc: true,
25+
runtimeHelpers: false,
26+
}),
27+
],
28+
};

src/canvas.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import React from 'react';
2+
3+
const Canvas = () => {
4+
return <canvas />;
5+
};
6+
7+
export default Canvas;

src/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Canvas from './canvas';
2+
3+
export {Canvas};
4+
5+
export default Canvas;

0 commit comments

Comments
 (0)