You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A complete, yet simple, starter for Angular using webpack 2.
4
6
5
7
**NOTE: This workflow is now using Webpack 2 beta. There is a branch with the old workflow if you want to use it.**
6
8
7
9
This workflow serves as a starting point for building Angular 1.x applications using Webpack 2. Should be noted that apart from the pre-installed angular package, this workflow is pretty much generic.
8
10
9
-
## Features
10
-
11
11
* Heavily commented webpack configuration with reasonable defaults.
12
12
* ES6, and ES7 support with babel.
13
13
* Source maps included in all builds.
@@ -17,33 +17,76 @@ This workflow serves as a starting point for building Angular 1.x applications u
17
17
* Code coverage when tests are run.
18
18
* No gulp and no grunt, just npm scripts.
19
19
20
-
## Installation
20
+
>Warning: Make sure you're using the latest version of Node.js and NPM
go to [http://localhost:8080](http://localhost:8080) in your browser.
42
+
43
+
# Table of Contents
44
+
45
+
*[Getting Started](#getting-started)
46
+
*[Dependencies](#dependencies)
47
+
*[Installing](#installing)
48
+
*[Running the app](#running-the-app)
49
+
*[Developing](#developing)
50
+
*[Testing](#testing)
51
+
*[License](#license)
52
+
53
+
# Getting Started
54
+
55
+
## Dependencies
56
+
57
+
What you need to run this app:
58
+
*`node` and `npm` (Use [NVM](https://github.com/creationix/nvm))
59
+
* Ensure you're running Node (`v4.1.x`+) and NPM (`2.14.x`+)
60
+
61
+
## Installing
62
+
63
+
*`fork` this repo
64
+
*`clone` your fork
65
+
*`npm install` to install all dependencies
66
+
67
+
## Running the app
68
+
69
+
After you have installed all dependencies you can now run the app with:
70
+
```bash
71
+
npm start
28
72
```
29
73
30
-
## Scripts
74
+
It will start a local server using `webpack-dev-server` which will watch, build (in-memory), and reload for you. The port will be displayed to you as `http://localhost:8080`.
31
75
32
-
All scripts are run with `npm run [script]`, for example: `npm run build`.
76
+
## Developing
33
77
34
-
*`build` - generate a minified build to dist folder
35
-
*`start` - start development server, try it by opening `http://localhost:8080/`
36
-
*`test` - run all tests
37
-
*`test-watch` - continuously run unit tests watching for changes
78
+
### Build files
38
79
39
-
See what each script does by looking at the `scripts` section in [package.json](./package.json).
80
+
* single run: `npm run build`
81
+
* build files and watch: `npm run watch`
40
82
41
-
## Example and tutorial
83
+
## Testing
42
84
43
-
To see how to structure an Angular 1.x application using this workflow, please check [this demo](https://github.com/Foxandxss/GermanWords-ng1-webpack).
85
+
#### 1. Unit Tests
44
86
45
-
Also, there is an article in [angular-tips](http://angular-tips.com/blog/2015/06/using-angular-1-dot-x-with-es6-and-webpack/). The article is based on the Webpack 1 version, but almost everything is applicable here.
0 commit comments