Browse Source

Development mode browserlist and update readme

jsbundling-with-webpack-modernizr
baarkerlounger 3 years ago
parent
commit
4c635171b5
  1. 22
      README.md
  2. 17
      package.json

22
README.md

@ -37,11 +37,29 @@ Pre-requisites:
6. Install the frontend depenencies:\
`yarn install`
7. Start the Rails server:\
`bundle exec rails s`
7. Start the dev servers using foreman:\
`./bin/dev`
Or start them individually:\
a. Rails:\
`bundle exec rails s`
b. JS (for hot reloading):\
`yarn build mode=development --watch`
If you're not modifying front end assets you can bundle them as a one off task:\
`yarn build mode=development`
Development mode will target the latest versions of Chrome, Firefox and Safari for transpilation while
production mode will target older browsers.
The Rails server will start on <http://localhost:3000>.
Running the test suite (front end assets need to be built or server needs to be running):\
`bundle exec rspec`
### Using Docker
1. Build the image:\

17
package.json

@ -33,11 +33,18 @@
},
"version": "0.1.0",
"devDependencies": {},
"browserslist": [
"last 1 version",
"> 1%",
"IE 10"
],
"browserslist": {
"production": [
"last 1 version",
"> 1%",
"IE 10"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"babel": {
"presets": [
"@babel/preset-env"

Loading…
Cancel
Save