Skip to content

Commit

Permalink
Move to react-scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Peterson committed May 20, 2019
1 parent df507ae commit ad294dc
Show file tree
Hide file tree
Showing 29 changed files with 7,459 additions and 3,461 deletions.
15 changes: 0 additions & 15 deletions .babelrc

This file was deleted.

33 changes: 0 additions & 33 deletions .circleci/config.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ node_modules/
npm-debug.log

coverage/
dist/
build/
60 changes: 15 additions & 45 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@
"version": "1.0.0",
"description": "A web app to calculate triangle angles and sides",
"scripts": {
"clean": "rm -rf dist",
"prebuild": "npm run clean",
"build": "webpack -p --progress --color",
"postbuild": "cp src/icon.png dist/icon.png",
"start": "webpack-dev-server --env=dev",
"test": "jest",
"presize": "if [ ! -e dist/bundle.js ]; then >&2 echo \"Build project first\"; exit 1; fi",
"size": "echo Minifed and gzipped:\necho bundle.js: $((`gzip -9 -c dist/bundle.js | wc -c`/1000))KB\necho index.html: $((`gzip -9 -c dist/index.html | wc -c`/1000))KB",
"lint": "standard --verbose | snazzy"
"build": "react-scripts build",
"start": "react-scripts start",
"test": "react-scripts test",
"lint": "react-scripts lint"
},
"repository": {
"type": "git",
Expand All @@ -31,46 +26,21 @@
"license": "MIT",
"homepage": "https://bitbucket.org/epeterson320/trig-calculator#readme",
"dependencies": {
"classnames": "^2.2.5",
"prop-types": "^15.5.9",
"react": "^15.5.0",
"react-dom": "^15.5.0",
"react-redux": "^5.0.2",
"redux": "^3.6.0"
"classnames": "^2.2.6",
"enzyme-adapter-react-16": "^1.13.1",
"prop-types": "^15.7.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-redux": "^7.0.3",
"react-scripts": "^3.0.1",
"redux": "^4.0.1"
},
"devDependencies": {
"autoprefixer": "^7.0.1",
"babel-core": "^6.22.1",
"babel-jest": "^20.0.0",
"babel-loader": "^7.0.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.24.1",
"babel-preset-es2015": "^6.22.0",
"babel-preset-react": "^6.22.0",
"babel-preset-stage-2": "^6.22.0",
"css-loader": "^0.28.1",
"enzyme": "^2.8.2",
"extract-text-webpack-plugin": "^2.1.0",
"gh-pages": "^1.0.0",
"html-webpack-plugin": "^2.28.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^20.0.0",
"node-sass": "^4.5.2",
"normalize-scss": "^7.0.0",
"postcss-loader": "^2.0.5",
"react-addons-test-utils": "^15.4.2",
"react-hot-loader": "^3.0.0-beta.7",
"react-test-renderer": "^15.5.4",
"sass-loader": "^6.0.5",
"snazzy": "^7.0.0",
"standard": "^10.0.2",
"style-ext-html-webpack-plugin": "^3.4.1",
"style-loader": "^0.17.0",
"webpack": "^2.5.1",
"webpack-dev-server": "^2.3.0",
"webpack-merge": "^4.1.0"
"enzyme": "^3.9.0",
"node-sass": "^4.12.0",
"normalize-scss": "^7.0.1"
},
"jest": {
"setupTestFrameworkScriptFile": "<rootDir>/test/setup.js",
"collectCoverageFrom": [
"src/**/*.{js,jsx}",
"!src/index-hot.jsx",
Expand Down
3 changes: 0 additions & 3 deletions postcss.config.js

This file was deleted.

File renamed without changes
2 changes: 1 addition & 1 deletion src/index.ejs → public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<body>
<div class="Page__container">
<header><h1 class="title">Triangle Calculator</h1></header>
<main id="root"><%= require('./prerender').default() %></main>
<main id="root"></main>
<footer>Copyright 2017 Eric Peterson</footer>
</div>
<script src="bundle.js" async></script>
Expand Down
2 changes: 1 addition & 1 deletion src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Provider } from 'react-redux'
import app from './modules/app'
import { init, pushStateToHistory } from './modules/query'
import App from './containers/App'
import '../styles/index.scss'
import './styles/index.scss'

const store = createStore(app)
const rootEl = document.getElementById('root')
Expand Down
4 changes: 4 additions & 0 deletions test/setup.js → src/setupTests.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { configure } from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'
import { precision as δ } from '../src/constants'

configure({ adapter: new Adapter() })

const { PI, sin } = Math

function eql (a, b) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion styles/index.scss → src/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// normalize.css
@import '../node_modules/normalize-scss/sass/normalize/import-now';
@import '~normalize-scss/sass/normalize/import-now';
// Define Mixins
@import 'breakpoints';
@import 'gridlines';
Expand Down
12 changes: 0 additions & 12 deletions webpack.config.js

This file was deleted.

22 changes: 0 additions & 22 deletions webpack/base.js

This file was deleted.

48 changes: 0 additions & 48 deletions webpack/dev.js

This file was deleted.

49 changes: 0 additions & 49 deletions webpack/prod.js

This file was deleted.

Loading

0 comments on commit ad294dc

Please sign in to comment.