All of these commands require you to run npm install first. To see a full list of the gulp commands, run gulp.
Please follow the commit message format in CONTRIBUTING.md.
The latest nightly version can be installed via npm.
- Run
npm install --save ionic-angular@nightly - Your
package.jsonfile'sdependencieswill be updated with the nightly version. - Restart any
watchorservecommands that may be already running.
Run gulp build or gulp watch to watch for changes.
- Run
gulp e2e.watch --folder nav/basicto watch for changes, wherenavis the component, andbasicis the test name - The browser will launch just like when using
ionic serve. Make changes to an app in thesrcdirectory and the app will rebuild.
The following commands take longer to run because they use AoT compilation. They should really only be used to validate that our components work with AoT, and fix them if not.
- Run
gulp e2e.prodto bundle all e2e tests.
--f | -folderwill run the command with a test folder.--debugwill run theionic-app-scriptscommand with debug output printed.
- Run
gulp demosorgulp demos.watchto watch for changes. - Navigate to
http://localhost:8000/dist/demos
The following commands take longer to run because they use AoT compilation. They should really only be used to validate that our components work with AoT, and fix them if not.
- Run
gulp demos.prodto bundle all demos tests. Folder is optional, see the flags section below. - Run
gulp demos.watchProdwith a folder passed to watch a test. Folder is required, see the flags section below. - Navigate to
http://localhost:8000/dist/demos
--f | -folderwill run the command with a test folder. For example,gulp demos.watchProd --f=alertwill build the test indemos/alert/.--debugwill run theionic-app-scriptscommand with debug output printed.
gulp docsto build the nightly versiongulp docs --doc-version=2.0.0to build a specific API version
From ionic directory:
npm run link
From your app directory:
npm link ionic-angularionic serveorionic runorionic emulate
To remove the linked version of ionic-angular do npm rm ionic-angular, and then reinstall using npm install ionic-angular.
Snapshot compares to a base snapshot made on Mac OS with retina screen (2560x1600). It does not work for windows, linux, or non retina macs.
- Install Java JDK:
brew cask install java - Install Protractor:
npm install -g protractor@2.5.1 - Run
webdriver-manager update - Export
IONIC_SNAPSHOT_KEY(get from someone)
gulp snapshotwill run thegulp e2e.prodtask with AoT compilation.gulp snapshot.skipBuildwill skip thegulp e2e.prodtask with AoT compilation.gulp e2e.prodfollowed bygulp snapshot.skipBuildis considered best practice
-
--f | -folderwill run the command with a test folder. For example,gulp snapshot --f=action-sheet/basicwill run snapshot for the test atsrc/components/action-sheet/test/basic. -
--concurrencydetermines the number of tests to build at a time. By default, 2 tests are built concurrently. If using a quad-core (or more) CPU, it is often beneficial to run with--concurrency 8for example. -
--devruns a dev build when building the e2e tests. This build takes much less time than a production build, so it is advisable to use this when doing quick validation.
If you are having getting an error running snapshot such as SessionNotCreatedError: session not created exception or UnknownError: Connection refused the solution is to download the chromedriver from here: http://chromedriver.storage.googleapis.com/index.html?path=2.24/ and then move it into your protractor/selenium folder
Running webdriver-manager help should show you what directory the webdriver is at under the options. For example, yours may be at /usr/local/lib/node_modules/protractor/selenium or if you use nvm /Users/{username}/.nvm/versions/node/v7.5.0/lib/node_modules/protractor/selenium.
gulp validate
Requires Ruby. Skip this step entirely if you are unable to install Ruby.
- See the Sass Guidelines for editing the Sass.
- Install the linter:
gem install scss_lint - Run
gulp lint.sassand fix any linter errors.
- Run
gulp lint.tsand fix any errors.
- Run snapshot & verify all changes are intentional, update master snapshot if so
- Run
gulp release
- Pulls latest from GitHub
- Runs
gulp validate - Builds npm package files into dist
- Updates package.json version
- Removes debug statements
- Updates changelog
- Publishes to npm
- Creates a new tag and release on Github
- Verify that the
changelogchanges are accurate and thepackage.jsonversion is correct (git status&&git diff) - Commit and push
- Sit back and have some beer 🍻 (or wine 🍷)
- Run
gulp nightly
- Pulls latest from GitHub
- Runs
gulp validate - Builds npm package files into dist
- Removes debug statements
- Publishes to npm using the
nightlytag with the date/time of publish added to the version:2.0.0-rc.0results in2.0.0-rc.0-201610131811
npm install ionic-angular@nightlywill now install the latest nightly release- Run
npm view ionic-angularto see the latest nightly release
Ionic Component demos are automatically compiled and deployed to the ionic staging site on every commit in ionic-preview-app. No action is necessary.
If you'd like to manually update the demos, follow the steps on the preview app for running locally on the site.
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 demos and then gulp docs, and it'll compile and copy the demos to the ionic-site repo, ready for testing.