GithubHelp home page GithubHelp logo

ngx-rocket / scripts Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 7.0 905 KB

:wrench: Support scripts for ngX-Rocket projects

License: MIT License

JavaScript 100.00%
ngx-rocket support scripts tools ngx project cordova angular ionic enterprise cli

scripts's Introduction

๐Ÿš€ ngx-rocket/scripts

NPM version Build Status Node version XO code style License

Support scripts for ngX-Rocket projects.

In order to simplify the workflow of applications generated with ngX-Rocket generator, we made this repo to gather all additional scripts and build tools.

Since this module is an independant package, you can even use for projects not built from ngX-Rocket if you find it useful.

Installation

npm install --save @ngx-rocket/scripts

Usage

This modules provides CLI commands to be used in NPM scripts, along with some Cordova hooks (see hooks folder).

Export environment variables to a JSON or JavaScript file

ngx-scripts env <env_var> [<env_var2> ...] [--out <file>] [--format json|js] [--parse-json]

Default output file is src/environments/.env.ts with JavaScript format.

Execute Cordova commands

ngx-scripts cordova <command> [options] [-- <cordova_options>]

Unless the --fast option is provided, the Angular app is rebuilt before executing the command, using npm run build. Any accepted Cordova option can be passed through after --.

Options

  • --app: The name of the Angular app to build. Only useful if you have a workspace with multiples apps.
  • --fast: Skip Angular app rebuild
  • --base-href <ref>: Change application base URL (default is ./)
  • --copy <path>: Copy built apps to the specified path (only works with cordova build)
  • --dev: Build Angular app in dev mode (default is prod)
  • -c, --configuration <name>: Target Angular CLI configuration for npm run build
  • --device: Deploy Cordova build to a device
  • --emulate: Deploy Cordova build to an emulator
  • --debug: Create a Cordova debug build
  • --release: Create a Cordova release build
  • --verbose: Show Cordova debug output
  • --yarn: Use Yarn instead of NPM to run the build script
  • --parse-json: During env, if an environment variable's value is parsable JSON, it will be a proper object in .env.ts

Note: Yarn is automatically used instead of NPM if the environment variable NGX_PACKAGE_MANAGER is set to yarn or if the current project was generated with ngX-Rocket using Yarn option (option is saved in .yo-rc.json).

Examples

ngx-scripts cordova prepare
ngx-scripts cordova run ios --dev --debug --emulate
ngx-scripts cordova build ios --configuration production --device --release -- --developmentTeam="ABCD" --provisioningProfile="UUID"

Clean Cordova (platforms, plugins) and dist folders

clean [--cordova] [--dist] [--path <path>]

Options

  • --cordova: Remove only Cordova folders
  • --dist: Remove only dist folder
  • --path <path>: Remove only specified path

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.