forked from floating-ui/react-popper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(Manager): Don't create an object on each render
+ several build improvements
- Loading branch information
Federico Zivolo
committed
Apr 5, 2018
1 parent
8c336fe
commit faf9cfc
Showing
14 changed files
with
241 additions
and
510 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,14 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ['standard', 'standard-react', 'prettier', 'prettier/react'], | ||
plugins: ['prettier', 'jest'], | ||
parser: 'babel-eslint', | ||
env: { | ||
browser: true, | ||
'jest/globals': true, | ||
}, | ||
settings: { | ||
react: { | ||
version: '16.3', | ||
}, | ||
}, | ||
plugins: ['react'], | ||
rules: { | ||
// prettier | ||
'prettier/prettier': [ | ||
'error', | ||
{ trailingComma: 'es5', singleQuote: true, semi: true }, | ||
], | ||
'no-unexpected-multiline': 'off', | ||
'no-unused-vars': 'error', | ||
'react/jsx-uses-vars': 'error', | ||
'react/jsx-uses-react': 'error', | ||
'react/react-in-jsx-scope': 'error', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
singleQuote: true, | ||
trailingComma: 'es5', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,42 +3,40 @@ | |
"version": "1.0.0-beta.1", | ||
"description": "React wrapper around Popper.js", | ||
"license": "MIT", | ||
"author": "Travis Arnold <[email protected]> (http://souporserious.com)", | ||
"author": | ||
"Travis Arnold <[email protected]> (http://souporserious.com)", | ||
"homepage": "https://github.com/souporserious/react-popper", | ||
"main": "dist/react-popper.js", | ||
"umd:main": "dist/react-popper.umd.js", | ||
"module": "lib/index.js", | ||
"typings": "typings/react-popper.d.ts", | ||
"files": [ | ||
"dist", | ||
"lib", | ||
"typings/react-popper.d.ts" | ||
], | ||
"files": ["dist", "lib", "typings/react-popper.d.ts"], | ||
"scripts": { | ||
"build": "npm run build:clean && npm run build:es && npm run build:umd && npm run build:cjs && npm run build:flow && npm run build:umd-min && npm run build:cjs-min", | ||
"build": | ||
"npm run build:clean && npm run build:es && npm run build:umd && npm run build:cjs && npm run build:flow && npm run build:umd-min && npm run build:cjs-min", | ||
"build:clean": "rimraf dist/ && rimraf lib/", | ||
"build:es": "babel src --ignore '*.test.js,__mocks__' --out-dir lib", | ||
"build:umd": "rollup -c --output.format umd --output.name 'react-popper' --output.file dist/react-popper.umd.js", | ||
"build:cjs": "rollup -c --output.format cjs --output.name 'react-popper' --output.file dist/react-popper.js", | ||
"build:umd": | ||
"rollup -c --output.format umd --output.name 'react-popper' --output.file dist/react-popper.umd.js", | ||
"build:cjs": | ||
"rollup -c --output.format cjs --output.name 'react-popper' --output.file dist/react-popper.js", | ||
"build:flow": "flow-copy-source --ignore '{__mocks__/*,*.test}.js' src lib", | ||
"build:umd-min": "MINIFY=true rollup -c --output.format umd --output.name 'react-popper' --output.file dist/react-popper.umd.min.js", | ||
"build:cjs-min": "MINIFY=true rollup -c --output.format cjs --output.name 'react-popper' --output.file dist/react-popper.min.js", | ||
"build:umd-min": | ||
"MINIFY=true rollup -c --output.format umd --output.name 'react-popper' --output.file dist/react-popper.umd.min.js", | ||
"build:cjs-min": | ||
"MINIFY=true rollup -c --output.format cjs --output.name 'react-popper' --output.file dist/react-popper.min.js", | ||
"demo": "parcel --out-dir demo/dist demo/index.html", | ||
"pretest": "npm run lint", | ||
"test": "npm run test:flow && npm run test:ts && npm run test:jest", | ||
"test:ts": "tsc --project ./typings/tests", | ||
"test:flow": "flow check", | ||
"test:jest": "jest", | ||
"prepare": "npm run build", | ||
"precommit": "lint-staged", | ||
"format": "npm run lint -- --fix --quiet", | ||
"lint": "eslint --ext .js,.jsx src/ example/" | ||
"precommit": "pretty-quick --staged && eslint src" | ||
}, | ||
"jest": { | ||
"setupTestFrameworkScriptFile": "<rootDir>jest.setup.js", | ||
"snapshotSerializers": [ | ||
"enzyme-to-json/serializer" | ||
] | ||
"snapshotSerializers": ["enzyme-to-json/serializer"] | ||
}, | ||
"repository": { | ||
"type": "git", | ||
|
@@ -56,20 +54,14 @@ | |
"tooltip", | ||
"popover" | ||
], | ||
"lint-staged": { | ||
"@(src|demo)/**/*.{js,jsx}": [ | ||
"eslint --fix --max-warnings 5", | ||
"git add" | ||
] | ||
}, | ||
"peerDependencies": { | ||
"react": "0.14.x || ^15.0.0 || ^16.0.0", | ||
"react-dom": "0.14.x || ^15.0.0 || ^16.0.0" | ||
}, | ||
"dependencies": { | ||
"create-react-context": "^0.2.1", | ||
"popper.js": "^1.14.1", | ||
"prop-types": "^15.6.1" | ||
"warning": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^16.1.0", | ||
|
@@ -83,38 +75,26 @@ | |
"babel-preset-env": "^1.6.1", | ||
"babel-preset-react": "^6.24.1", | ||
"babel-preset-stage-2": "^6.24.1", | ||
"chokidar": "^1.6.1", | ||
"create-styled-element": "^0.4.0", | ||
"enzyme": "^3.3.0", | ||
"enzyme-adapter-react-16": "^1.1.1", | ||
"enzyme-to-json": "^3.3.3", | ||
"eslint": "^4.19.1", | ||
"eslint-config-prettier": "^2.9.0", | ||
"eslint-config-standard": "^11.0.0", | ||
"eslint-config-standard-react": "^6.0.0", | ||
"eslint-plugin-import": "^2.10.0", | ||
"eslint-plugin-flowtype": "^2.46.1", | ||
"eslint-plugin-jest": "^21.15.0", | ||
"eslint-plugin-node": "^6.0.1", | ||
"eslint-plugin-prettier": "^2.6.0", | ||
"eslint-plugin-promise": "^3.7.0", | ||
"eslint-plugin-react": "^7.7.0", | ||
"eslint-plugin-standard": "^3.0.1", | ||
"flow-bin": "^0.69.0", | ||
"flow-copy-source": "^1.3.0", | ||
"glamor": "^2.20.24", | ||
"glamorous": "^3.11.1", | ||
"jest": "^22.4.3", | ||
"node-libs-browser": "^1.0.0", | ||
"outy": "^0.1.2", | ||
"parcel-bundler": "^1.6.2", | ||
"prettier": "^1.11.1", | ||
"react": "^16.3.0", | ||
"pretty-quick": "^1.4.1", | ||
"react": "16.2.0", | ||
"react-dom": "^16.3.0", | ||
"react-measure": "^1.4.6", | ||
"react-motion-ui-pack": "^0.10.2", | ||
"react-portal": "^4.1.4", | ||
"react-transition-group": "^2.2.1", | ||
"react-travel": "^1.3.0", | ||
"rimraf": "^2.6.2", | ||
"rollup": "^0.57.1", | ||
"rollup-plugin-babel": "^3.0.3", | ||
|
@@ -123,7 +103,6 @@ | |
"rollup-plugin-node-globals": "^1.2.0", | ||
"rollup-plugin-node-resolve": "^3.3.0", | ||
"rollup-plugin-replace": "^2.0.0", | ||
"typescript": "^2.8.1", | ||
"velocity-react": "^1.2.2" | ||
"typescript": "^2.8.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.