Repository: driftyco/ionic-app-scripts
Branch: master
Commit: 972fdeccefbb
Files: 148
Total size: 814.5 KB
Directory structure:
gitextract_525rclba/
├── .editorconfig
├── .github/
│ ├── ISSUE_TEMPLATE.md
│ └── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── .npmrc
├── CHANGELOG.md
├── LICENSE
├── README.md
├── bin/
│ ├── ion-dev.js
│ └── ionic-app-scripts.js
├── circle.yml
├── config/
│ ├── cleancss.config.js
│ ├── copy.config.js
│ ├── sass.config.js
│ ├── uglifyjs.config.js
│ ├── watch.config.js
│ └── webpack.config.js
├── lab/
│ ├── index.html
│ └── static/
│ ├── css/
│ │ └── style.css
│ └── js/
│ └── lab.js
├── package.json
├── preprocessor.js
├── scripts/
│ ├── commit-changelog.js
│ ├── create-github-release.js
│ └── publish-nightly.js
├── src/
│ ├── aot/
│ │ ├── aot-compiler.ts
│ │ ├── compiler-host-factory.ts
│ │ ├── compiler-host.ts
│ │ └── utils.ts
│ ├── build/
│ │ └── util.ts
│ ├── build.spec.ts
│ ├── build.ts
│ ├── bundle.spec.ts
│ ├── bundle.ts
│ ├── clean.spec.ts
│ ├── clean.ts
│ ├── cleancss.spec.ts
│ ├── cleancss.ts
│ ├── copy.spec.ts
│ ├── copy.ts
│ ├── core/
│ │ ├── bundle-components.ts
│ │ ├── inject-script.spec.ts
│ │ ├── inject-scripts.ts
│ │ ├── ionic-global.spec.ts
│ │ └── ionic-global.ts
│ ├── declarations.d.ts
│ ├── deep-linking/
│ │ ├── util.spec.ts
│ │ └── util.ts
│ ├── deep-linking.spec.ts
│ ├── deep-linking.ts
│ ├── dev-client/
│ │ └── sass/
│ │ ├── _code-block.scss
│ │ ├── _diagnostics.scss
│ │ ├── _header.scss
│ │ ├── _options-menu.scss
│ │ ├── _stack-block.scss
│ │ ├── _system-info.scss
│ │ ├── _toast.scss
│ │ └── ion-dev.scss
│ ├── dev-server/
│ │ ├── http-server.ts
│ │ ├── injector.ts
│ │ ├── lab.ts
│ │ ├── live-reload.ts
│ │ ├── notification-server.ts
│ │ └── serve-config.ts
│ ├── generators/
│ │ ├── constants.ts
│ │ ├── util.spec.ts
│ │ └── util.ts
│ ├── generators.ts
│ ├── highlight/
│ │ ├── github-gist.scss
│ │ ├── highlight.spec.ts
│ │ └── highlight.ts
│ ├── index.ts
│ ├── lint/
│ │ ├── lint-factory.spec.ts
│ │ ├── lint-factory.ts
│ │ ├── lint-utils.spec.ts
│ │ └── lint-utils.ts
│ ├── lint.spec.ts
│ ├── lint.ts
│ ├── logger/
│ │ ├── logger-diagnostics.ts
│ │ ├── logger-runtime.ts
│ │ ├── logger-sass.ts
│ │ ├── logger-tslint.ts
│ │ ├── logger-typescript.ts
│ │ └── logger.ts
│ ├── minify.ts
│ ├── mocks/
│ │ └── mock-helpers.ts
│ ├── ngc.ts
│ ├── optimization/
│ │ ├── remove-unused-fonts.spec.ts
│ │ └── remove-unused-fonts.ts
│ ├── postprocess.ts
│ ├── preprocess.spec.ts
│ ├── preprocess.ts
│ ├── sass.ts
│ ├── serve.spec.ts
│ ├── serve.ts
│ ├── template.spec.ts
│ ├── template.ts
│ ├── transpile-worker.ts
│ ├── transpile.spec.ts
│ ├── transpile.ts
│ ├── uglifyjs.ts
│ ├── upgrade-scripts/
│ │ ├── add-default-ngmodules.spec.ts
│ │ └── add-default-ngmodules.ts
│ ├── util/
│ │ ├── clean-css-factory.ts
│ │ ├── config.spec.ts
│ │ ├── config.ts
│ │ ├── constants.ts
│ │ ├── cordova-config.spec.ts
│ │ ├── cordova-config.ts
│ │ ├── errors.spec.ts
│ │ ├── errors.ts
│ │ ├── events.ts
│ │ ├── file-cache.ts
│ │ ├── glob-util.ts
│ │ ├── helpers/
│ │ │ ├── camel-case-regexp.ts
│ │ │ ├── camel-case-upper-regexp.ts
│ │ │ └── non-word-regexp.ts
│ │ ├── helpers.spec.ts
│ │ ├── helpers.ts
│ │ ├── hybrid-file-system-factory.ts
│ │ ├── hybrid-file-system.ts
│ │ ├── interfaces.ts
│ │ ├── ionic-project.ts
│ │ ├── network.ts
│ │ ├── open.ts
│ │ ├── promisify.ts
│ │ ├── source-maps.spec.ts
│ │ ├── source-maps.ts
│ │ ├── typescript-utils.spec.ts
│ │ ├── typescript-utils.ts
│ │ └── virtual-file-utils.ts
│ ├── watch.spec.ts
│ ├── watch.ts
│ ├── webpack/
│ │ ├── cache-loader-impl.ts
│ │ ├── cache-loader.ts
│ │ ├── common-chunks-plugins.ts
│ │ ├── ionic-environment-plugin.ts
│ │ ├── ionic-webpack-factory.ts
│ │ ├── loader-impl.spec.ts
│ │ ├── loader-impl.ts
│ │ ├── loader.ts
│ │ ├── source-mapper.ts
│ │ └── watch-memory-system.ts
│ ├── webpack.ts
│ ├── worker-client.ts
│ └── worker-process.ts
├── tsconfig.json
└── tslint.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
# http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
================================================
FILE: .github/ISSUE_TEMPLATE.md
================================================
**Note: for support questions, please use one of these channels:**
https://forum.ionicframework.com/
http://ionicworldwide.herokuapp.com/
#### Short description of the problem:
#### What behavior are you expecting?
**Steps to reproduce:**
1.
2.
3.
```
insert any relevant code between the above and below backticks
```
**Which @ionic/app-scripts version are you using?**
**Other information:** (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
#### Short description of what this resolves:
#### Changes proposed in this pull request:
-
-
-
**Fixes**: #
================================================
FILE: .gitignore
================================================
.DS_Store
# Logs
logs
*.log
npm-debug.log*
# Runtime data
pids
*.pid
*.seed
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules
jspm_packages
# Optional npm cache directory
.npm
# Optional REPL history
.node_repl_history
# various
dist
.vscode
*.sw[mnpcod]
bin/ion-dev.css
# WebStorm
.idea
================================================
FILE: .npmrc
================================================
package-lock=false
================================================
FILE: CHANGELOG.md
================================================
## [3.2.4](https://github.com/ionic-team/ionic-app-scripts/compare/v3.2.3...v3.2.4) (2019-05-24)
### Bug Fixes
* **livereload:** always serve latest file changes ([#1521](https://github.com/ionic-team/ionic-app-scripts/issues/1521)) ([266a871](https://github.com/ionic-team/ionic-app-scripts/commit/266a871))
## [3.2.3](https://github.com/ionic-team/ionic-app-scripts/compare/v3.2.2...v3.2.3) (2019-03-01)
### Bug Fixes
* **livereload:** fix issue with files not reloading([8870a17](https://github.com/ionic-team/ionic-app-scripts/commit/8870a17))
## [3.2.2](https://github.com/ionic-team/ionic-app-scripts/compare/v3.2.1...v3.2.2) (2019-01-22)
* Added support for Node 10
## [3.2.1](https://github.com/ionic-team/ionic-app-scripts/compare/v3.2.0...v3.2.1) (2018-11-26)
* Security release for dependencies for `node-sass`
# [3.2.0](https://github.com/ionic-team/ionic-app-scripts/compare/v3.1.11...v3.2.0) (2018-08-24)
### Bug Fixes
* **sass:** remove PostCSS warning ([#1364](https://github.com/ionic-team/ionic-app-scripts/issues/1364)) ([1e2035e](https://github.com/ionic-team/ionic-app-scripts/commit/1e2035e)), closes [#1359](https://github.com/ionic-team/ionic-app-scripts/issues/1359) [#13763](https://github.com/ionic-team/ionic-app-scripts/issues/13763)
* **serve:** use wss protocol for secure websocket when page is using https ([#1358](https://github.com/ionic-team/ionic-app-scripts/issues/1358)) ([29c3e23](https://github.com/ionic-team/ionic-app-scripts/commit/29c3e23))
### Features
* **environments:** configuration via process.env.VAR replacement ([#1471](https://github.com/ionic-team/ionic-app-scripts/issues/1471)) ([53fc341](https://github.com/ionic-team/ionic-app-scripts/commit/53fc341))
## [3.1.11](https://github.com/ionic-team/ionic-app-scripts/compare/v3.1.10...v3.1.11) (2018-07-12)
### Bug Fixes
* **serve:** fix EADDRINUSE issue with dev logger server ([271a6e1](https://github.com/ionic-team/ionic-app-scripts/commit/271a6e1))
## [3.1.10](https://github.com/ionic-team/ionic-app-scripts/compare/v3.1.9...v3.1.10) (2018-06-11)
## [3.1.9](https://github.com/ionic-team/ionic-app-scripts/compare/v3.1.8...v3.1.9) (2018-04-18)
### Bug Fixes
* **2889:** fix build error with --prod ([94e5f7c](https://github.com/ionic-team/ionic-app-scripts/commit/94e5f7c))
* **live-server:** update android platform path ([#1407](https://github.com/ionic-team/ionic-app-scripts/issues/1407)) ([1591c81](https://github.com/ionic-team/ionic-app-scripts/commit/1591c81))
* **serve:** start listening when watch is ready ([06bbd06](https://github.com/ionic-team/ionic-app-scripts/commit/06bbd06))
## [3.1.8](https://github.com/ionic-team/ionic-app-scripts/compare/v3.1.7...v3.1.8) (2018-01-18)
This release includes a bump in the version of node-sass. This adds support for node 9.
## [3.1.7](https://github.com/ionic-team/ionic-app-scripts/compare/v3.1.6...v3.1.7) (2017-12-27)
### Bug Fixes
* pin uglify-es ([dacf080](https://github.com/ionic-team/ionic-app-scripts/commit/dacf080)), closes [#1353](https://github.com/ionic-team/ionic-app-scripts/issues/1353)
## [3.1.6](https://github.com/ionic-team/ionic-app-scripts/compare/v3.1.5...v3.1.6) (2017-12-18)
### Bug Fixes
* pin ws version ([db0cc4d](https://github.com/ionic-team/ionic-app-scripts/commit/db0cc4d))
## [3.1.5](https://github.com/ionic-team/ionic-app-scripts/compare/v3.1.4...v3.1.5) (2017-12-07)
### Bug Fixes
* **dependencies:** update angular build optimizer for a source map fix ([a5df139](https://github.com/ionic-team/ionic-app-scripts/commit/a5df139))
## [3.1.4](https://github.com/ionic-team/ionic-app-scripts/compare/v3.1.3...v3.1.4) (2017-11-30)
### Bug Fixes
* **aot:** remove template validation until we can properly handle the error message format ([d7c7136](https://github.com/ionic-team/ionic-app-scripts/commit/d7c7136))
## [3.1.3](https://github.com/ionic-team/ionic-app-scripts/compare/v3.1.2...v3.1.3) (2017-11-29)
### Bug Fixes
* **aot:** fix error reporting with ng 5.0.1 or greater ([dece391](https://github.com/ionic-team/ionic-app-scripts/commit/dece391))
## [3.1.2](https://github.com/ionic-team/ionic-app-scripts/compare/v3.1.1...v3.1.2) (2017-11-13)
### Bug Fixes
* **webpack:** revert to 3.6.0 for faster builds ([2553ca6](https://github.com/ionic-team/ionic-app-scripts/commit/2553ca6))
## [3.1.1](https://github.com/ionic-team/ionic-app-scripts/compare/v3.1.0...v3.1.1) (2017-11-13)
### Bug Fixes
* **AoT:** properly check for ngmodule declaration errors from the AoT build ([a47f120](https://github.com/ionic-team/ionic-app-scripts/commit/a47f120))
* **template:** fix bug with using dollar sign within templates ([de09048](https://github.com/ionic-team/ionic-app-scripts/commit/de09048))
# [3.1.0](https://github.com/ionic-team/ionic-app-scripts/compare/v3.0.1...v3.1.0) (2017-11-08)
## Features
Supports Angular 5
### Bug Fixes
* **aot:** pass genDir to ng4 ([7506764](https://github.com/ionic-team/ionic-app-scripts/commit/7506764))
* **config:** only read ionic-angular package json for version info in apps, not in the Ionic repo itself ([700ca04](https://github.com/ionic-team/ionic-app-scripts/commit/700ca04))
* **deep-linking:** use .ts file extension for lazy loading in dev mode, and .js in AoT mode since the AoT compiler no longer emits an ngfactory.ts file ([dd99f14](https://github.com/ionic-team/ionic-app-scripts/commit/dd99f14))
* **live-server:** content.toString() crash ([#1288](https://github.com/ionic-team/ionic-app-scripts/issues/1288)) ([07e7e05](https://github.com/ionic-team/ionic-app-scripts/commit/07e7e05))
* **templates:** escape strings in template ([484d90d](https://github.com/ionic-team/ionic-app-scripts/commit/484d90d))
### Performance Improvements
* **uglifyjs:** remove unused `readFileAsync` during uglify ([#1305](https://github.com/ionic-team/ionic-app-scripts/issues/1305)) ([e9217c2](https://github.com/ionic-team/ionic-app-scripts/commit/e9217c2))
## [3.0.1](https://github.com/ionic-team/ionic-app-scripts/compare/v3.0.0...v3.0.1) (2017-10-20)
### Bug Fixes
* **cleancss:** update to latest version of clean-css to mitigate issue with purging some css that should not be purged ([564bd61](https://github.com/ionic-team/ionic-app-scripts/commit/564bd61))
* **deep-linking:** ensure hasExistingDeepLinkConfig returns true where there is a config referenced by a variable ([2e40340](https://github.com/ionic-team/ionic-app-scripts/commit/2e40340))
* **deep-linking:** ensure the deepLinkDir ends in path.sep ([496af40](https://github.com/ionic-team/ionic-app-scripts/commit/496af40))
* set context right immediately ([802b329](https://github.com/ionic-team/ionic-app-scripts/commit/802b329))
* **dev-server:** fix for --nolivereload flag to stop reloading ([#1200](https://github.com/ionic-team/ionic-app-scripts/issues/1200)) ([d62f5da](https://github.com/ionic-team/ionic-app-scripts/commit/d62f5da))
* **html:** limit regex to only applicable script tags for replacing content ([93db0ef](https://github.com/ionic-team/ionic-app-scripts/commit/93db0ef))
* **proxy:** add a cookieRewrite option which is passed to proxy-middleware. ([#1226](https://github.com/ionic-team/ionic-app-scripts/issues/1226)) ([771ee63](https://github.com/ionic-team/ionic-app-scripts/commit/771ee63))
* **source-maps:** fix race condition between copying and purging source maps ([f5529b5](https://github.com/ionic-team/ionic-app-scripts/commit/f5529b5))
* **webpack:** always use modules output from webpack to form default basis of where to look for sass files ([c199ea4](https://github.com/ionic-team/ionic-app-scripts/commit/c199ea4))
# [3.0.0](https://github.com/ionic-team/ionic-app-scripts/compare/v2.1.4...v3.0.0) (2017-09-28)
### Breaking Changes
The `webpack` config format changed from being a config that is exported to being a dictionary of configs. Basically, the default config now exports a `dev` and `prod` property with a config assigned to each. See an example of the change [here](https://github.com/ionic-team/ionic-app-scripts/blob/master/config/webpack.config.js#L143-L146). This change is setting the stage for adding multiple "environment" support for the next app-scripts release.
### New Features
This release adds support for `ngo`, the Angular team's build optimizer tool. `ngo` is enabled by default on `--prod` builds. In the event that `ngo` is not working for your app or something goes wrong, it can be disabled by running the following build command.
```
ionic cordova build ios --aot --minifyjs --minifycss --optimizejs
```
Using the `--aot` flag enables the `AoT Compiler`. `--minifyjs` and `--minifycss` minify the outputted code.
### Notes
Version `3.0.0` deprecated support for Rollup, Closure Compiler, and Babili. The support for these was poor and they were not used by many developers. `uglifyjs` was replaced with the newer `uglifyes`, which supports ES2015.
### Bug Fixes
* **aot:** normalize paths to fix path issues on windows ([b766037](https://github.com/ionic-team/ionic-app-scripts/commit/b766037))
* **build:** scan deeplink dir too if different from srcDir ([8929265](https://github.com/ionic-team/ionic-app-scripts/commit/8929265))
* **deep-linking:** convert deep linking to use TS Transform. DeepLinking now works on TypeScript src instead of on transpiled JS code ([63c4c7f](https://github.com/ionic-team/ionic-app-scripts/commit/63c4c7f))
* **deep-linking:** remove IonicPage import statement in transform/non-transform approachs to work better with strict TS settings ([84d9ec7](https://github.com/ionic-team/ionic-app-scripts/commit/84d9ec7))
* **devapp:** do not enable shake ([#1215](https://github.com/ionic-team/ionic-app-scripts/issues/1215)) ([118189c](https://github.com/ionic-team/ionic-app-scripts/commit/118189c))
* **generators:** correct pipes default folder name ([f0ea0da](https://github.com/ionic-team/ionic-app-scripts/commit/f0ea0da))
* **ngc:** don't replace deeplink config if an existing one exists ([eeed98b](https://github.com/ionic-team/ionic-app-scripts/commit/eeed98b))
* **optimization:** removing optimizations in preparation for ngo, updating to latest deps ([90eb8b3](https://github.com/ionic-team/ionic-app-scripts/commit/90eb8b3))
* **postprocess:** fix and add tests for the logic surrounding purging fonts ([0dd1b22](https://github.com/ionic-team/ionic-app-scripts/commit/0dd1b22))
* **sass:** include the platforms dir by default ([0da47cb](https://github.com/ionic-team/ionic-app-scripts/commit/0da47cb))
* **transpile:** check for existing deep link config before using generated one ([c51ac93](https://github.com/ionic-team/ionic-app-scripts/commit/c51ac93))
* **webpack:** when analyzing stats, factor in new shape of ModuleConcatenation info ([00cf038](https://github.com/ionic-team/ionic-app-scripts/commit/00cf038))
## [2.1.4](https://github.com/ionic-team/ionic-app-scripts/compare/v2.1.3...v2.1.4) (2017-08-16)
### Bug Fixes
* make --lab respect --nobrowser ([8db3be5](https://github.com/ionic-team/ionic-app-scripts/commit/8db3be5))
* **serve:** allow multiple arguments in console.log ([5c00970](https://github.com/ionic-team/ionic-app-scripts/commit/5c00970))
* **serve:** fix --consolelogs/--serverlogs usage with Cordova console plugin ([8e64407](https://github.com/ionic-team/ionic-app-scripts/commit/8e64407))
* **serve:** fix 'launchBrowser' of undefined ([8f71e35](https://github.com/ionic-team/ionic-app-scripts/commit/8f71e35))
### Features
* **sourcemaps:** copy for prod and dev ([a1ccc17](https://github.com/ionic-team/ionic-app-scripts/commit/a1ccc17))
* **sourcemaps:** preserve prod sourcemaps out of code dir ([ee3e41b](https://github.com/ionic-team/ionic-app-scripts/commit/ee3e41b))
## [2.1.3](https://github.com/ionic-team/ionic-app-scripts/compare/v2.1.2...v2.1.3) (2017-07-27)
### Bug Fixes
* **lab:** remove es6 features from lab ([41a1335](https://github.com/ionic-team/ionic-app-scripts/commit/41a1335))
## [2.1.2](https://github.com/ionic-team/ionic-app-scripts/compare/v2.1.1...v2.1.2) (2017-07-27)
### Bug Fixes
* **generators:** handle old cli ([6fd622c](https://github.com/ionic-team/ionic-app-scripts/commit/6fd622c))
## [2.1.1](https://github.com/ionic-team/ionic-app-scripts/compare/v2.1.0...v2.1.1) (2017-07-27)
### Bug Fixes
* **generator:** write file sync ([b0bcb05](https://github.com/ionic-team/ionic-app-scripts/commit/b0bcb05))
* **generators:** add exception for providers ([db9c793](https://github.com/ionic-team/ionic-app-scripts/commit/db9c793))
### Features
* **webpack:** update to latest webpack ([67907b6](https://github.com/ionic-team/ionic-app-scripts/commit/67907b6))
# [2.1.0](https://github.com/ionic-team/ionic-app-scripts/compare/v2.0.2...v2.1.0) (2017-07-25)
### Bug Fixes
* **generators:** handle no ngModule in tabs ([653d9f2](https://github.com/ionic-team/ionic-app-scripts/commit/653d9f2))
### Features
* **generators:** refactor generators ([beaf0d3](https://github.com/ionic-team/ionic-app-scripts/commit/beaf0d3))
## [2.0.2](https://github.com/ionic-team/ionic-app-scripts/compare/v2.0.1...v2.0.2) (2017-07-13)
## Upgrading
Make sure you follow the instructions below for upgrading from `1.x` to `2.x`. In the `2.0.2` release, we had to make a small change to the `optimization` config. If you override this config, please review the [change](https://github.com/ionic-team/ionic-app-scripts/commit/785e044) and update your config accordingly.
### Bug Fixes
* **sass:** fix potential null pointer, though it really should never happen ([427e556](https://github.com/ionic-team/ionic-app-scripts/commit/427e556))
* **webpack:** don't output deptree.js, this requires a minor tweak to the optimization config if you have it customized ([785e044](https://github.com/ionic-team/ionic-app-scripts/commit/785e044))
* **webpack:** upgrade to webpack 3.2.0 to fix some bugs within Webpack surrounding the ModuleConcatenationPlugin ([f85ade0](https://github.com/ionic-team/ionic-app-scripts/commit/f85ade0))
## [2.0.1](https://github.com/ionic-team/ionic-app-scripts/compare/v2.0.0...v2.0.1) (2017-07-11)
## Upgrading from 1.x
If you're upgrading directly from `1.3.12` or earlier, make sure you review the changelog for `2.0.0` and follow the [instructions here](https://github.com/ionic-team/ionic-app-scripts/releases/tag/v2.0.0). There were some very minor updates you'll need to make to your app.
If you're customizing the build process and have a dependency that utilized `webpack@2.x`, it may be best to add an explicit `devDependency` on `webpack@3.1.0` to the project's `package.json` file. There have been a couple reports of non-standard 3rd party dependencies causing trouble with the `webpack` version.
### Bug Fixes
* **generators:** no module by default ([#1096](https://github.com/ionic-team/ionic-app-scripts/issues/1096)) ([dfcaefa](https://github.com/ionic-team/ionic-app-scripts/commit/dfcaefa))
* **http-server:** revert change for path-based routing since it broke proxies ([065912e](https://github.com/ionic-team/ionic-app-scripts/commit/065912e))
* **sass:** use webpack/rollup modules for non-optimized build, use optimization data for prod/optimized buids ([0554201](https://github.com/ionic-team/ionic-app-scripts/commit/0554201))
* **serve:** fix cached file issue by only using the webpack module concat plugin for prod builds, make sure you update custom configs ([feea7fe](https://github.com/ionic-team/ionic-app-scripts/commit/feea7fe))
* **webpack:** webpack in-memory output file system was breaking some plugins ([574da39](https://github.com/ionic-team/ionic-app-scripts/commit/574da39))
# [2.0.0](https://github.com/ionic-team/ionic-app-scripts/compare/v1.3.12...v2.0.0) (2017-07-07)
### Breaking Changes
In order to speed up the bundling process, we have separated `node_modules` code into a new, generated file called `vendor.js`. This means that on every change, `ionic-angular`, `@angular`, etc won't need to be processed by `webpack` :tada:
This means that `src/index.html` must be modified to include a new vendor script tag ``. This new script tag must be placed above the `main.js` script tag. For example,
```
...
...
```
Another side effect of this change is if you are overriding the `webpack` configuration, you will want to update your custom configuration based on the [new default configuration](https://github.com/ionic-team/ionic-app-scripts/blob/master/config/webpack.config.js). The main changes to the config are adding the `ModuleConcatenationPlugin` for scope hoisting for significantly faster apps, and adding the common chunks plugin for the `vendor.js` bundle.
See commits [e14f819](https://github.com/ionic-team/ionic-app-scripts/commit/e14f819) and [141cb23](https://github.com/ionic-team/ionic-app-scripts/commit/141cb23) for the specifics of the `webpack.config.js` change.
### Bug Fixes
* **config:** updated polyname env variable to match convention and fix typo with it ([d64fcb1](https://github.com/ionic-team/ionic-app-scripts/commit/d64fcb1))
* **lint:** improve linting performance ([106d82c](https://github.com/ionic-team/ionic-app-scripts/commit/106d82c))
* **sass:** dont try to process invalid directories ([8af9430](https://github.com/ionic-team/ionic-app-scripts/commit/8af9430))
* **sass:** fix a bug when calling sass task in stand alone fashion ([54bf3f6](https://github.com/ionic-team/ionic-app-scripts/commit/54bf3f6))
### Features
* **dev-server:** add support for path-based routing ([2441591](https://github.com/ionic-team/ionic-app-scripts/commit/2441591))
* **webpack:** add scope hoisting to webpack, update sass to read scss files from disk ([e14f819](https://github.com/ionic-team/ionic-app-scripts/commit/e14f819))
* **webpack:** use a vendor bundle to minimize code that needs re-bundling and source map generation ([141cb23](https://github.com/ionic-team/ionic-app-scripts/commit/141cb23))
* **webpack:** webpack 3.1.0 holy speed upgrade! ([a3bde4a](https://github.com/ionic-team/ionic-app-scripts/commit/a3bde4a))
## [1.3.12](https://github.com/ionic-team/ionic-app-scripts/compare/v1.3.11...v1.3.12) (2017-06-29)
## Bug Fixes
* **dependencies:** Added `reflect-metadata` to the list of dependencies ([e6f8481](https://github.com/ionic-team/ionic-app-scripts/commit/e6f8481)
## [1.3.11](https://github.com/ionic-team/ionic-app-scripts/compare/v1.3.10...v1.3.11) (2017-06-28)
## Bug Fixes
* **dependencies:** Removed `peerDependencies`. ([90cd59d](https://github.com/ionic-team/ionic-app-scripts/commit/90cd59d))
## [1.3.10](https://github.com/ionic-team/ionic-app-scripts/compare/v1.3.9...v1.3.10) (2017-06-28)
## Notes
Ionic updated to npm 5 across the board, so please update to npm 5 to utilize our lock file when contributing.
### Bug Fixes
* **bonjour:** remove bonjour as its causing trouble for users on Windows without git ([e4b5c59](https://github.com/ionic-team/ionic-app-scripts/commit/e4b5c59))
## [1.3.9](https://github.com/ionic-team/ionic-app-scripts/compare/v1.3.8...v1.3.9) (2017-06-28)
### Features
* **lab:** first iteration of the new Ionic Lab design
* **scripts:** push npm build to arbitrary tag ([#1060](https://github.com/ionic-team/ionic-app-scripts/issues/1060)) ([4e93f60](https://github.com/ionic-team/ionic-app-scripts/commit/4e93f60))
## [1.3.8](https://github.com/ionic-team/ionic-app-scripts/compare/v1.3.7...v1.3.8) (2017-06-21)
### Bug Fixes
* **sass:** fixes issue with Node 8 and node-sass
* **bonjour:** updates dependency + better error handling ([#1040](https://github.com/ionic-team/ionic-app-scripts/issues/1040)) ([e2f73c7](https://github.com/ionic-team/ionic-app-scripts/commit/e2f73c7))
* **core:** use lower case attrs and not dash case ([0154791](https://github.com/ionic-team/ionic-app-scripts/commit/0154791))
* **diagnostics:** change direction to always be ltr ([#1004](https://github.com/ionic-team/ionic-app-scripts/issues/1004)) ([6d5ef3c](https://github.com/ionic-team/ionic-app-scripts/commit/6d5ef3c))
* **lab:** allow params to be passed to iframes ([dabfdd1](https://github.com/ionic-team/ionic-app-scripts/commit/dabfdd1))
* **sass:** fix .sass files not being watched ([#957](https://github.com/ionic-team/ionic-app-scripts/issues/957)) ([0803eca](https://github.com/ionic-team/ionic-app-scripts/commit/0803eca))
* **serve:** if a build error occurs, return config if non-fatal ([e5a4134](https://github.com/ionic-team/ionic-app-scripts/commit/e5a4134))
## [1.3.7](https://github.com/ionic-team/ionic-app-scripts/compare/v1.3.6...v1.3.7) (2017-05-04)
### Bug Fixes
* **config:** create new file cache if not defined, even on existing context object ([4359b3d](https://github.com/ionic-team/ionic-app-scripts/commit/4359b3d))
* **generators:** import paths correct on windows ([d778857](https://github.com/ionic-team/ionic-app-scripts/commit/d778857))
* **optimizations:** don't ever remove menu-types since it's not a side-effect in menu, it is used just for types ([d7a4d1e](https://github.com/ionic-team/ionic-app-scripts/commit/d7a4d1e))
* **optimizations:** fix multiple bugs (components not being purged, overlays not working from providers, etc) for manual tree shaking ([4b538c7](https://github.com/ionic-team/ionic-app-scripts/commit/4b538c7))
* **webpack:** fix issue where bundles output to build dir sub directo… ([#938](https://github.com/ionic-team/ionic-app-scripts/issues/938)) ([aaa9d3c](https://github.com/ionic-team/ionic-app-scripts/commit/aaa9d3c))
### Features
* **bonjour:** adds service auto-discovery ([c17e6df](https://github.com/ionic-team/ionic-app-scripts/commit/c17e6df))
## [1.3.6](https://github.com/ionic-team/ionic-app-scripts/compare/v1.3.5...v1.3.6) (2017-04-27)
### Bug Fixes
* **webpack:** fix issue PR introduced with lazy loaded modules and webpack throwing an invalid error ([fb8b69a](https://github.com/ionic-team/ionic-app-scripts/commit/fb8b69a))
### Features
* **optimization:** enable manual tree shaking by default ([1c57ee6](https://github.com/ionic-team/ionic-app-scripts/commit/1c57ee6))
## [1.3.5](https://github.com/ionic-team/ionic-app-scripts/compare/v1.3.4...v1.3.5) (2017-04-26)
### Bug Fixes
* **build:** fix `extends` in `ts-config.json` ([#910](https://github.com/ionic-team/ionic-app-scripts/issues/910)) ([0f01603](https://github.com/ionic-team/ionic-app-scripts/commit/0f01603))
* **deep-linking:** fix issue where deep link config ends up being null when full build is triggered via a change to a template file with the identical content ([68fc463](https://github.com/ionic-team/ionic-app-scripts/commit/68fc463))
* **serve:** Fix for browser not opening on linux, fixes [#425](https://github.com/ionic-team/ionic-app-scripts/issues/425) ([#909](https://github.com/ionic-team/ionic-app-scripts/issues/909)) ([77edbc6](https://github.com/ionic-team/ionic-app-scripts/commit/77edbc6))
### Features
* **sass:** add option to pass addition postcss plugins ([#369](https://github.com/ionic-team/ionic-app-scripts/issues/369)) ([be30a40](https://github.com/ionic-team/ionic-app-scripts/commit/be30a40))
## [1.3.4](https://github.com/ionic-team/ionic-app-scripts/compare/v1.3.3...v1.3.4) (2017-04-18)
### Bug Fixes
* **webpack:** make ionic-angular/util dir dynamic and use the environment variable of ionic angular ([d3346b3](https://github.com/ionic-team/ionic-app-scripts/commit/d3346b3))
## [1.3.3](https://github.com/ionic-team/ionic-app-scripts/compare/v1.3.2...v1.3.3) (2017-04-14)
### Bug Fixes
* **optimizations:** temporarily do not purge ctor params from any of angular ([212146c](https://github.com/ionic-team/ionic-app-scripts/commit/212146c))
## [1.3.2](https://github.com/ionic-team/ionic-app-scripts/compare/v1.3.1...v1.3.2) (2017-04-12)
### Bug Fixes
* **deep-linking:** fix bug with null deep link config when modifying the main NgModule file (app.module.ts) ([759bb4f](https://github.com/ionic-team/ionic-app-scripts/commit/759bb4f))
* **optimization:** don't purge ctorParams for angular core or angular platform browser ([9562181](https://github.com/ionic-team/ionic-app-scripts/commit/9562181))
* **uglifyjs:** only minify files processed by webpack or rollup ([30ecdd8](https://github.com/ionic-team/ionic-app-scripts/commit/30ecdd8))
## [1.3.1](https://github.com/ionic-team/ionic-app-scripts/compare/v1.3.0...v1.3.1) (2017-04-06)
### Bug Fixes
* **config:** revert change and once again transpile bundle by default. ([b558584](https://github.com/ionic-team/ionic-app-scripts/commit/b558584))
* **decorators:** don't remove third party transpiled (not static) decorators ([3a3259a](https://github.com/ionic-team/ionic-app-scripts/commit/3a3259a))
* **deep-linking:** don't force the main bundle to be re-built unless the deep link config changed ([02b8e97](https://github.com/ionic-team/ionic-app-scripts/commit/02b8e97))
* **errors:** better error msg reporting from worker threads ([d9d000a](https://github.com/ionic-team/ionic-app-scripts/commit/d9d000a))
* **uglifyjs:** better error msg reporting ([49c0afb](https://github.com/ionic-team/ionic-app-scripts/commit/49c0afb))
# [1.3.0](https://github.com/ionic-team/ionic-app-scripts/compare/v1.2.5...v1.3.0) (2017-04-05)
### Features
* **optimization:** purge decorators enabled by default ([b626e00](https://github.com/ionic-team/ionic-app-scripts/commit/b626e00))
* **optimizations:** purge transpiled decorators ([ba5e0cd](https://github.com/ionic-team/ionic-app-scripts/commit/ba5e0cd))
## [1.2.5](https://github.com/ionic-team/ionic-app-scripts/compare/v1.2.4...v1.2.5) (2017-03-31)
### Bug Fixes
* **webpack:** fixes bugs where some third party libs didn't load correctly ([e7559e5](https://github.com/ionic-team/ionic-app-scripts/commit/e7559e5))
## [1.2.4](https://github.com/ionic-team/ionic-app-scripts/compare/v1.2.3...v1.2.4) (2017-03-30)
### Refactor
* **deep-linking:** set default segment value to filename without extension([5a97ba5](https://github.com/ionic-team/ionic-app-scripts/commit/5a97ba5))
## [1.2.3](https://github.com/ionic-team/ionic-app-scripts/compare/v1.2.2...v1.2.3) (2017-03-29)
### Bug Fixes
* **deep-linking:** Deep linking fixes for Windows and non-unix paths
* **script:** linux only accepts one argument after shebang, so revert giving app-scripts more memory by default ([0999f23](https://github.com/ionic-team/ionic-app-scripts/commit/0999f23)), closes [#838](https://github.com/ionic-team/ionic-app-scripts/issues/838)
## [1.2.2](https://github.com/ionic-team/ionic-app-scripts/compare/v1.2.1...v1.2.2) (2017-03-27)
### Bug Fixes
* **generators:** use correct path and handle providers correctly ([e82d5ff](https://github.com/ionic-team/ionic-app-scripts/commit/e82d5ff))
* **rollup:** pass all config options to generate ([3502360](https://github.com/ionic-team/ionic-app-scripts/commit/3502360))
## [1.2.1](https://github.com/ionic-team/ionic-app-scripts/compare/v1.2.0...v1.2.1) (2017-03-26)
### Bug Fixes
* **deep-linking:** only attempt to inject deep-link config if there isn't an existing config and the ([507f1a8](https://github.com/ionic-team/ionic-app-scripts/commit/507f1a8))
* **rollup:** fix bug with not generating source-map correctly ([3b1fd16](https://github.com/ionic-team/ionic-app-scripts/commit/3b1fd16))
# [1.2.0](https://github.com/ionic-team/ionic-app-scripts/compare/v1.1.4...v1.2.0) (2017-03-24)
### Bug Fixes
* **deep-linking:** Fix issue with deep-linking when attempting to update a template and failing, resulting in a full build but not processing deep links ([6b158d3](https://github.com/ionic-team/ionic-app-scripts/commit/6b158d3))
* **optimization:** fix out of memory errors by providing more memory by default ([b4c287a](https://github.com/ionic-team/ionic-app-scripts/commit/b4c287a))
* **optimizations:** only store ionic and src files in memory ([f51314f](https://github.com/ionic-team/ionic-app-scripts/commit/f51314f))
* **uglify:** check for correct file extension ([d17f2e1](https://github.com/ionic-team/ionic-app-scripts/commit/d17f2e1))
* **uglify:** verify source maps are generated correctly for all bundles, tests ([fc44ca6](https://github.com/ionic-team/ionic-app-scripts/commit/fc44ca6))
* **utils:** assign correct type ([3c3666c](https://github.com/ionic-team/ionic-app-scripts/commit/3c3666c))
* **watch:** fixed bug where options.ignore was being ignored if it's an array ([7f1e54c](https://github.com/ionic-team/ionic-app-scripts/commit/7f1e54c))
* **watch:** queue builds ([06e4971](https://github.com/ionic-team/ionic-app-scripts/commit/06e4971))
* **watch:** queue buildUpdates events to avoid race conditions when bundling/building ([43caefa](https://github.com/ionic-team/ionic-app-scripts/commit/43caefa))
* **webpack:** don't overwrite css files when outputting webpack files ([a32649f](https://github.com/ionic-team/ionic-app-scripts/commit/a32649f))
### Features
* **serve:** change http-server to use request hostname instead of the configured hostname. ([8e1e81a](https://github.com/ionic-team/ionic-app-scripts/commit/8e1e81a))
* **deep-linking:** generate default NgModule when missing by default ([90138fa](https://github.com/ionic-team/ionic-app-scripts/commit/90138fa))
* **deep-linking:** parsing deeplink decorator is now enabled by default, no longer experimental ([e097d4e](https://github.com/ionic-team/ionic-app-scripts/commit/e097d4e))
* **deep-linking:** upgrade script to generate NgModules for pages with [@DeepLink](https://github.com/DeepLink) decorator ([2943188](https://github.com/ionic-team/ionic-app-scripts/commit/2943188))
* **generators:** generators for page, component, directive, pipe, provider ([e2a45e4](https://github.com/ionic-team/ionic-app-scripts/commit/e2a45e4))
* **minification:** code-split bundles will be minified ([#814](https://github.com/ionic-team/ionic-app-scripts/issues/814)) ([d8d9a4e](https://github.com/ionic-team/ionic-app-scripts/commit/d8d9a4e))
## [1.1.4](https://github.com/ionic-team/ionic-app-scripts/compare/v1.1.3...v1.1.4) (2017-02-23)
### Bug Fixes
* **optimizations:** comment out code instead of purge it so source-maps don't error out in some edge ([1dedc53](https://github.com/ionic-team/ionic-app-scripts/commit/1dedc53))
* **watch:** make default watch fail-to-start timeout configurable so it works more reliably on slow ([2e2a647](https://github.com/ionic-team/ionic-app-scripts/commit/2e2a647)), closes [#772](https://github.com/ionic-team/ionic-app-scripts/issues/772)
## [1.1.3](https://github.com/ionic-team/ionic-app-scripts/compare/v1.1.2...v1.1.3) (2017-02-17)
### Bug Fixes
* **config:** Setting readConfigJson constant wrong ([#761](https://github.com/ionic-team/ionic-app-scripts/issues/761)) ([64bc17f](https://github.com/ionic-team/ionic-app-scripts/commit/64bc17f))
* **source-maps:** source map must correspond to .js file name with a .map at the end ([debd88b](https://github.com/ionic-team/ionic-app-scripts/commit/debd88b))
## [1.1.2](https://github.com/ionic-team/ionic-app-scripts/compare/v1.1.1...v1.1.2) (2017-02-16)
### Bug Fixes
* **deep-links:** handle configs with internal arrays ([a7df816](https://github.com/ionic-team/ionic-app-scripts/commit/a7df816))
* **deep-links:** only provide deep links to webpack that contain the import used in code and the abs ([fae4862](https://github.com/ionic-team/ionic-app-scripts/commit/fae4862))
* **optimizations:** remove the js file created by the optimizations bundling pass ([c0bb3f4](https://github.com/ionic-team/ionic-app-scripts/commit/c0bb3f4))
## [1.1.1](https://github.com/ionic-team/ionic-app-scripts/compare/v1.1.0...v1.1.1) (2017-02-15)
### Bug Fixes
* **config:** node_modules directory should not be configurable (users were finding it confusing) ([1f58aaa](https://github.com/ionic-team/ionic-app-scripts/commit/1f58aaa))
* **copy:** support overriding config entries with empty objects ([5879a8b](https://github.com/ionic-team/ionic-app-scripts/commit/5879a8b))
* **deeplinks:** make deep link config parsing support 2.x and 3.x deep link config ([1ac7116](https://github.com/ionic-team/ionic-app-scripts/commit/1ac7116))
* **deeplinks:** provide deep-links config to webpack as needed vs via the constructor ([a735e96](https://github.com/ionic-team/ionic-app-scripts/commit/a735e96))
* **http-server:** drive reading ionic.config.json based on config value ([e2d0d83](https://github.com/ionic-team/ionic-app-scripts/commit/e2d0d83))
* **optimizations:** throw error when ionic-angular index file isn't found ([6437005](https://github.com/ionic-team/ionic-app-scripts/commit/6437005))
* **transpile:** get tsconfig.json location from config value ([79b0eeb](https://github.com/ionic-team/ionic-app-scripts/commit/79b0eeb))
# [1.1.0](https://github.com/ionic-team/ionic-app-scripts/compare/v1.0.1...v1.1.0) (2017-02-11)
### Optimizations
We are starting to introduce optimizations to improve the size of the `bundle` generated by the build process.
The first set of optimizations are behind flags:
`ionic_experimental_manual_treeshaking` will remove Ionic components and code that are not being used from the bundle.
`ionic_experimental_purge_decorators` helps tree shaking by removing unnecessary `decorator` metadata from AoT code.
Since these are experimental, we are looking for feedback on how the work. Please test them out and [let us know](https://github.com/ionic-team/ionic-app-scripts/issues) how it goes. See the instructions [here](https://github.com/ionic-team/ionic-app-scripts#custom-configuration).
### Features
* **fonts:** remove used fonts for cordova builds ([967f784](https://github.com/ionic-team/ionic-app-scripts/commit/967f784))
### Bug Fixes
* **build:** fix test if linting should trigger on file change ([#719](https://github.com/ionic-team/ionic-app-scripts/issues/719)) ([e13b857](https://github.com/ionic-team/ionic-app-scripts/commit/e13b857))
* **lint:** capture results of all linted files ([eb4314e](https://github.com/ionic-team/ionic-app-scripts/commit/eb4314e)), closes [#725](https://github.com/ionic-team/ionic-app-scripts/issues/725)
* **optimizations:** make optimizations work on windows and mac ([5fe21f3](https://github.com/ionic-team/ionic-app-scripts/commit/5fe21f3))
* **serve:** assign all ports dynamically ([#727](https://github.com/ionic-team/ionic-app-scripts/issues/727)) ([6b4115c](https://github.com/ionic-team/ionic-app-scripts/commit/6b4115c))
* **webpack:** fix bug with using [name] for output file name ([1128c9c](https://github.com/ionic-team/ionic-app-scripts/commit/1128c9c))
## [1.0.1](https://github.com/ionic-team/ionic-app-scripts/compare/v1.0.0...v1.0.1) (2017-02-07)
### Breaking Changes
This release was accidentally published with a breaking change for Deep Links. If you're using Deep Links, please don't upgrade to this version. We are in the process of changing the DeepLinks API slightly.
### Bug Fixes
* **angular:** support angular 2.3+ ngc api ([13e930a](https://github.com/ionic-team/ionic-app-scripts/commit/13e930a))
* **deep-linking:** works when there isn't a valid deep link config ([62f05fc](https://github.com/ionic-team/ionic-app-scripts/commit/62f05fc))
* **deep-links:** adjust paths for AoT ([4055d73](https://github.com/ionic-team/ionic-app-scripts/commit/4055d73))
* **sass:** output valid source maps, that chrome can parse ([#306](https://github.com/ionic-team/ionic-app-scripts/issues/306)) ([6589550](https://github.com/ionic-team/ionic-app-scripts/commit/6589550))
* **source-maps:** always generate source map, then purge them if not needed in postprocess step ([d26b44c](https://github.com/ionic-team/ionic-app-scripts/commit/d26b44c))
### Features
* **createWorker:** pass argv and config_argv to spawned processes ([#487](https://github.com/ionic-team/ionic-app-scripts/issues/487)) ([02dfff8](https://github.com/ionic-team/ionic-app-scripts/commit/02dfff8))
* **lint:** new option to have stand alone lint bail ([b3bb906](https://github.com/ionic-team/ionic-app-scripts/commit/b3bb906))
# [1.0.0](https://github.com/ionic-team/ionic-app-scripts/compare/v0.0.48...v1.0.0) (2017-01-06)
### Upgrade Instructions
Execute the following command from your ionic project. This installs a new peer dependency called `sw-toolbox` that is used to simplify implementing a service-worker.
```
npm install sw-toolbox --save --save-exact
```
### Bug Fixes
* **build:** check to ensure tsconfig contains sourcemaps true. ([e6bcf22](https://github.com/ionic-team/ionic-app-scripts/commit/e6bcf22))
* **config:** resolve any inputs that could be paths to absolute paths ([50876eb](https://github.com/ionic-team/ionic-app-scripts/commit/50876eb))
* **copy:** check for null object and src/dest ([eabd125](https://github.com/ionic-team/ionic-app-scripts/commit/eabd125))
* **ngc:** revert change to purge decorators (Angular CLI did too) ([8aae85c](https://github.com/ionic-team/ionic-app-scripts/commit/8aae85c))
* **webpack:** update environment plugin for webpack 2 RC3 ([be3aac1](https://github.com/ionic-team/ionic-app-scripts/commit/be3aac1))
* **websockets:** fix exception when no ws clients connected during rebuild ([#616](https://github.com/ionic-team/ionic-app-scripts/issues/616)) ([8685bf8](https://github.com/ionic-team/ionic-app-scripts/commit/8685bf8))
## [0.0.48](https://github.com/ionic-team/ionic-app-scripts/compare/v0.0.47...v0.0.48) (2016-12-19)
### Upgrade Instructions
`@ionic/app-scripts` version `0.0.47` had some breaking changes so please make sure you have performed those upgrade instructions.
### Bug Fixes
* **diagnostics:** fix null pointers ([72adc86](https://github.com/ionic-team/ionic-app-scripts/commit/72adc86))
* **inline-templates:** check for existence of content ([#557](https://github.com/ionic-team/ionic-app-scripts/issues/557)) ([b68e125](https://github.com/ionic-team/ionic-app-scripts/commit/b68e125))
* **logging:** don't log msgs about websocket state ([18185fb](https://github.com/ionic-team/ionic-app-scripts/commit/18185fb))
* **optimization:** stop removing decorators ([45b0255](https://github.com/ionic-team/ionic-app-scripts/commit/45b0255))
* **serve:** find an open port for the notification server if port is used. ([d6de413](https://github.com/ionic-team/ionic-app-scripts/commit/d6de413))
* **copy:** generate project context if it doesn't exist ([26f6db8](https://github.com/ionic-team/ionic-app-scripts/commit/26f6db8a7d3398b940cfb4c4b3eb4a6f141e1be7#diff-b477061dcc036b7490cfc73741747819))
### Features
* **sass:** enable Sass indented files compilation ([#565](https://github.com/ionic-team/ionic-app-scripts/issues/565)) ([f632298](https://github.com/ionic-team/ionic-app-scripts/commit/f632298))
## [0.0.47](https://github.com/ionic-team/ionic-app-scripts/compare/v0.0.46...v0.0.47) (2016-12-12)
### Upgrade Instructions
#### Install latest Ionic CLI
Install the latest ionic cli. `sudo` may be required depending upon your `npm` set-up.
```
npm install -g ionic@latest
```
#### Entry Point Changes
Delete `main.dev.ts` and `main.prod.ts` and create a `main.ts` file with the following content:
```
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
platformBrowserDynamic().bootstrapModule(AppModule);
```
#### Dev Builds By Default Changes
All builds are now development (non-AoT) builds by default. This allows for a better development experience when testing on a device. To get started, please follow the steps below.
Make sure the `scripts` section of `package.json` looks like this:
```
"scripts": {
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
}
```
`ionic run android --prod` will do a production build that utilizes AoT compiling and minifaction.
`ionic emulate ios --prod` will do a production build that utilizes AoT compiling and minifaction.
`ionic run android` will do a development build
`ionic emulate ios` will do a development build
If you wish to run AoT but disable minifaction, do the following
`ionic run android --aot`
`ionic emulate ios --aot`
#### Source Map Changes
Change `ionic_source_map` to `ionic_source_map_type` in package.json if it is overridden.
#### Config Changes
There were significant improvements/changes to most configs. Please review the changes and make sure any custom configs are up to date.
#### Validate TSConfig settings
Verify that `tsconfig.json` is up to date with recommended settings:
```
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"dom",
"es2015"
],
"module": "es2015",
"moduleResolution": "node",
"sourceMap": true,
"target": "es5"
},
"include": [
"src/**/*.ts"
],
"exclude": [
"node_modules"
],
"compileOnSave": false,
"atom": {
"rewriteTsconfig": false
}
}
```
### Breaking Changes
1. `main.dev.ts` and `main.prod.ts` have been deprecated in favor of `main.ts` with the content of `main.dev.ts`. The content of `main.ts` will be optimized at build time for production builds.
2. Builds are now always development (non-AoT) by default. To enable `prod` builds, use the `--prod` option.
3. `copy.config` and `watch.config` have breaking changes moving to an easier-to-extend configuration style.
4. `copy.config` uses `node-glob` instead of `fs-extra` to do the copy. Migrate from directory/files to globs in any custom configs.
5. `ionic_source_map` configuration has been changed to `ionic_source_map_type`.
6. Source maps now use `source-map` devtool option by default instead of `eval`. Change `ionic_source_map_type` option to return to the faster building `eval`.
### Bug Fixes
* **AoT:** dynamically enable prod mode for AoT builds ([0594803](https://github.com/ionic-team/ionic-app-scripts/commit/0594803))
* **AoT:** use in-memory data store instead of .tmp directory for AoT codegen ([93106ff](https://github.com/ionic-team/ionic-app-scripts/commit/93106ff))
* **build:** every build should run clean sync and copy async. ([6d4eb6e](https://github.com/ionic-team/ionic-app-scripts/commit/6d4eb6e))
* **copy:** Resolve race condition in copy task, move to glob config ([cc99a73](https://github.com/ionic-team/ionic-app-scripts/commit/cc99a73))
* **lab:** add lab to files ([f42c980](https://github.com/ionic-team/ionic-app-scripts/commit/f42c980))
* **livereload:** livereload now correctly serves cordova plugins on run and emulate. ([a0c3f5d](https://github.com/ionic-team/ionic-app-scripts/commit/a0c3f5d))
* **livereload:** on project build all pages connected should reload. ([#513](https://github.com/ionic-team/ionic-app-scripts/issues/513)) ([62d6b23](https://github.com/ionic-team/ionic-app-scripts/commit/62d6b23))
* **livereload:** use localhost instead of 0.0.0.0 when injecting live reload script ([#450](https://github.com/ionic-team/ionic-app-scripts/issues/450)) ([7f8a0c3](https://github.com/ionic-team/ionic-app-scripts/commit/7f8a0c3))
* **logging:** remove unnecessary websocket error msg, clean up copy error msg ([1517b06](https://github.com/ionic-team/ionic-app-scripts/commit/1517b06))
* **ngc:** simpler AoT error reporting ([1b0f163](https://github.com/ionic-team/ionic-app-scripts/commit/1b0f163))
* **serve:** add flag to indicate to serve for a cordova app ([93782e7](https://github.com/ionic-team/ionic-app-scripts/commit/93782e7))
* **source-maps:** use detailed source-map as default, fix windows path issue ([19464b3](https://github.com/ionic-team/ionic-app-scripts/commit/19464b3))
* **workers:** generate context in worker threads ([af036ec](https://github.com/ionic-team/ionic-app-scripts/commit/af036ec))
### Features
* **build:** replace --dev flag with --prod and add flags --aot, --minifyJs, --minifyCss, --optimizeJs ([99922ce](https://github.com/ionic-team/ionic-app-scripts/commit/99922ce))
* **bundle:** pre and post bundle hooks ([4835550](https://github.com/ionic-team/ionic-app-scripts/commit/4835550))
* **copy:** update copy config to move web workers ([a909fc4](https://github.com/ionic-team/ionic-app-scripts/commit/a909fc4))
* **lab:** fresh coat of paint ([edb6f09](https://github.com/ionic-team/ionic-app-scripts/commit/edb6f09))
* **replacePathVars:** support interpolation of objects and arrays ([#449](https://github.com/ionic-team/ionic-app-scripts/issues/449)) ([e039d46](https://github.com/ionic-team/ionic-app-scripts/commit/e039d46))
* all arguments passed should be compared as case insensitive ([085c897](https://github.com/ionic-team/ionic-app-scripts/commit/085c897))
## [0.0.46](https://github.com/ionic-team/ionic-app-scripts/compare/v0.0.44...v0.0.46) (2016-11-21)
### Bug Fixes
* **build:** better support for saving multiple files at a time ([254bb6c](https://github.com/ionic-team/ionic-app-scripts/commit/254bb6c))
* **copy:** ionicons copied from ionicons ([69f89a8](https://github.com/ionic-team/ionic-app-scripts/commit/69f89a8))
* **errors:** skip HTTP errors ([5906167](https://github.com/ionic-team/ionic-app-scripts/commit/5906167))
* **proxies:** Wrong parameter in Logger.info, in setupProxies function causing proxies not to load ([#395](https://github.com/ionic-team/ionic-app-scripts/issues/395)) ([316b1de](https://github.com/ionic-team/ionic-app-scripts/commit/316b1de))
* **typescript:** lock typescript version to 2.0.x for now due to build error with 2.1.x ([ef7203b](https://github.com/ionic-team/ionic-app-scripts/commit/ef7203b))
* **webpack:** fix path resolution ([97c23f9](https://github.com/ionic-team/ionic-app-scripts/commit/97c23f9))
* **webpack:** reference json-loader to account for webpack breaking change ([d6fe709](https://github.com/ionic-team/ionic-app-scripts/commit/d6fe709))
* **webpack:** resolve modules to rootDir ([#365](https://github.com/ionic-team/ionic-app-scripts/issues/365)) ([64eb845](https://github.com/ionic-team/ionic-app-scripts/commit/64eb845))
### Features
* **options:** allow users to pass their own cleanCss Options ([#377](https://github.com/ionic-team/ionic-app-scripts/issues/377)) ([20df6d4](https://github.com/ionic-team/ionic-app-scripts/commit/20df6d4))
## [0.0.45](https://github.com/ionic-team/ionic-app-scripts/compare/v0.0.44...v0.0.45) (2016-11-17)
### Bug Fixes
* **errors:** runtime error immediately, selectable stack ([70f68da](https://github.com/ionic-team/ionic-app-scripts/commit/70f68da))
* **inline-templates:** update bundle and memory file representation on template change ([11a949d](https://github.com/ionic-team/ionic-app-scripts/commit/11a949d))
* **rollup:** invalidate cache on template change ([80c0eb6](https://github.com/ionic-team/ionic-app-scripts/commit/80c0eb6))
* **webpack:** invalidate cache by use of timestamps ([4d6bbd5](https://github.com/ionic-team/ionic-app-scripts/commit/4d6bbd5))
### Features
* **run-build-update:** handle linked npm modules ([#375](https://github.com/ionic-team/ionic-app-scripts/issues/375)) ([0f113c8](https://github.com/ionic-team/ionic-app-scripts/commit/0f113c8))
* **serve:** add '/ionic-lab' as an alias for the lab html file path. ([c319404](https://github.com/ionic-team/ionic-app-scripts/commit/c319404))
## [0.0.44](https://github.com/ionic-team/ionic-app-scripts/compare/v0.0.43...v0.0.44) (2016-11-15)
### Bug Fixes
* **debug:** cmd+shift+8 to show debug menu ([a26d729](https://github.com/ionic-team/ionic-app-scripts/commit/a26d729))
* **error:** (cmd/ctrl)+8 for debug menu ([89550af](https://github.com/ionic-team/ionic-app-scripts/commit/89550af))
* **error:** add header padding for cordova iOS ([5c4c547](https://github.com/ionic-team/ionic-app-scripts/commit/5c4c547))
* **error:** apply correct css for runtime error close ([81f1d75](https://github.com/ionic-team/ionic-app-scripts/commit/81f1d75))
* **error:** fix content scrolling ([3b82465](https://github.com/ionic-team/ionic-app-scripts/commit/3b82465))
* **error:** reload immediately after js/html update ([07f918e](https://github.com/ionic-team/ionic-app-scripts/commit/07f918e))
* **error:** safari css fixes ([7c2fb59](https://github.com/ionic-team/ionic-app-scripts/commit/7c2fb59))
* **serve:** correct paths so that --lab works ([1d99a98](https://github.com/ionic-team/ionic-app-scripts/commit/1d99a98))
* **serve:** open browser to localhost ([14275c7](https://github.com/ionic-team/ionic-app-scripts/commit/14275c7))
* **transpile:** normalize and resolve paths always for OS independence ([ca6c889](https://github.com/ionic-team/ionic-app-scripts/commit/ca6c889))
* **watch:** fallback for when chokidar watch ready/error don't fire (happens on windows when file is ([519cd7f](https://github.com/ionic-team/ionic-app-scripts/commit/519cd7f)), closes [#282](https://github.com/ionic-team/ionic-app-scripts/issues/282)
* **watch:** watch now ignores Mac OS meta data files ([02d0b8d](https://github.com/ionic-team/ionic-app-scripts/commit/02d0b8d)), closes [#331](https://github.com/ionic-team/ionic-app-scripts/issues/331)
* **webpack:** source maps link to original src for ide debugging ([39edd2e](https://github.com/ionic-team/ionic-app-scripts/commit/39edd2e))
### Features
* **debug:** debug menu options ([53d6e30](https://github.com/ionic-team/ionic-app-scripts/commit/53d6e30))
* **debug:** shake device to show debug menu ([770f4e3](https://github.com/ionic-team/ionic-app-scripts/commit/770f4e3))
* **error:** client runtime error reporting ([fc40b92](https://github.com/ionic-team/ionic-app-scripts/commit/fc40b92))
* **error:** syntax and error highlighting ([8836310](https://github.com/ionic-team/ionic-app-scripts/commit/8836310))
## [0.0.43](https://github.com/ionic-team/ionic-app-scripts/compare/v0.0.42...v0.0.43) (2016-11-10)
### Bug Fixes
* **rollup:** removing rollup metadata prefix for paths ([350a288](https://github.com/ionic-team/ionic-app-scripts/commit/350a288))
* **watch:** remove shorthand arg for watch ([0685c0b](https://github.com/ionic-team/ionic-app-scripts/commit/0685c0b)), closes [#290](https://github.com/ionic-team/ionic-app-scripts/issues/290)
* **webpack:** typo in import, close [#326](https://github.com/ionic-team/ionic-app-scripts/issues/326) ([#341](https://github.com/ionic-team/ionic-app-scripts/issues/341)) ([6b89fa2](https://github.com/ionic-team/ionic-app-scripts/commit/6b89fa2))
## [0.0.42](https://github.com/ionic-team/ionic-app-scripts/compare/v0.0.41...v0.0.42) (2016-11-09)
## Upgrade Steps
To use this version of `@ionic/app-scripts`, follow these steps to upgrade:
1. Install the latest version of the ionic cli
```
npm install ionic@latest -g
```
Note: sudo may be required depending on your workstation set-up
2. Update the project's `package.json` file's `script` section to look like this:
```
...
"scripts" : {
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
}
...
```
Note: This is removing several deprecated Ionic scripts. If you have any of your own custom scripts, don't remove them.
3. Install the latest version of `@ionic/app-scripts`
```
npm install @ionic/app-scripts@latest --save-dev
```
### Bug Fixes
* **bundling:** execute bundle updates if full bundle has completed at least once ([fbe56dc](https://github.com/ionic-team/ionic-app-scripts/commit/fbe56dc))
* **sass:** remove broken sass caching ([91faf0b](https://github.com/ionic-team/ionic-app-scripts/commit/91faf0b))
### Features
* **error:** use datauri for favicon build status ([892cf4a](https://github.com/ionic-team/ionic-app-scripts/commit/892cf4a))
* **errors:** overlay build errors during development ([87f7648](https://github.com/ionic-team/ionic-app-scripts/commit/87f7648))
## [0.0.41](https://github.com/ionic-team/ionic-app-scripts/compare/v0.0.40...v0.0.41) (2016-11-07)
### Bug Fixes
* **webpack:** use source-maps instead of eval for prod builds ([fdd86be](https://github.com/ionic-team/ionic-app-scripts/commit/fdd86be))
## 0.0.40 (2016-11-07)
### Breaking Changes
`ionic_source_map` variable is now used to drive the `devtool` (sourcemap) value for webpack. It now defaults to `eval` for faster builds. Set it to `source-map` for `typescript` sourcemaps.
### Bug Fixes
* **sourcemaps:** fix source maps for all files ([066de6d](https://github.com/ionic-team/ionic-app-scripts/commit/066de6d))
* **sourcemaps:** webpack .ts sourcemaps ([bfca1be](https://github.com/ionic-team/ionic-app-scripts/commit/bfca1be))
* **webpack:** modify config to use IONIC_APP_SCRIPTS_DIR variable ([2b7c606](https://github.com/ionic-team/ionic-app-scripts/commit/2b7c606))
### Features
* **events:** emit bundler events ([8d73da9](https://github.com/ionic-team/ionic-app-scripts/commit/8d73da9))
* **exports:** add templateUpdate and fullBuildUpdate ([a31897d](https://github.com/ionic-team/ionic-app-scripts/commit/a31897d))
* **webpack source maps:** make it easy to configure source map type ([03565b7](https://github.com/ionic-team/ionic-app-scripts/commit/03565b7))
### Performance Improvements
* **webpack:** speed up webpack build by not using file-system and watches ([23ad195](https://github.com/ionic-team/ionic-app-scripts/commit/23ad195))
# 0.0.39 (2016-10-31)
* Switch default bundler to Webpack
# 0.0.36 (2016-10-15)
* Fix handling multiple async template updates
# 0.0.35 (2016-10-15)
* Fix resolving index files correctly
* Fix template rebuilds for multiple templates in one file
* Fix ability to watchers to ignore paths
# 0.0.34 (2016-10-15)
* Fix silently failed bundles
* Fix template path resolving issues
# 0.0.33 (2016-10-14)
* Improve build times for template changes
* Fix bundle updates on template changes
# 0.0.32 (2016-10-14)
* Fix Windows entry path normalization
# 0.0.31 (2016-10-13)
* Add ability use multiple processor cores for various subtasks
* Use typescript `createProgram` to transpile entire app
* Add syntax highlighting and colors to typescript, sass and tslint errors
* Improved error messages for typescript errors
* `clean` task only cleans out the `www/build/` directory rather than all of `www/`
* Add task to copy `src/service-worker.js` to `www/service-worker.js`
* Add task to copy `src/manifest.json` to `www/manifest.json`
# 0.0.30 (2016-10-06)
* Fix JS source maps
* Fix template inlining
# 0.0.29 (2016-10-05)
* Addressed memory usage error
* Dev builds no longer use the `.tmp` directory
* Dev build entry files should be the source `main.dev.ts` file
* Custom rollup configs should remove the `ngTemplate()` plugin
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2016 Drifty Co
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
[](https://www.npmjs.com/package/@ionic/app-scripts)
[](https://circleci.com/gh/ionic-team/ionic-app-scripts)
# DISCLAIMER: NO LONGER MAINTAINED
Oh, [hello there](https://media.giphy.com/media/8JTFsZmnTR1Rs1JFVP/giphy.gif)! Ionic App Scripts is a tool tied specifically to version 3.x of Ionic Framework. Since the release of version 4.0 of Ionic Framework, we are no longer using Ionic App Scripts for building in Ionic Framework. Version 3 of Ionic Framework is no longer actively maintained by us. For more information on which versions are active, see our [support policy](https://ionicframework.com/docs/reference/support#framework-maintenance-and-support-status).
Due to this, we are no longer maintaining Ionic App Scripts and we recommend developers update their apps to the latest framework release. This provides several new features, bug fixes, performance improvements, as well as up to date tooling for Ionic apps. For more details on how to upgrade, check out our [migration guide](https://ionicframework.com/docs/reference/migration).
# Ionic App Scripts
Helper scripts to get [Ionic apps](https://ionicframework.com/) up and running quickly (minus the config overload).
To get the latest `@ionic/app-scripts`, please run:
```
npm install @ionic/app-scripts@latest --save-dev
```
### Config Defaults
Out of the box, Ionic starters have been preconfigured with great defaults for building fast apps, including:
- Multi-core processing tasks in parallel for faster builds
- In-memory file transpiling and bundling
- Transpiling source code to ES5 JavaScript
- Ahead of Time (AoT) template compiling
- Just in Time (JiT) template compiling
- Template inlining for JiT builds
- Bundling modules for faster runtime execution
- Treeshaking unused components and dead-code removal
- Generating CSS from bundled component Sass files
- Autoprefixing vendor CSS prefixes
- Minifying JavaScript files
- Compressing CSS files
- Copying `src` static assets to `www`
- Linting source files
- Watching source files for live-reloading
Just the bullet list above is a little overwhelming, and each task requires quite a bit of development time just to get started. Ionic App Script's intention is to make it easier to complete common tasks so developers can focus on building their app, rather than building build scripts.
Note that the [Ionic Framework's](https://github.com/ionic-team/ionic) source is made up of modules and can be packaged by any bundler or build process. However, this project's goal is provide simple scripts to make building Ionic apps easier, while also allowing developers to further configure their build process.
### npm Scripts
Instead of depending on external task runners, Ionic App Scripts now prefers being executed from [npm scripts](https://docs.npmjs.com/misc/scripts). Ionic's npm scripts come preconfigured in the project's `package.json` file. For example, this is the default setup for npm scripts in each starter:
```
"scripts": {
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
```
To run the `build` script found in the `package.json` `scripts` property, execute:
```
npm run build
```
## Environments
You can use Node style `process.env.MY_VAR` syntax directly in your typescript
and when the application is bundled it'll be replaced with the following order of precedence:
* If the variable exists in the process environment it will be replaced with that value.
* If the variable is not defined in the process environment it will be read from a `.env.dev`
file for dev builds or `.env.prod` file for prod builds which are located in the root of the app
* If the variable is not defined in either place it will be `undefined`
In order to take advantage of this apps will need a `src/declarations.d.ts` file with the following declaration:
```typescript
declare var process: { env: { [key: string]: string | undefined; } };
```
*Note*: This declaration may conflict if `@types/node` is installed in your project. See [#3541](https://github.com/ionic-team/ionic-cli/issues/3541).
## Custom Configuration
In many cases, the defaults which Ionic provides cover most of the scenarios required by developers; however, Ionic App Scripts does provide multiple ways to configure and override the defaults for each of the various tasks. Note that Ionic will always apply its defaults for any property that was not provided by custom configuration.
[Default Config Files](https://github.com/ionic-team/ionic-app-scripts/tree/master/config)
### package.json Config
Ionic projects use the `package.json` file for configuration. There's a handy [config](https://docs.npmjs.com/misc/config#per-package-config-settings) property which can be used. Below is an example of setting a custom config file using the `config` property in a project's `package.json`.
```
"config": {
"ionic_cleancss": "./config/cleancss.config.js"
},
```
### Command-line Flags
Remember how we're actually running `ionic-app-scripts` from the `scripts` property of a project's `package.json` file? Well we can also add command-line flags to each script, or make new scripts with these custom flags. For example:
```
"scripts": {
"build": "ionic-app-scripts build --webpack ./config/webpack.dev.config.js",
"minify": "ionic-app-scripts minify --cleancss ./config/cleancss.config.js",
},
```
The same command-line flags can be also applied to `npm run` commands too, such as:
```
npm run build --webpack ./config/webpack.dev.config.js
```
### Overriding Config Files
| Config File | package.json Config | Cmd-line Flag |
|-------------|---------------------|-----------------------|
| CleanCss | `ionic_cleancss` | `--cleancss` or `-e` |
| Copy | `ionic_copy` | `--copy` or `-y` |
| Generator | `ionic_generator` | `--generator` or `-g` |
| NGC | `ionic_ngc` | `--ngc` or `-n` |
| Sass | `ionic_sass` | `--sass` or `-s` |
| TSLint | `ionic_tslint` | `--tslint` or `-i` |
| UglifyJS | `ionic_uglifyjs` | `--uglifyjs` or `-u` |
| Watch | `ionic_watch` | `--watch` |
| Webpack | `ionic_webpack` | `--webpack` or `-w` |
### Overriding Config Values
| Config Values | package.json Config | Cmd-line Flag | Defaults | Details |
|-----------------|---------------------|---------------|-----------------|----------------|
| root directory | `ionic_root_dir` | `--rootDir` | `process.cwd()` | The directory path of the Ionic app |
| src directory | `ionic_src_dir` | `--srcDir` | `src` | The directory holding the Ionic src code |
| www directory | `ionic_www_dir` | `--wwwDir` | `www` | The deployable directory containing everything needed to run the app |
| build directory | `ionic_build_dir` | `--buildDir` | `build` | The build process uses this directory to store generated files, etc |
| temp directory | `ionic_tmp_dir` | `--tmpDir` | `.tmp` | Temporary directory for writing files for debugging and various build tasks |
| ionic-angular directory | `ionic_angular_dir` | `--ionicAngularDir` | `ionic-angular` | ionic-angular directory |
| ionic-angular entry point | `ionic_angular_entry_point` | `--ionicAngularEntryPoint` | `index.js` | entry point file for ionic-angular |
| source map type | `ionic_source_map_type` | `--sourceMapType` | `source-map` | Chooses the webpack `devtool` option. `eval` and `source-map` are supported |
| generate source map | `ionic_generate_source_map` | `--generateSourceMap` | `true` | Determines whether to generate a source map or not |
| tsconfig path | `ionic_ts_config` | `--tsconfig` | `{{rootDir}}/tsconfig.json` | absolute path to tsconfig.json |
| app entry point | `ionic_app_entry_point` | `--appEntryPoint` | `{{srcDir}}/app/main.ts` | absolute path to app's entrypoint bootstrap file |
| app ng module path | `ionic_app_ng_module_path` | `--appNgModulePath` | `{{srcDir}}/app/app.module.ts` | absolute path to app's primary `NgModule` |
| app ng module class | `ionic_app_ng_module_class` | `--appNgModuleClass` | `AppModule` | Exported class name for app's primary `NgModule` |
| clean before copy | `ionic_clean_before_copy` | `--cleanBeforeCopy` | `false` | clean out existing files before copy task runs |
| output js file | `ionic_output_js_file_name` | `--outputJsFileName` | `main.js` | name of js file generated in `buildDir` |
| output css file | `ionic_output_css_file_name` | `--outputCssFileName` | `main.css` | name of css file generated in `buildDir` |
| bail on lint error | `ionic_bail_on_lint_error` | `--bailOnLintError` | `null` | Set to `true` to make stand-alone lint commands fail with non-zero status code |
| enable type checking during lint | `ionic_type_check_on_lint` | `--typeCheckOnLint` | `null` | Set to `true` to enable [type checking](https://palantir.github.io/tslint/usage/type-checking) during lint |
| write AoT files to disk | `ionic_aot_write_to_disk` | `--aotWriteToDisk` | `null` | Set to `true` to write files to disk for debugging |
| print webpack dependency tree | `ionic_print_webpack_dependency_tree` | `--printWebpackDependencyTree` | `null` | Set to `true` to print out a dependency tree after running Webpack |
| parse deeplink config | `ionic_parse_deeplinks` | `--parseDeepLinks` | `true` | Parses and extracts data from the `@IonicPage` decorator |
| convert bundle to ES5 | `ionic_build_to_es5` | `--buildToEs5` | `true` | Convert bundle to ES5 for production deployments |
| default watch timeout | `ionic_start_watch_timeout` | `--startWatchTimeout` | `3000` | Milliseconds controlling the default watch timeout |
| choose the polyfill | `ionic_polyfill_name` | `--polyfillName` | `polyfills` | Change with polyfills.modern or polyfills.ng (all options)[https://github.com/driftyco/ionic/tree/master/scripts/polyfill] |
| enable linting | `ionic_enable_lint` | `--enableLint` | `true` | Set to `false` for skipping the linting after the build |
### Ionic Environment Variables
These environment variables are automatically set to [Node's `process.env`](https://nodejs.org/api/process.html#process_process_env) property. These variables can be useful from within custom configuration files, such as custom `webpack.config.js` file.
| Environment Variable | Description |
|----------------------------|----------------------------------------------------------------------|
| `IONIC_ENV` | Value can be either `prod` or `dev`. |
| `IONIC_ROOT_DIR` | The absolute path to the project's root directory. |
| `IONIC_SRC_DIR` | The absolute path to the app's source directory. |
| `IONIC_WWW_DIR` | The absolute path to the app's public distribution directory. |
| `IONIC_BUILD_DIR` | The absolute path to the app's bundled js and css files. |
| `IONIC_TMP_DIR` | Temp directory for debugging generated/optimized code and various build tasks |
| `IONIC_NODE_MODULES_DIR` | The absolute path to the `node_modules` directory. |
| `IONIC_ANGULAR_DIR` | The absolute path to the `ionic-angular` node_module directory. |
| `IONIC_APP_SCRIPTS_DIR` | The absolute path to the `@ionic/app-scripts` node_module directory. |
| `IONIC_SOURCE_MAP_TYPE` | The Webpack `devtool` setting. `eval` and `source-map` are supported.|
| `IONIC_GENERATE_SOURCE_MAP`| Determines whether to generate a sourcemap or not. |
| `IONIC_TS_CONFIG` | The absolute path to the project's `tsconfig.json` file |
| `IONIC_APP_ENTRY_POINT` | The absolute path to the project's `main.ts` entry point file |
| `IONIC_APP_NG_MODULE_PATH` | The absolute path to app's primary `NgModule` |
| `IONIC_APP_NG_MODULE_CLASS` | The exported class name for app's primary `NgModule` |
| `IONIC_GLOB_UTIL` | The path to Ionic's `glob-util` script. Used within configs. |
| `IONIC_CLEAN_BEFORE_COPY` | Attempt to clean existing directories before copying files. |
| `IONIC_CLOSURE_JAR` | The absolute path ot the closure compiler jar file |
| `IONIC_OUTPUT_JS_FILE_NAME` | The file name of the generated javascript file |
| `IONIC_OUTPUT_CSS_FILE_NAME` | The file name of the generated css file |
| `IONIC_WEBPACK_FACTORY` | The absolute path to Ionic's `webpack-factory` script |
| `IONIC_WEBPACK_LOADER` | The absolute path to Ionic's custom webpack loader |
| `IONIC_BAIL_ON_LINT_ERROR` | Boolean determining whether to exit with a non-zero status code on error |
| `IONIC_TYPE_CHECK_ON_LINT` | Boolean determining whether to type check code during lint or not |
| `IONIC_AOT_WRITE_TO_DISK` | `--aotWriteToDisk` | `null` | Set to `true` to write files to disk for debugging |
| `IONIC_PRINT_WEBPACK_DEPENDENCY_TREE` | boolean to print out a dependency tree after running Webpack |
| `IONIC_PARSE_DEEPLINKS` | boolean to enable parsing the Ionic 3.x deep links API for lazy loading |
| `IONIC_BUILD_TO_ES5` | boolean to enable converting bundle to ES5 for production deployments |
| `IONIC_START_WATCH_TIMEOUT` | Milliseconds controlling the default watch timeout |
The `process.env.IONIC_ENV` environment variable can be used to test whether it is a `prod` or `dev` build, which automatically gets set by any command. By default the `build` and `serve` tasks produce `dev` builds (a build that does not include Ahead of Time (AoT) compilation or minification). To force a `prod` build you should use the `--prod` command line flag.
`process.env.IONIC_ENV` environment variable is set to `prod` for `--prod` builds, otherwise `dev` for all other builds.
## All Available Tasks
These tasks are available within `ionic-app-scripts` and can be added to npm scripts or any Node command.
| Task | Description |
|------------|-----------------------------------------------------------------------------------------------------|
| `build` | A complete build of the application. It uses `development` settings by default. Use `--prod` to create an optimized build |
| `clean` | Empty the `www/build` directory. |
| `cleancss` | Compress the output CSS with [CleanCss](https://github.com/jakubpawlowicz/clean-css) |
| `copy` | Run the copy tasks, which by defaults copies the `src/assets/` and `src/index.html` files to `www`. |
| `lint` | Run the linter against the source `.ts` files, using the `tslint.json` config file at the root. |
| `minify` | Minifies the output JS bundle and compresses the compiled CSS. |
| `sass` | Sass compilation of used modules. Bundling must have at least ran once before Sass compilation. |
| `watch` | Runs watch for dev builds. |
Example NPM Script:
```
"scripts": {
"minify": "ionic-app-scripts minify"
},
```
## Tips
1. The Webpack `devtool` setting is driven by the `ionic_source_map_type` variable. It defaults to `source-map` for the best quality source map. Developers can enable significantly faster builds by setting `ionic_source_map_type` to `eval`.
2. By default, the `lint` command does not exit with a non-zero status code on error. To enable this, pass `--bailOnLintError true` to the command.
```
"scripts" : {
...
"lint": "ionic-app-scripts lint"
...
}
```
```
npm run lint --bailOnLintError true
```
## The Stack
- [Ionic Framework](https://ionicframework.com/)
- [TypeScript Compiler](https://www.typescriptlang.org/)
- [Angular Compiler (NGC)](https://github.com/angular/angular/tree/master/modules/%40angular/compiler-cli)
- [Webpack Module Bundler](https://webpack.js.org/)
- Ionic Component Sass
- [Node Sass](https://www.npmjs.com/package/node-sass)
- [Autoprefixer](https://github.com/postcss/autoprefixer)
- [UglifyJS](https://lisperator.net/uglifyjs/)
- [CleanCss](https://github.com/jakubpawlowicz/clean-css)
- [TSLint](https://palantir.github.io/tslint/)
## Contributing
We welcome any PRs, issues, and feedback! Please be respectful and follow the [Code of Conduct](https://github.com/ionic-team/ionic/blob/master/CODE_OF_CONDUCT.md).
We use Node 6, and NPM 5 for contributing.
### Publish a Nightly Build
1. Run `npm run build` to generate the `dist` directory
2. Run `npm run test` to validate the `dist` works
3. Tick the `package.json` version
4. Run `npm run nightly` to generate a nightly build on npm
### Publish a release
Execute the following steps to publish a release:
1. Ensure your branch has been merged into `master`
2. Run `npm run build` to generate the `dist` directory
3. Run `npm run test` to validate the `dist` works
4. Temporarily tick the `package.json` version
5. Run `npm run changelog` to append the latest additions to the changelog
6. Manually verify and commit the changelog changes. Often times you'll want to manually add content/instructions
7. Revert the `package.json` version to the original version
8. Run `npm version patch` to tick the version and generate a git tag
9. Run `npm run github-release` to create the github release entry
10. Run `npm publish` to publish the package to npm
11. `git push origin master` - push changes to master
================================================
FILE: bin/ion-dev.js
================================================
window.IonicDevServerConfig = window.IonicDevServerConfig || {};
window.IonicDevServer = {
start: function() {
this.msgQueue = [];
this.consoleLog = console.log;
this.consoleError = console.error;
this.consoleWarn = console.warn;
IonicDevServerConfig.systemInfo.push('Navigator Platform: ' + window.navigator.platform);
IonicDevServerConfig.systemInfo.push('User Agent: ' + window.navigator.userAgent);
if (IonicDevServerConfig.sendConsoleLogs) {
this.patchConsole();
}
this.openConnection();
this.bindEvents();
var self = this;
document.addEventListener("DOMContentLoaded", function() {
var diagnosticsEle = document.getElementById('ion-diagnostics');
if (diagnosticsEle) {
self.buildStatus('error');
} else {
self.buildStatus('success');
}
});
if (window.cordova && document.documentElement) {
document.documentElement.classList.add('ion-diagnostics-cordova');
var ua = window.navigator.userAgent.toLowerCase();
if ((ua.indexOf('ipad') > -1 || ua.indexOf('iphone') > -1 || ua.indexOf('ipod') > -1) && ua.indexOf('windows phone') === -1) {
document.documentElement.classList.add('ion-diagnostics-cordova-ios');
}
}
window.onerror = function(msg, url, lineNo, columnNo, error) {
self.handleError(error);
};
},
handleError: function(err) {
if (!err) return;
// Ignore HTTP errors
if(err.url || err.headers) return;
// Socket is ready so send this error to the server for prettifying
if (this.socketReady) {
var msg = {
category: 'runtimeError',
type: 'runtimeError',
data: {
message: err.message ? err.message.toString() : null,
stack: err.stack ? err.stack.toString() : null
}
};
this.queueMessageSend(msg);
} else {
var c = [];
c.push('
');
c.push('
');
c.push('
Error
');
c.push('
');
c.push(' ');
c.push('
');
c.push('
');
c.push('
');
c.push('
');
c.push('
');
c.push('
');
c.push('
Runtime Error
');
c.push('
' + this.escapeHtml(err.message) + '
');
c.push('
');
c.push('
Stack
');
c.push('
' + this.escapeHtml(err.stack) + '
');
c.push('
');
c.push('
');
this.buildUpdate({
type: 'clientError',
data: {
diagnosticsHtml: c.join('')
}
});
}
},
reloadApp: function() {
window.location.reload(true);
},
openConnection: function() {
var self = this;
var socketProtocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
this.socket = new WebSocket(socketProtocol + '//' + window.location.hostname + ':' + IonicDevServerConfig.wsPort);
this.socket.onopen = function(ev) {
self.socketReady = true;
self.socket.onmessage = function(ev) {
try {
var msg = JSON.parse(ev.data);
switch (msg.category) {
case 'buildUpdate':
self.buildUpdate(msg);
break;
}
} catch (e) {
self.consoleError('error receiving ws message', e);
}
};
self.socket.onclose = function() {
self.consoleLog('Dev server logger closed');
self.socketReady = false;
};
self.drainMessageQueue();
};
},
queueMessageSend: function(msg) {
this.msgQueue.push(msg);
this.drainMessageQueue();
},
drainMessageQueue: function() {
if (this.socketReady) {
var msg;
while (msg = this.msgQueue.shift()) {
try {
this.socket.send(JSON.stringify(msg));
} catch(e) {
if (e instanceof TypeError) {
} else {
this.consoleError('ws error: ' + e);
}
}
}
}
},
patchConsole: function() {
var self = this;
function patchConsole(consoleType) {
console[consoleType] = (function() {
var orgConsole = console[consoleType];
return function() {
orgConsole.apply(console, arguments);
var msg = {
category: 'console',
type: consoleType,
data: []
};
for (var i = 0; i < arguments.length; i++) {
msg.data.push(arguments[i]);
}
if (msg.data.length) {
self.queueMessageSend(msg);
}
};
})();
}
// https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-console/#supported-methods
var consoleFns = ['log', 'error', 'exception', 'warn', 'info', 'debug', 'assert', 'dir', 'dirxml', 'time', 'timeEnd', 'table'];
for (var i in consoleFns) {
patchConsole(consoleFns[i]);
}
},
/**
* Process a build update message and display something to the friendly user.
*/
buildUpdate: function(msg) {
var status = 'success';
if (msg.type === 'started') {
status = 'active';
this.buildingNotification(true);
} else {
if (msg.data.reloadApp) {
this.reloadApp();
return;
}
status = msg.data.diagnosticsHtml ? 'error' : 'success';
this.buildingNotification(false);
var diagnosticsEle = document.getElementById('ion-diagnostics');
// If we have an element but no html created yet
if (diagnosticsEle && !msg.data.diagnosticsHtml) {
diagnosticsEle.classList.add('ion-diagnostics-fade-out');
this.diagnosticsTimerId = setTimeout(function() {
var diagnosticsEle = document.getElementById('ion-diagnostics');
if (diagnosticsEle) {
diagnosticsEle.parentElement.removeChild(diagnosticsEle);
}
}, 100);
} else if (msg.data.diagnosticsHtml) {
// We don't have an element but we have diagnostics HTML, so create the error
if (!diagnosticsEle) {
diagnosticsEle = document.createElement('div');
diagnosticsEle.id = 'ion-diagnostics';
diagnosticsEle.className = 'ion-diagnostics-fade-out';
document.body.insertBefore(diagnosticsEle, document.body.firstChild);
}
// Show the last error
clearTimeout(this.diagnosticsTimerId);
this.diagnosticsTimerId = setTimeout(function() {
var diagnosticsEle = document.getElementById('ion-diagnostics');
if (diagnosticsEle) {
diagnosticsEle.classList.remove('ion-diagnostics-fade-out');
}
}, 24);
diagnosticsEle.innerHTML = msg.data.diagnosticsHtml
}
}
this.buildStatus(status);
},
buildStatus: function (status) {
var iconLinks = document.querySelectorAll('link[rel="icon"]');
for (var i = 0; i < iconLinks.length; i++) {
iconLinks[i].parentElement.removeChild(iconLinks[i]);
}
var iconLink = document.createElement('link');
iconLink.rel = 'icon';
iconLink.type = 'image/png';
iconLink.href = this[status + 'Icon'];
document.head.appendChild(iconLink);
if (status === 'error') {
var diagnosticsEle = document.getElementById('ion-diagnostics');
if (diagnosticsEle) {
var systemInfoEle = diagnosticsEle.querySelector('#ion-diagnostics-system-info');
if (!systemInfoEle) {
systemInfoEle = document.createElement('div');
systemInfoEle.id = 'ion-diagnostics-system-info';
systemInfoEle.innerHTML = IonicDevServerConfig.systemInfo.join('\n');
diagnosticsEle.querySelector('.ion-diagnostics-content').appendChild(systemInfoEle);
}
}
}
},
buildingNotification: function(showToast) {
clearTimeout(this.toastTimerId);
var toastEle = document.getElementById('ion-diagnostics-toast');
if (showToast) {
if (!toastEle) {
toastEle = document.createElement('div');
toastEle.id = 'ion-diagnostics-toast';
var c = []
c.push('
');
c.push('
Building...
');
c.push('
');
c.push(' ');
c.push('
');
c.push('
');
toastEle.innerHTML = c.join('');
document.body.insertBefore(toastEle, document.body.firstChild);
}
this.toastTimerId = setTimeout(function() {
var toastEle = document.getElementById('ion-diagnostics-toast');
if (toastEle) {
toastEle.classList.add('ion-diagnostics-toast-active');
}
}, 16);
} else if (!showToast && toastEle) {
toastEle.classList.remove('ion-diagnostics-toast-active');
}
},
toggleOptionsMenu: function() {
var optsEle = document.getElementById('ion-diagnostics-options');
this.optionsMenu(!optsEle);
},
optionsMenu: function(showMenu) {
clearTimeout(this.optionsMenuTimerId);
var optsEle = document.getElementById('ion-diagnostics-options');
if (showMenu) {
if (!optsEle) {
var c = [];
c.push('');
c.push('
');
c.push( '
');
c.push( '
');
c.push( '
Ionic App Debugger
');
c.push( '');
c.push( '
');
c.push( '
');
c.push( '');
c.push( '
');
c.push( '
');
c.push('
');
optsEle = document.createElement('div');
optsEle.id = 'ion-diagnostics-options';
optsEle.innerHTML = c.join('\n');
document.body.insertBefore(optsEle, document.body.firstChild);
}
this.optionsMenuTimerId = setTimeout(function() {
var optsEle = document.getElementById('ion-diagnostics-options');
optsEle.classList.add('ion-diagnostics-options-show');
}, 16);
} else if (!showMenu && optsEle) {
optsEle.classList.remove('ion-diagnostics-options-show');
this.optionsMenuTimerId = setTimeout(function() {
optsEle.parentElement.removeChild(optsEle);
}, 300);
}
},
bindEvents: function() {
var self = this;
document.addEventListener('keyup', function(ev) {
var key = ev.keyCode || ev.charCode;
if (key == 27) {
// escape key
self.optionsMenu(false);
}
});
document.addEventListener('keydown', function(ev) {
var key = ev.keyCode || ev.charCode;
if ((ev.metaKey || ev.ctrlKey) && ev.shiftKey && key == 56) {
// mac: command + shift + 8
// win: ctrl + shift + 8
self.toggleOptionsMenu();
}
});
document.addEventListener('click', function(ev) {
if (!ev.target) return;
switch (ev.target.id) {
case 'ion-diagnostic-close':
self.buildUpdate({
type: 'closeDiagnostics',
data: {
diagnosticsHtml: null
}
});
break;
case 'ion-diagnostics-options-reload-app':
self.reloadApp();
break;
case 'ion-diagnostics-backdrop':
self.optionsMenu(false);
break;
case 'ion-diagnostics-options-close':
self.optionsMenu(false);
break;
}
});
if (location.href.indexOf('devapp=true') < 0) {
this.enableShake();
}
},
enableShake: function() {
/*
* Author: Alex Gibson
* https://github.com/alexgibson/shake.js
* License: MIT license
*/
var self = this;
var threshold = 15;
var timeout = 1000;
self.shakeTime = new Date();
self.shakeX = null;
self.shakeY = null;
self.shakeZ = null;
window.addEventListener('devicemotion', function(ev) {
var current = ev.accelerationIncludingGravity;
var currentTime;
var timeDifference;
var deltaX = 0;
var deltaY = 0;
var deltaZ = 0;
if (self.shakeX === null) {
self.shakeX = current.x;
self.shakeY = current.y;
self.shakeZ = current.z;
return;
}
deltaX = Math.abs(self.shakeX - current.x);
deltaY = Math.abs(self.shakeY - current.y);
deltaZ = Math.abs(self.shakeZ - current.z);
if (((deltaX > threshold) && (deltaY > threshold)) || ((deltaX > threshold) && (deltaZ > threshold)) || ((deltaY > threshold) && (deltaZ > threshold))) {
currentTime = new Date();
timeDifference = currentTime.getTime() - self.shakeTime.getTime();
if (timeDifference > timeout) {
self.optionsMenu(true);
self.shakeTime = new Date();
}
}
self.shakeX = current.x;
self.shakeY = current.y;
self.shakeZ = current.z;
});
},
escapeHtml: function (unsafe) {
return unsafe
.replace(/&/g, '&')
.replace(//g, '>')
.replace(/"/g, '"')
.replace(/'/g, ''');
},
activeIcon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAMAAABlApw1AAACQFBMVEUAAAD/xET/zDX/xz7/xUL/xUL/vlD/vk//zDX/zDb/xkD/zDX/xUP/xUL/zDT/vlD/vlD/zDX/zDb/zDb/vlD/zDT/vk//v0//v07/yzf/vVH/vU//vlD/vlD/zDX/v0//vk//zDX/vVD/zDb/yzX/zDT/wE3/vlD/wE3/zDX/wkj/zDT/vVH/v07/vVH/yzb/v0z/wE3/vlD/////yzb/vVD/zDT/vk//vk3/wkn/wEv/yDr/yjr/xET/xkH/xz7/yDz/wUj/w0b/xzz/yjf/wkb/xkD/wE3/yzj/x0D/wUz/w0f/xkP//v3//vr/+/D/+u7/yj3/9d3/+Ob/+/L/9+T/8tn/xkb//Pb/+ev//vz//fj/6Lj/x17/xEr/7cj/7Lr/5bL/36H/+/T/+en/9uH/9d//7sv/wU//zUH/89z/89X/787/7sD/3Jr/2Xv/x1n/3ZL/3IT/0nv/wlL//fn/9Nn/8NP/4Kb/35z/2pX/2I7/1IT/ymD/y1r/xFn/yUL/8dD/6sD/6L7/46P/0nf/13H/0W3/02b/1GH/x1T/8cv/6bL/6q7/14H/zmf/ymf/xlH/zUX/+Oj/4qz/5Kj/5J3/4JT/4In/13b/123/w1X/z1P/zUz/xkz/8Mn/78X/7MP/67X/5q//5qX/5qD/45f/1on/3oH/znT/zG3/1mX/w07/zkn/ykn/ykb/6Kn/2nb/0V3/yk//xkn//vn/347/3Yn/2Yn/04D/0HL/z1j/5bb/01n/zDn/zD0Eb5b9AAAAM3RSTlMAC+EVHwjhSOvzT0cmApta3NnRuXd2buuSkvTx18fHvbinnGxY9vTo0VwTvainmHD57Z6Hm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kcrVcpYm/5W7y5KqyGPPyebjG5WWhX6Qj+KuMhH+ZlHCv8zrwX7lQTfBX2gn+UkHhX+sozIs13/svXW0q/MtlBX+9r/AvWBb+FdeCv2Rc+Ne8C/+iffdieloIAC/tE0H1zOuBD/DaIRGLXvg40AE+ekHErhOHAxng1bMin9r3beACvLlPxEXPPx2YAAfOijhq/7GDgQdw9Kv9Iu56+XhwYAEcefcpkZ968e1TgQJw8q0gEYr2n/jyw38f4MwXQU+J0PXMN8c/fuP0wVN7D3DykzOfffR10CERu/4GltYY/Gjw6lkAAAAASUVORK5CYII='
};
IonicDevServer.start();
================================================
FILE: bin/ionic-app-scripts.js
================================================
#!/usr/bin/env node
if (process.argv.length > 2) {
if (process.env.npm_config_argv && process.env.npm_config_argv.length > 0 && process.env.npm_config_argv !== 'undefined') {
try {
var npmRunArgs = JSON.parse(process.env.npm_config_argv);
if (npmRunArgs && npmRunArgs.original && npmRunArgs.original.length > 2) {
// add flags from original "npm run" command
for (var i = 2; i < npmRunArgs.original.length; i++) {
process.argv.push(npmRunArgs.original[i]);
}
}
} catch (e) {
console.log(e)
}
}
require('../dist/index').run(process.argv[2]);
} else {
console.error('Missing ionic app script task name');
}
================================================
FILE: circle.yml
================================================
machine:
node:
version: 6.9.5
post:
- npm install -g npm@3.x.x
test:
override:
- nvm use 6 && npm test
================================================
FILE: config/cleancss.config.js
================================================
// https://www.npmjs.com/package/clean-css
module.exports = {
/**
* sourceFileName: the file name of the src css file
*/
sourceFileName: process.env.IONIC_OUTPUT_CSS_FILE_NAME,
/**
* destFileName: the file name for the generated minified file
*/
destFileName: process.env.IONIC_OUTPUT_CSS_FILE_NAME
};
================================================
FILE: config/copy.config.js
================================================
// this is a custom dictionary to make it easy to extend/override
// provide a name for an entry, it can be anything such as 'copyAssets' or 'copyFonts'
// then provide an object with a `src` array of globs and a `dest` string
module.exports = {
copyAssets: {
src: ['{{SRC}}/assets/**/*'],
dest: '{{WWW}}/assets'
},
copyIndexContent: {
src: ['{{SRC}}/index.html', '{{SRC}}/manifest.json', '{{SRC}}/service-worker.js'],
dest: '{{WWW}}'
},
copyFonts: {
src: ['{{ROOT}}/node_modules/ionicons/dist/fonts/**/*', '{{ROOT}}/node_modules/ionic-angular/fonts/**/*'],
dest: '{{WWW}}/assets/fonts'
},
copyPolyfills: {
src: [`{{ROOT}}/node_modules/ionic-angular/polyfills/${process.env.IONIC_POLYFILL_FILE_NAME}`],
dest: '{{BUILD}}'
},
copySwToolbox: {
src: ['{{ROOT}}/node_modules/sw-toolbox/sw-toolbox.js'],
dest: '{{BUILD}}'
}
}
================================================
FILE: config/sass.config.js
================================================
// https://www.npmjs.com/package/node-sass
module.exports = {
/**
* outputFilename: The filename of the saved CSS file
* from the sass build. The directory which it is saved in
* is set within the "buildDir" config options.
*/
outputFilename: process.env.IONIC_OUTPUT_CSS_FILE_NAME,
/**
* sourceMap: If source map should be built or not.
*/
sourceMap: false,
/**
* outputStyle: How node-sass should output the css file.
*/
outputStyle: 'expanded',
/**
* autoprefixer: The config options for autoprefixer.
* Excluding this config will skip applying autoprefixer.
* https://www.npmjs.com/package/autoprefixer
*/
autoprefixer: {
browsers: [
'last 2 versions',
'iOS >= 8',
'Android >= 4.4',
'Explorer >= 11',
'ExplorerMobile >= 11'
],
cascade: false
},
/**
* includePaths: Used by node-sass for additional
* paths to search for sass imports by just name.
*/
includePaths: [
'node_modules/ionic-angular/themes',
'node_modules/ionicons/dist/scss',
'node_modules/ionic-angular/fonts'
],
/**
* includeFiles: An array of regex patterns to search for
* sass files in the same directory as the component module.
* If a file matches both include and exclude patterns, then
* the file will be excluded.
*/
includeFiles: [
/\.(s(c|a)ss)$/i
],
/**
* excludeFiles: An array of regex patterns for files which
* should be excluded. If a file matches both include and exclude
* patterns, then the file will be excluded.
*/
excludeFiles: [
/* /\.(wp).(scss)$/i */
],
/**
* variableSassFiles: Lists out the files which include
* only sass variables. These variables are the first sass files
* to be imported so their values override default variables.
*/
variableSassFiles: [
'{{SRC}}/theme/variables.scss'
],
/**
* directoryMaps: Compiled JS modules may be within a different
* directory than its source file and sibling component sass files.
* For example, NGC places it's files within the .tmp directory
* but doesn't copy over its sass files. This is useful so sass
* also checks the JavaScript's source directory for sass files.
*/
directoryMaps: {
'{{TMP}}': '{{SRC}}'
},
/**
* excludeModules: Used just as a way to skip over
* modules which we know wouldn't have any sass to be
* bundled. "excludeModules" isn't necessary, but is a
* good way to speed up build times by skipping modules.
*/
excludeModules: [
'@angular',
'commonjs-proxy',
'core-js',
'ionic-native',
'rxjs',
'zone.js'
]
};
================================================
FILE: config/uglifyjs.config.js
================================================
// https://www.npmjs.com/package/uglify-es
module.exports = {
/**
* mangle: uglify 2's mangle option
*/
mangle: true,
/**
* compress: uglify 2's compress option
*/
compress: {
toplevel: true,
pure_getters: true
}
};
================================================
FILE: config/watch.config.js
================================================
var watch = require('../dist/watch');
var copy = require('../dist/copy');
var copyConfig = require('./copy.config');
// this is a custom dictionary to make it easy to extend/override
// provide a name for an entry, it can be anything such as 'srcFiles' or 'copyConfig'
// then provide an object with the paths, options, and callback fields populated per the Chokidar docs
// https://www.npmjs.com/package/chokidar
module.exports = {
srcFiles: {
paths: ['{{SRC}}/**/*.(ts|html|s(c|a)ss)'],
options: { ignored: ['{{SRC}}/**/*.spec.ts', '{{SRC}}/**/*.e2e.ts', '**/*.DS_Store', '{{SRC}}/index.html'] },
callback: watch.buildUpdate
},
copyConfig: copy.copyConfigToWatchConfig()
};
================================================
FILE: config/webpack.config.js
================================================
/*
* The webpack config exports an object that has a valid webpack configuration
* For each environment name. By default, there are two Ionic environments:
* "dev" and "prod". As such, the webpack.config.js exports a dictionary object
* with "keys" for "dev" and "prod", where the value is a valid webpack configuration
* For details on configuring webpack, see their documentation here
* https://webpack.js.org/configuration/
*/
var path = require('path');
var webpack = require('webpack');
var ionicWebpackFactory = require(process.env.IONIC_WEBPACK_FACTORY);
const Dotenv = require('dotenv-webpack');
var ModuleConcatPlugin = require('webpack/lib/optimize/ModuleConcatenationPlugin');
var PurifyPlugin = require('@angular-devkit/build-optimizer').PurifyPlugin;
var optimizedProdLoaders = [
{
test: /\.json$/,
loader: 'json-loader'
},
{
test: /\.js$/,
loader: [
{
loader: process.env.IONIC_CACHE_LOADER
},
{
loader: '@angular-devkit/build-optimizer/webpack-loader',
options: {
sourceMap: true
}
},
]
},
{
test: /\.ts$/,
loader: [
{
loader: process.env.IONIC_CACHE_LOADER
},
{
loader: '@angular-devkit/build-optimizer/webpack-loader',
options: {
sourceMap: true
}
},
{
loader: process.env.IONIC_WEBPACK_LOADER
}
]
}
];
function getProdLoaders() {
if (process.env.IONIC_OPTIMIZE_JS === 'true') {
return optimizedProdLoaders;
}
return devConfig.module.loaders;
}
var devConfig = {
entry: process.env.IONIC_APP_ENTRY_POINT,
output: {
path: '{{BUILD}}',
publicPath: 'build/',
filename: '[name].js',
devtoolModuleFilenameTemplate: ionicWebpackFactory.getSourceMapperFunction(),
},
devtool: process.env.IONIC_SOURCE_MAP_TYPE,
resolve: {
extensions: ['.ts', '.js', '.json'],
modules: [path.resolve('node_modules')]
},
module: {
loaders: [
{
test: /\.json$/,
loader: 'json-loader'
},
{
test: /\.ts$/,
loader: process.env.IONIC_WEBPACK_LOADER
}
]
},
plugins: [
new Dotenv({
path: '.env.dev', // load this now instead of the ones in '.env'
systemvars: true, // load all the predefined 'process.env' variables which will trump anything local per dotenv specs.
silent: true // hide any errors
}),
ionicWebpackFactory.getIonicEnvironmentPlugin(),
ionicWebpackFactory.getCommonChunksPlugin()
],
// Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works.
node: {
fs: 'empty',
net: 'empty',
tls: 'empty'
}
};
var prodConfig = {
entry: process.env.IONIC_APP_ENTRY_POINT,
output: {
path: '{{BUILD}}',
publicPath: 'build/',
filename: '[name].js',
devtoolModuleFilenameTemplate: ionicWebpackFactory.getSourceMapperFunction(),
},
devtool: process.env.IONIC_SOURCE_MAP_TYPE,
resolve: {
extensions: ['.ts', '.js', '.json'],
modules: [path.resolve('node_modules')]
},
module: {
loaders: getProdLoaders()
},
plugins: [
new Dotenv({
path: '.env.prod', // load this now instead of the ones in '.env'
systemvars: true, // load all the predefined 'process.env' variables which will trump anything local per dotenv specs.
silent: true // hide any errors
}),
ionicWebpackFactory.getIonicEnvironmentPlugin(),
ionicWebpackFactory.getCommonChunksPlugin(),
new ModuleConcatPlugin(),
new PurifyPlugin()
],
// Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works.
node: {
fs: 'empty',
net: 'empty',
tls: 'empty'
}
};
module.exports = {
dev: devConfig,
prod: prodConfig
}
================================================
FILE: lab/index.html
================================================
Ionic Lab