1.0.0-rc.1 • Published 6 years ago

@ionic/cli-hooks v1.0.0-rc.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

CLI Hooks

A collection of useful hook scripts for Ionic apps.

Install

$ npm i @ionic/cli-hooks

Use

Modify your ionic.config.json file to add a hooks object:

  "hooks": {
    "<hook>": [
      "node_modules/@ionic/cli-hooks/<file>.js"
    ]
  }

Replace <hook> with the name of the hook you want to use and <file> with the file name within this package.

See CLI Hook documentation for details.

List

  • node_modules/@ionic/cli-hooks/add-cordova-engine.js: Before a build, insert cordova.js script tag into your index.html file if it does not already exist.
  • node_modules/@ionic/cli-hooks/remove-cordova-engine.js: After a build, restore the original index.html file.