Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
brianzinn committed Aug 13, 2021
1 parent 6a97f81 commit 972c567
Show file tree
Hide file tree
Showing 112 changed files with 199 additions and 204 deletions.
13 changes: 0 additions & 13 deletions .editorconfig

This file was deleted.

7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
dist
storybook
src/extensions/DynamicTerrain.ts
src/generatedCode.ts
src/generatedProps.ts
tools
12 changes: 12 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
]
}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ coverage
compiled
.awcache
dist
storybook-static
*.lock
debug
9 changes: 5 additions & 4 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
coverage
docs
media
node_modules
src
stories
storyboard-static
storybook
test
tools
.editorconfig
.eslintignore
.eslintrc
.gitattributes
.gitignore
.grenrc.json
.nyc_output
.storybook
.nycrc.json
.travis.yml
.vscode
README.md
rollup.config.js
tsconfig.generate.json
tsconfig.json
tsconfig.test.json
tslint.json
yarn.lock
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"env": {
"TS_NODE_PROJECT": "tsconfig.generate.json",
"TS_NODE_PROJECT": "tools/tsconfig.generate.json",
"TS_NODE_TRANSPILE_ONLY": "true"
}
}, {
Expand Down
File renamed without changes
File renamed without changes
54 changes: 8 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,84 +30,47 @@
"node": ">=6.0.0"
},
"scripts": {
"lint": "tslint -t codeFrame 'src/**/*.ts'",
"lint": "eslint . --ext .ts",
"prebuild": "rimraf dist",
"build": "cross-env NODE_ENV=production rollup -c",
"start": "tsc-watch --onSuccess \"rollup -c\"",
"deploy-docs": "ts-node tools/gh-pages-publish",
"storybook": "start-storybook -p 6006 -s ./storyboard-site",
"prestorybook": "npm run build",
"build-storybook": "build-storybook -o storybook-static -s ./storyboard-site",
"generate-code": "ts-node -P tsconfig.generate.json tools/generate-code",
"unit-test": "cross-env TS_NODE_PROJECT=\"tsconfig.test.json\" mocha --require ts-node/register --require esm \"test/**/*.spec.{js,jsx,ts,tsx}\"",
"generate-code": "ts-node -P tsconfig.generate.json tools/generate-code.ts",
"unit-test": "cross-env TS_NODE_PROJECT=\"test/tsconfig.json\" mocha --require ts-node/register --require esm \"test/**/*.spec.{js,jsx,ts,tsx}\"",
"test": "npm run unit-test",
"test:coverage": "nyc --reporter=lcov --reporter=text-summary npm run test"
},
"lint-staged": {
"src/**/*.ts": [
"prettier --write --no-semi --print-width 160"
]
},
"devDependencies": {
"@babel/core": "7.12.7",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babylonjs/core": "^4.2.0",
"@babylonjs/gui": "^4.2.0",
"@babylonjs/inspector": "^4.2.0",
"@babylonjs/loaders": "^4.2.0",
"@babylonjs/materials": "^4.2.0",
"@babylonjs/procedural-textures": "^4.2.0",
"@inlet/react-pixi": "^6.5.2",
"@rollup/plugin-json": "^4.0.2",
"@rollup/plugin-typescript": "^6.1.0",
"@storybook/addon-actions": "^6.1.9",
"@storybook/addon-links": "^6.1.9",
"@storybook/addon-storysource": "^6.0.27",
"@storybook/addons": "^6.1.9",
"@storybook/react": "^6.1.9",
"@storybook/source-loader": "^6.1.9",
"@storybook/theming": "^6.1.9",
"@rollup/plugin-replace": "^3.0.0",
"@types/lodash.camelcase": "^4.3.6",
"@types/mocha": "^8.2.0",
"@types/node": "^14.14.10",
"@types/react": "^17.0.0",
"@types/react-reconciler": "^0.18.0",
"@types/sinon": "^9.0.10",
"babel-loader": "^8.2.2",
"cannon": "^0.6.2",
"chroma-js": "^2.1.0",
"@typescript-eslint/eslint-plugin": "^4.29.1",
"@typescript-eslint/parser": "^4.29.1",
"cross-env": "^7.0.0",
"earcut": "^2.2.2",
"eslint": "^7.32.0",
"esm": "^3.2.25",
"github-release-notes": "0.17.2",
"gsap": "^3.6.1",
"honeycomb-grid": "^3.1.7",
"lerp": "^1.0.3",
"lint-staged": "^10.5.2",
"lodash.camelcase": "^4.3.0",
"mocha": "8.1.3",
"nyc": "^15.1.0",
"pixi-projection": "^0.3.11",
"pixi.js": "^5.2.1",
"prettier": "^2.2.1",
"react": "^17.0.1",
"react-babylon-spring": "^1.0.2",
"react-dom": "^17.0.1",
"rimraf": "^3.0.2",
"rollup": "^2.0.6",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.29.0",
"rollup-plugin-typescript2": "^0.30.0",
"sinon": "^9.2.4",
"storybook": "^6.1.9",
"ts-morph": "^10.1.0",
"ts-node": "^9.1.1",
"tsc-watch": "^4.2.9",
"tsconfig-paths": "^3.9.0",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.17.0",
"tslint-config-standard": "^9.0.0",
"typedoc": "^0.20.14",
"typedoc-plugin-markdown": "^3.4.0",
"typescript": "4.1.2"
},
"peerDependencies": {
Expand All @@ -117,7 +80,6 @@
"react-dom": ">=17"
},
"dependencies": {
"@rollup/plugin-replace": "^3.0.0",
"react-reconciler": "^0.26.1"
}
}
2 changes: 2 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import json from '@rollup/plugin-json';
import replace from '@rollup/plugin-replace';
import typescript from 'rollup-plugin-typescript2';
// not working
// import typescript from '@rollup/plugin-typescript';

const pkg = require('./package.json')
const libraryName = pkg.name
Expand Down
6 changes: 3 additions & 3 deletions src/HostRegistrationStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ export class HostRegistrationStore {
private static _store: Record<string, DynamicHost<any, any>> = {};

/**
* Registers a new host element
* @param host host element to dynamically register
*/
* Registers a new host element
* @param host host element to dynamically register
*/
public static Register(host: DynamicHost<any, any>): void {
this._store[host.hostElementName] = host;
}
Expand Down
7 changes: 3 additions & 4 deletions src/PropsHandler.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { FresnelParameters } from '@babylonjs/core/Materials/fresnelParameters.js';
import { BaseTexture } from '@babylonjs/core/Materials/Textures/baseTexture.js';
import { Color4 } from '@babylonjs/core/Maths/math.color.js';
import { Color3 } from '@babylonjs/core/Maths/math.color.js';
import { Color3, Color4 } from '@babylonjs/core/Maths/math.color.js';
import { Quaternion, Vector3 } from '@babylonjs/core/Maths/math.vector.js';

import { Observable } from '@babylonjs/core/Misc/observable.js';
Expand Down Expand Up @@ -318,8 +317,8 @@ export const checkControlDiff = (oldProp: Control | undefined, newProp: Control
})
}

export const checkObjectDiff = (oldProp: object | undefined, newProp: object | undefined, propertyName: string, changedProps: PropertyUpdate[]): void => {
propertyCheck<object>(oldProp, newProp, propertyName, PropChangeType.Primitive, changedProps, (oldProp, newProp, changedProps) => {
export const checkObjectDiff = (oldProp: Record<string, unknown> | undefined, newProp: Record<string, unknown> | undefined, propertyName: string, changedProps: PropertyUpdate[]): void => {
propertyCheck<Record<string, unknown>>(oldProp, newProp, propertyName, PropChangeType.Primitive, changedProps, (oldProp, newProp, changedProps) => {
if (newProp !== oldProp) {
changedProps.push({
propertyName,
Expand Down
Loading

0 comments on commit 972c567

Please sign in to comment.