-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated readme with basic documentation
- Loading branch information
1 parent
295e78a
commit afa5ae7
Showing
1 changed file
with
54 additions
and
0 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 |
---|---|---|
@@ -1,2 +1,56 @@ | ||
# webpack-scripts | ||
Opinionated webpack scripts | ||
|
||
## Installation | ||
|
||
```bash | ||
npm install --save-dev @blunck/webpack-scripts | ||
``` | ||
|
||
Add scripts to you `package.json` | ||
```json | ||
{ | ||
"scripts": { | ||
"start": "webpack-scripts start", | ||
"build": "webpack-scripts build", | ||
"profile": "webpack-scripts profile" | ||
} | ||
} | ||
``` | ||
|
||
## Configuration | ||
Add a `.webpackrc` file to the root of your project. Following options are available: | ||
```json | ||
{ | ||
"framework": "vanilla", | ||
"port": "3000", | ||
"browser": "google chrome", | ||
"favicon": "./src/assets/img/favicon.png" | ||
} | ||
``` | ||
|
||
- `framework` Javascript framework that is used: "vanilla", "react" or "ng1" | ||
- `port` Port to start development server at | ||
- `browser` Browser to open development server in | ||
- `favicon` Relative path to image to use as favicon | ||
|
||
## Scripts | ||
|
||
### Build | ||
Build a production version of your application | ||
```bash | ||
npm run build | ||
``` | ||
|
||
### Start | ||
Start a development server & re-compile / reload on changes. (HMR support for react) | ||
```bash | ||
npm run start | ||
``` | ||
|
||
### Profile | ||
Build a production version of your application & open a page | ||
with information about your bundle. | ||
```bash | ||
npm run profile | ||
``` |