mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Development
Building & Running Ionic Source
npm installgulp watch- Go to http://localhost:8000/dist/e2e/
- Stay cool
Building & Running Component Demos
- Clone the
ionic-siterepo inionic2/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
- Run
gulp watch:demosfrom the top level directory - Navigate to
ionic2/dist/ionic-siteand runnpm install - Run
gulp watchin this directory - A browser should launch at
http://localhost:3000at which point you can navigate tohttp://localhost:3000/docs/v2/components/
Building & Running API Demos
- Follow the steps for Building & Running Ionic Source
- Run
gulp demos - Run
gulp watch:demos - Navigate to
http://localhost:8000/dist/demos
Building API Docs
gulp docsto build the nightly versiongulp docs --doc-version=2.0.0to build a specific API version
Building NPM Module for Local Testing
From ionic repo root directory:
gulp package --strip-debug falsecd distsudo npm link- After ionic changes:
gulp transpile.no-typecheck --strip-debug false
From Testing App root directory:
npm link ionic-frameworkionic serveorionic runor whatever
When done:
- In testing app,
npm uninstall ionic-framework - In ionic repo,
sudo gulp clean
Running Snapshot
- Install Protractor:
npm install -g protractor - Export
IONIC_SNAPSHOT_KEY(get from someone) - Run
gulp snapshot
Running Tests
gulp karma
Releasing
Releasing Ionic Source
- Run
gulp prerelease
- Pulls latest
- updates package.json minor version
- updates changelog
- builds npm package files into dist
- Verify that changelog changes and package.json update are correct (
git status&&git diff) - Run snapshot & update if necessary
- Commit and push
- Run
gulp release
- publishes to npm
- Creates a new tag and release on Github
- 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.