-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
791 additions
and
1,248 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"targets": { | ||
"browsers": ["last 2 versions", "ie >= 9"] | ||
}, | ||
"modules": false | ||
} | ||
], | ||
"react" | ||
] | ||
} |
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,5 @@ | ||
{ | ||
"parser": "flow", | ||
"semi": false, | ||
"singleQuote": true | ||
} |
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 |
---|---|---|
@@ -1,62 +1,53 @@ | ||
{ | ||
"name": "@kickoff/react-components", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "React components for easy use of the Kickoff framework", | ||
"main": "dist/kickoff-react-components.js", | ||
"module": "dist/kickoff-react-components.mjs", | ||
"jsnext:main": "dist/kickoff-react-components.mjs", | ||
"main": "dist/cjs/kickoff-react-components", | ||
"module": "dist/esm/kickoff-react-components", | ||
"browser": "dist/umd/kickoff-react-components", | ||
"dependencies": { | ||
"react": "^16.0.0" | ||
}, | ||
"devDependencies": { | ||
"babel-core": "^6.26.0", | ||
"babel-plugin-external-helpers": "^6.22.0", | ||
"babel-preset-env": "^1.6.0", | ||
"babel-preset-react": "^6.24.1", | ||
"cross-env": "^5.0.5", | ||
"husky": "^0.14.3", | ||
"lint-staged": "^4.2.3", | ||
"prettier": "^1.7.3", | ||
"rimraf": "^2.6.2", | ||
"rollup": "^0.50.0", | ||
"rollup-plugin-babel": "^3.0.2", | ||
"rollup-plugin-commonjs": "^8.0.2", | ||
"rollup-plugin-filesize": "^1.4.2", | ||
"rollup-plugin-gzip": "^1.3.0", | ||
"rollup-plugin-node-resolve": "^3.0.0", | ||
"rollup-plugin-uglify": "^2.0.1", | ||
"uglify-es": "^3.1.3" | ||
}, | ||
"scripts": { | ||
"prebuild": "rimraf dist", | ||
"build": "rollup -c", | ||
"watch": "rollup -c -w", | ||
"lint": "standard | snazzy", | ||
"lint:fix": "standard --fix", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"build": "rimraf dist && cross-env NODE_ENV=development rollup -c", | ||
"build:prod": "rimraf dist && cross-env NODE_ENV=production rollup -c", | ||
"watch": "rimraf dist && cross-env NODE_ENV=development rollup -c -w", | ||
"lint": "prettier --write \"src/**/*.js\"", | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"precommit": "lint-staged" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/TryKickoff/react-components.git" | ||
}, | ||
"keywords": [ | ||
"⚽", | ||
"kickoff", | ||
"react" | ||
], | ||
"keywords": ["⚽", "kickoff", "react"], | ||
"author": "JP Driver", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/TryKickoff/react-components/issues" | ||
}, | ||
"homepage": "https://github.com/TryKickoff/react-components#readme", | ||
"files": [ | ||
"src", | ||
"dist" | ||
], | ||
"devDependencies": { | ||
"babel-eslint": "^7.1.1", | ||
"babel-preset-es2015-rollup": "^3.0.0", | ||
"babel-preset-react": "^6.24.1", | ||
"lint-staged": "^4.0.2", | ||
"rimraf": "^2.6.1", | ||
"rollup": "^0.45.2", | ||
"rollup-plugin-babel": "^2.7.1", | ||
"rollup-plugin-uglify": "^2.0.1", | ||
"rollup-watch": "^4.3.1", | ||
"snazzy": "^7.0.0", | ||
"standard": "^10.0.2", | ||
"uglify-es": "^3.0.27" | ||
}, | ||
"dependencies": { | ||
"react": "^15.6.1" | ||
}, | ||
"standard": { | ||
"parser": "babel-eslint", | ||
"ignore": [ | ||
"dist", | ||
"node_modules" | ||
] | ||
}, | ||
"files": ["dist"], | ||
"lint-staged": { | ||
"*.js": "standard --fix" | ||
"*.{js,css}": ["prettier --write", "git add"] | ||
} | ||
} |
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,35 +1,53 @@ | ||
import resolve from 'rollup-plugin-node-resolve' | ||
import commonjs from 'rollup-plugin-commonjs' | ||
import babel from 'rollup-plugin-babel' | ||
import uglify from 'rollup-plugin-uglify' | ||
import { minify } from 'uglify-es' | ||
import gzip from 'rollup-plugin-gzip' | ||
import filesize from 'rollup-plugin-filesize' | ||
import pkg from './package.json' | ||
|
||
let pkg = require('./package.json') | ||
let external = Object.keys(pkg.dependencies) | ||
const NODE_ENV = process.env.NODE_ENV | ||
const isProductionBuild = NODE_ENV === 'production' | ||
const jsFile = `.${NODE_ENV}.js` | ||
|
||
export default { | ||
entry: 'src/index.js', | ||
plugins: [ | ||
babel({ | ||
babelrc: false, | ||
exclude: 'node_modules', | ||
presets: [ 'es2015-rollup', 'react' ] | ||
}), | ||
uglify({}, minify) | ||
], | ||
external: external, | ||
globals: { | ||
'react': 'React' | ||
}, | ||
targets: [ | ||
{ | ||
dest: pkg.main, | ||
format: 'umd', | ||
moduleName: 'KickoffReactComponents', | ||
sourceMap: true | ||
const plugins = [ | ||
babel({ | ||
exclude: ['node_modules/**'], | ||
plugins: ['external-helpers'] | ||
}), | ||
isProductionBuild && uglify({}, minify), | ||
isProductionBuild && gzip(), | ||
filesize() | ||
] | ||
|
||
export default [ | ||
// browser-friendly UMD build | ||
{ | ||
input: 'src/index.js', | ||
external: Object.keys(pkg.dependencies), | ||
globals: { | ||
react: 'React' | ||
}, | ||
{ | ||
dest: pkg.module, | ||
format: 'es', | ||
sourceMap: true | ||
} | ||
] | ||
} | ||
name: 'KickoffReactComponents', | ||
output: { file: pkg.browser + jsFile, format: 'umd' }, | ||
sourcemap: isProductionBuild, | ||
plugins: [resolve(), commonjs(), ...plugins] | ||
}, | ||
|
||
// CommonJS (for Node) and ES module (for bundlers) build. | ||
// (We could have three entries in the configuration array | ||
// instead of two, but it's quicker to generate multiple | ||
// builds from a single configuration where possible, using | ||
// the `output` option which can specify `file` and `format`) | ||
{ | ||
input: 'src/index.js', | ||
external: Object.keys(pkg.dependencies), | ||
output: [ | ||
{ file: pkg.main + jsFile, format: 'cjs' }, | ||
{ file: pkg.module + jsFile, format: 'es' } | ||
], | ||
sourcemap: isProductionBuild, | ||
plugins: plugins | ||
} | ||
] |
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,7 +1,7 @@ | ||
import React from 'react' | ||
|
||
const Actions = ({ children }) => <div className='form-actions text-centre'> | ||
{children} | ||
</div> | ||
const Actions = ({ children }) => ( | ||
<div className="form-actions text-centre">{children}</div> | ||
) | ||
|
||
export default Actions |
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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import React from 'react' | ||
|
||
const Fieldset = ({ children }) => <fieldset className='form-fieldset'> | ||
{children} | ||
</fieldset> | ||
const Fieldset = ({ children }) => ( | ||
<fieldset className="form-fieldset">{children}</fieldset> | ||
) | ||
|
||
export default Fieldset |
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import React from 'react' | ||
|
||
const Input = (props) => <div className='form-controlGroup-inputWrapper'> | ||
<input className='form-input' {...props} /> | ||
</div> | ||
const Input = props => ( | ||
<div className="form-controlGroup-inputWrapper"> | ||
<input className="form-input" {...props} /> | ||
</div> | ||
) | ||
|
||
export default Input |
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,7 +1,5 @@ | ||
import React from 'react' | ||
|
||
const Label = ({ children }) => <div className='form-label'> | ||
{children} | ||
</div> | ||
const Label = ({ children }) => <div className="form-label">{children}</div> | ||
|
||
export default Label |
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,7 +1,7 @@ | ||
import React from 'react' | ||
|
||
const Legend = ({ children }) => <fieldset className='form-legend'> | ||
{children} | ||
</fieldset> | ||
const Legend = ({ children }) => ( | ||
<fieldset className="form-legend">{children}</fieldset> | ||
) | ||
|
||
export default Legend |
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.