Files
Tim Lancina dcc20fa983 fix(generators): use mkdirp-no-bin
When using npm link to develop against Ionic locally, most setups by
default require the use of 'sudo', which then requires the gulp clean
task to also be run with sudo.  Switch to mkdirp-no-bin so there are no
root owned files in dist/node_modules when using sudo npm link.
2016-02-04 15:23:00 -06:00
..
2015-12-10 16:39:56 -06:00
2016-01-14 16:52:46 -06:00
2015-11-18 15:25:59 -06:00
2016-02-04 15:23:00 -06:00
2015-11-18 15:25:59 -06:00
2015-11-18 15:25:59 -06:00

Development

Building & Running Ionic Source

  1. npm install
  2. gulp watch
  3. Go to http://localhost:8000/dist/e2e/
  4. Stay cool

Building & Running Component Demos

  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
  1. Run gulp watch:demos from the top level directory
  2. Navigate to ionic2/dist/ionic-site and run npm install
  3. Run gulp watch in this directory
  4. A browser should launch at http://localhost:3000 at which point you can navigate to http://localhost:3000/docs/v2/components/

Building & Running API Demos

  1. Follow the steps for Building & Running Ionic Source
  2. Run gulp demos
  3. Run gulp watch:demos
  4. Navigate to http://localhost:8000/dist/demos

Building API Docs

  1. gulp docs to build the nightly version
  2. gulp docs --doc-version=2.0.0 to build a specific API version

Building NPM Module for Local Testing

From ionic repo root directory:

  1. gulp package --strip-debug false
  2. cd dist
  3. sudo npm link
  4. After ionic changes: gulp transpile.no-typecheck --strip-debug false && gulp copy.scss

From Testing App root directory:

  1. npm link ionic-framework
  2. ionic serve or ionic run or whatever

When done:

  1. In testing app, npm uninstall ionic-framework
  2. In ionic repo, sudo gulp clean

Running Snapshot

  1. Install Protractor: npm install -g protractor
  2. Export IONIC_SNAPSHOT_KEY (get from someone)
  3. Run gulp snapshot

Running Tests

  1. gulp karma

Releasing

Releasing Ionic Source

  1. Run gulp prerelease
  • Pulls latest
  • updates package.json minor version
  • updates changelog
  • builds npm package files into dist
  1. Verify that changelog changes and package.json update are correct (git status && git diff)
  2. Run snapshot & update if necessary
  3. Commit and push
  4. Run gulp release
  • publishes to npm
  • Creates a new tag and release on Github
  1. Sit back and have a beer 🍺 (or wine 🍷)

Releasing Component Demos

(Copied from ionic-preview-app, check there for updates)

  • Set production mode to true
  • Rebuild app
  • 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 on every commit. No action is necessary.

If you'd like to manually update the demos, clone the 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.