1
0
mirror of https://github.com/mgerb/react-starter synced 2026-01-08 08:02:49 +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
node_modules
yarn-error*
dist
dist
.wwp-cache

View File

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

View File

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

22
package-lock.json generated
View File

@@ -1025,6 +1025,28 @@
"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": {
"version": "1.6.1",
"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.",
"scripts": {
"build": "webpack -p --progress --colors",
"dev": "webpack --progress --colors --watch",
"c9": "webpack-dev-server --host 0.0.0.0 --port 8080 --inline --history-api-fallback",
"lint": "tslint --project .",
"start": "webpack-dev-server --inline --history-api-fallback",
"update-latest": "rm -rf node_modules && rm yarn.lock && ncu --upgrade --upgradeAll && yarn install"
"dev": "webpack --progress --colors --watch --mode development",
"c9": "webpack-dev-server --host 0.0.0.0 --port 8080 --inline --history-api-fallback --mode development",
"start": "webpack-dev-server --inline --history-api-fallback --mode development",
"lint": "tslint --project ."
},
"author": "Mitchell Gerber",
"license": "MIT",
@@ -17,6 +16,7 @@
"@types/react-dom": "^16.0.4",
"@types/react-router-dom": "^4.2.5",
"babel-loader": "^7.1.4",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"clean-webpack-plugin": "^0.1.19",

View File

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

View File

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