1
0
mirror of https://github.com/mgerb/react-starter synced 2026-01-11 09:32:51 +00:00

minor updates - added babel polyfill

This commit is contained in:
2018-03-27 20:58:44 -05:00
parent 3adf99fdc7
commit b7cefa92a8
7 changed files with 35 additions and 21 deletions

3
.gitignore vendored
View File

@@ -1,4 +1,5 @@
.vscode .vscode
node_modules node_modules
yarn-error* yarn-error*
dist dist
.wwp-cache

View File

@@ -2,5 +2,5 @@
"singleQuote": true, "singleQuote": true,
"tabWidth": 2, "tabWidth": 2,
"trailingComma": "all", "trailingComma": "all",
"printWidth": 140 "printWidth": 120
} }

View File

@@ -24,20 +24,10 @@ export class NavBar extends React.Component<Props, State> {
</div> </div>
<div className="nav-bar__nav"> <div className="nav-bar__nav">
<NavLink <NavLink to="/" className="nav-bar__item" exact activeClassName="nav-bar__item--active">
to="/"
className="nav-bar__item"
exact
activeClassName="nav-bar__item--active"
>
Home Home
</NavLink> </NavLink>
<NavLink <NavLink to="/new" className="nav-bar__item" exact activeClassName="nav-bar__item--active">
to="/new"
className="nav-bar__item"
exact
activeClassName="nav-bar__item--active"
>
New New
</NavLink> </NavLink>
</div> </div>

22
package-lock.json generated
View File

@@ -1025,6 +1025,28 @@
"babel-types": "6.26.0" "babel-types": "6.26.0"
} }
}, },
"babel-polyfill": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz",
"integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=",
"requires": {
"babel-runtime": "6.26.0",
"core-js": "2.5.4",
"regenerator-runtime": "0.10.5"
},
"dependencies": {
"core-js": {
"version": "2.5.4",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.4.tgz",
"integrity": "sha1-8si/GB8qgLkvNgEhQpzmOi8K6uA="
},
"regenerator-runtime": {
"version": "0.10.5",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz",
"integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg="
}
}
},
"babel-preset-env": { "babel-preset-env": {
"version": "1.6.1", "version": "1.6.1",
"resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.6.1.tgz", "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.6.1.tgz",

View File

@@ -4,11 +4,10 @@
"description": "A seed for a simple react application with typescript.", "description": "A seed for a simple react application with typescript.",
"scripts": { "scripts": {
"build": "webpack -p --progress --colors", "build": "webpack -p --progress --colors",
"dev": "webpack --progress --colors --watch", "dev": "webpack --progress --colors --watch --mode development",
"c9": "webpack-dev-server --host 0.0.0.0 --port 8080 --inline --history-api-fallback", "c9": "webpack-dev-server --host 0.0.0.0 --port 8080 --inline --history-api-fallback --mode development",
"lint": "tslint --project .", "start": "webpack-dev-server --inline --history-api-fallback --mode development",
"start": "webpack-dev-server --inline --history-api-fallback", "lint": "tslint --project ."
"update-latest": "rm -rf node_modules && rm yarn.lock && ncu --upgrade --upgradeAll && yarn install"
}, },
"author": "Mitchell Gerber", "author": "Mitchell Gerber",
"license": "MIT", "license": "MIT",
@@ -17,6 +16,7 @@
"@types/react-dom": "^16.0.4", "@types/react-dom": "^16.0.4",
"@types/react-router-dom": "^4.2.5", "@types/react-router-dom": "^4.2.5",
"babel-loader": "^7.1.4", "babel-loader": "^7.1.4",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.1", "babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1", "babel-preset-react": "^6.24.1",
"clean-webpack-plugin": "^0.1.19", "clean-webpack-plugin": "^0.1.19",

View File

@@ -1,10 +1,11 @@
{ {
"extends": "tslint-config-airbnb", "extends": "tslint-config-airbnb",
"rules": { "rules": {
"max-line-length": [true, 120],
"variable-name": [true, "ban-keywords", "check-format", "allow-pascal-case"],
"import-name": false, "import-name": false,
"ter-arrow-parens": [true, "as-needed"], "ter-arrow-parens": [true, "as-needed"],
"align": [true, "parameters", "statements"], "align": [true, "parameters", "statements"],
"typedef": [true, "call-signature", "parameter", "member-variable-declaration"],
"member-access": [true] "member-access": [true]
} }
} }

View File

@@ -7,7 +7,7 @@ const webpack = require('webpack');
module.exports = { module.exports = {
entry: { entry: {
app: './app/app.tsx', app: ['babel-polyfill', './app/app.tsx'],
}, },
output: { output: {
path: path.resolve(__dirname, 'dist'), path: path.resolve(__dirname, 'dist'),