Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 33 additions & 7 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,20 +1,46 @@
{
"plugins": [
"babel"
"react",
"@typescript-eslint"
],
"parser": "babel-eslint",
"parser": "@typescript-eslint/parser",
"rules": {
"comma-dangle": [2, "always-multiline"],
"space-before-function-paren": [2, "never"],

// stops the 'React' was used before it was defined no-use-before-define error for .js files.
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error"],

"react/prop-types": 1,
"react/jsx-handler-names": "off",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",

"comma-dangle": [2, {
"arrays": "always-multiline",
"exports": "always-multiline",
"functions": "never",
"imports": "always-multiline",
"objects": "always-multiline"
}],

"space-before-function-paren": [2, {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}],

"jsx-quotes": [2, "prefer-double"],
"no-var": 2,

"babel/no-invalid-this": 1,
"babel/semi": [2, "never"],
"react/prop-types": "warn"
"semi": [2, "never"],
"lines-between-class-members": "off"
},

"extends": ["standard", "standard-react"],

"env": {
"browser": true,
"jest": true,
"jasmine": true
}
}
17 changes: 17 additions & 0 deletions esbuild.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const { build } = require("esbuild");
const { nodeExternalsPlugin } = require("esbuild-node-externals");

build({
entryPoints: ["src/index.js"],
outdir: "dist",
bundle: true,
sourcemap: true,
minify: true,
splitting: true,
format: "esm",
target: ["es2015"],
loader: {
".js": "jsx",
},
plugins: [nodeExternalsPlugin({ allowList: ['jquery', 'classnames', 'clone'], })],
}).catch(() => process.exit(1));
1 change: 0 additions & 1 deletion index.js

This file was deleted.

60 changes: 30 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
{
"name": "react-object-table",
"version": "0.6.0",
"version": "0.7.0",
"description": "React powered table of objects, designed to be editable and fast.",
"main": "src/index.js",
"main": "dist/index.js",
"module": "dist/index.js",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.js"
}
},
"scripts": {
"publish-demo": "git branch -D gh-pages; git push origin --delete gh-pages; git checkout -b gh-pages; cd demo-site; yarn; npm run build; cd ..; git add .; git add -f demo-site/dist; git add -f demo-site/node_modules/uptick-demo-site/dist; git commit -m \"Demo site build\"; git push origin gh-pages; git checkout master; git push origin `git subtree split --prefix demo-site gh-pages`:gh-pages --force;",
"test": "echo \"Error: no test specified\" && exit 1",
"build-js": "./node_modules/webpack/bin/webpack.js",
"build-js": "rm -rf dist && node ./esbuild.js",
"build-css": "./node_modules/node-sass/bin/node-sass src/object-table.sass dist/react-object-table.css",
"build": "npm run build-js; npm run build-css",
"prepublish": "npm run build"
Expand All @@ -29,38 +36,31 @@
},
"homepage": "https://github.com/uptick/react-object-table#readme",
"dependencies": {
"classnames": "^2.2.3",
"clone": "^1.0.2"
"classnames": "^2.3.1",
"clone": "^2.1.2"
},
"peerDependencies": {
"jquery": "^3.x",
"react": "15.x - 16.x",
"react-dom": "15.x - 16.x"
},
"devDependencies": {
"babel-cli": "^6.6.4",
"babel-core": "^6.5.2",
"babel-eslint": "^7.2.3",
"babel-loader": "^6.2.2",
"babel-plugin-add-module-exports": "^0.1.2",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-0": "^6.5.0",
"eslint": "^3.19.0",
"eslint-config-standard": "^10.2.1",
"eslint-config-standard-jsx": "^4.0.1",
"eslint-config-standard-react": "^5.0.0",
"eslint-plugin-babel": "^4.1.1",
"eslint-plugin-import": "^2.3.0",
"eslint-plugin-node": "^4.2.2",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-react": "^7.0.1",
"eslint-plugin-standard": "^3.0.1",
"jquery": "^3.1.1",
"node-sass": "^3.4.2",
"react": "^15.4",
"react-dom": "^15.4",
"webpack": "^1.12.13"
},
"browserDependencies": {}
"@typescript-eslint/eslint-plugin": "^4.26.0",
"@typescript-eslint/parser": "^4.26.0",
"esbuild": "^0.12.5",
"esbuild-node-externals": "^1.2.0",
"eslint": "^7.27.0",
"eslint-config-standard": "*",
"eslint-config-standard-react": "*",
"eslint-plugin-import": "*",
"eslint-plugin-node": "*",
"eslint-plugin-promise": "*",
"eslint-plugin-react": "*",
"eslint-plugin-standard": "*",
"jquery": "^3.6.0",
"node-sass": "^6.0.0",
"react": "^16.13.0",
"react-dom": "^16.13.0",
"typescript": "^4.3.2"
}
}
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import ObjectTable, { ObjectCell, ObjectRow, BaseEditor, TextEditor, TextDrawer } from './object-table'

export default ObjectTable
export { ObjectCell, ObjectRow, BaseEditor, TextEditor, TextDrawer }
Comment on lines +1 to +4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change tackling this comment? If it is, maybe add a comment linking these PRs for posterity

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it does tackle it and for sure I will :)

32 changes: 0 additions & 32 deletions webpack.config.js

This file was deleted.

Loading