chore(): update scripts README

This commit is contained in:
Tim Lancina
2016-02-04 16:32:19 -06:00
parent 60e1278939
commit 2178638659

View File

@ -1,30 +1,24 @@
# Development
## Getting Started
### Building & Running Ionic Source
All of these commands require you to run `npm install` first. Add the `--typecheck` flag to generate type definitions (`.d.ts`) and do type checking, but keep in mind builds and rebuilds when watching will be significantly slower (~1min and ~1s respectively, vs ~20s and ~200ms without typechecking).
1. `npm install`
2. `gulp watch`
3. Go to [http://localhost:8000/dist/e2e/](http://localhost:8000/dist/e2e/)
4. Stay cool
### Building Ionic Source
Run `gulp build` or `gulp watch` to watch for changes.
### Building & Running Component Demos
### Building & Running e2e Tests
1. Clone the `ionic-site` repo in `ionic2/dist/`: `git clone git@github.com:driftyco/ionic-site.git`
* You may need to remove the existing directory first: `rm -rf ionic2/dist/ionic-site`
2. Run `gulp watch:demos` from the top level directory
3. Navigate to `ionic2/dist/ionic-site` and run `npm install`
4. Run `gulp watch` in this directory
5. A browser should launch at `http://localhost:3000` at which point you can navigate to `http://localhost:3000/docs/v2/components/`
1. Run `gulp e2e` or `gulp watch.e2e` to watch for changes.
2. Navigate to `http://localhost:8000/dist/e2e`
### Building & Running API Demos
1. Follow the steps for [Building & Running Ionic Source](#building--running-ionic-source)
2. Run `gulp demos`
3. Run `gulp watch:demos`
4. Navigate to `http://localhost:8000/dist/demos`
1. Run `gulp demos` or `gulp watch.demos` to watch for changes.
2. Navigate to `http://localhost:8000/dist/demos`
### Building API Docs
@ -33,24 +27,20 @@
2. `gulp docs --doc-version=2.0.0` to build a specific API version
### Building NPM Module for Local Testing
### Developing against Ionic locally
From `ionic` repo root directory:
From `ionic` directory:
1. `gulp package --strip-debug false`
1. `gulp package build` (or `watch`, then open another terminal for step 2)
2. `cd dist`
3. `sudo npm link`
4. After ionic changes: `gulp transpile.no-typecheck --strip-debug false && gulp copy.scss`
3. `npm link` (may require `sudo`)
From Testing App root directory:
From your app directory:
1. `npm link ionic-framework`
2. `ionic serve` or `ionic run` or whatever
2. `ionic serve` or `ionic run` or `ionic emulate`
When done:
1. In testing app, `npm uninstall ionic-framework`
2. In ionic repo, `sudo gulp clean`
To remove the linked version of `ionic-framework` do `npm rm ionic-framework`, and then reinstall using `npm install ionic-framework`.
### Running Snapshot
@ -84,6 +74,7 @@ When done:
6. Sit back and have a beer :beer: (or wine :wine_glass:)
### Releasing Component Demos
(Copied from [ionic-preview-app](https://github.com/driftyco/ionic-preview-app#updating-ionic-site), check there for updates)
@ -93,8 +84,8 @@ When done:
- Copy the contents of this entire repo to `ionic-site/dist/preview-app/` (`cp -R * ../path/to/ionic-site/dist/preview-app/`)
### Releasing API Demos
Ionic API demos are automatically compiled and deployed to the [ionic staging site](http://ionic-site-staging.herokuapp.com/) on every commit. No action is necessary.
If you'd like to manually update the demos, clone the [`ionic-site`](https://github.com/driftyco/ionic-site) repo as a sibling of `ionic`. From `ionic` run gulp docs, and it'll compile and copy the demos to the `ionic-site` repo, ready for testing or committing.