https://github.com/davepartner/angularjs2-quickstart
A sample quick start for angularjs to save you time
https://github.com/davepartner/angularjs2-quickstart
Last synced: 4 months ago
JSON representation
A sample quick start for angularjs to save you time
- Host: GitHub
- URL: https://github.com/davepartner/angularjs2-quickstart
- Owner: davepartner
- Created: 2016-09-27T22:01:37.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-01T20:55:13.000Z (over 9 years ago)
- Last Synced: 2025-06-04T16:35:48.782Z (about 1 year ago)
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# angularjs2-quickstart
A sample quick start for angularjs to save you time. Just clone and run 'npm start' then you are good to go.
## Create a new project based on the QuickStart
Clone this repo into new project folder (e.g., `my-proj`).
```bash
git clone https://github.com/daveozoalor/angularjs2-quickstart my-proj
cd my-proj
```
We have no intention of updating the source on `angular/quickstart`.
Discard everything "git-like" by deleting the `.git` folder.
```bash
rm -rf .git # non-Windows
rd .git /S/Q # windows
```
### Create a new git repo
You could [start writing code](#start-development) now and throw it all away when you're done.
If you'd rather preserve your work under source control, consider taking the following steps.
Initialize this project as a *local git repo* and make the first commit:
```bash
git init
git add .
git commit -m "Initial commit"
```
Create a *remote repository* for this project on the service of your choice.
Grab its address (e.g. *`https://github.com//my-proj.git`*) and push the *local repo* to the *remote*.
```bash
git remote add origin
git push -u origin master
```
## Install npm packages
> See npm and nvm version notes above
Install the npm packages described in the `package.json` and verify that it works:
**Attention Windows Developers: You must run all of these commands in administrator mode**.
```bash
npm install
npm start
```
> If the `typings` folder doesn't show up after `npm install` please install them manually with:
> `npm run typings -- install`
The `npm start` command first compiles the application,
then simultaneously re-compiles and runs the `lite-server`.
Both the compiler and the server watch for file changes.
Shut it down manually with Ctrl-C.
You're ready to write your application.
### npm scripts
We've captured many of the most useful commands in npm scripts defined in the `package.json`:
* `npm start` - runs the compiler and a server at the same time, both in "watch mode".
* `npm run tsc` - runs the TypeScript compiler once.
* `npm run tsc:w` - runs the TypeScript compiler in watch mode; the process keeps running, awaiting changes to TypeScript files and re-compiling when it sees them.
* `npm run lite` - runs the [lite-server](https://www.npmjs.com/package/lite-server), a light-weight, static file server, written and maintained by
[John Papa](https://github.com/johnpapa) and
[Christopher Martin](https://github.com/cgmartin)
with excellent support for Angular apps that use routing.
* `npm run typings` - runs the typings tool.
* `npm run postinstall` - called by *npm* automatically *after* it successfully completes package installation. This script installs the TypeScript definition files this app requires.
Here are the test related scripts:
* `npm test` - compiles, runs and watches the karma unit tests
* `npm run e2e` - run protractor e2e tests, written in JavaScript (*e2e-spec.js)