@rdlabo/ionic-sub v0.4.2
Ionic-sub CLI
This is private command line interface (CLI) for support Ionic CLI. This CLI support for developing Ionic Framework Project.
Install
$ npm i @rdlabo/ionic-sub -g
- The corresponding version of nodejs is version 8 or higher!
Usage
Just run the command!
set
$ ionic-sub set all
$ ionic-sub set lint
$ ionic-sub set formatter
$ ionic-sub set alias
set all
This command run all set environment. it's recommended;
set lint
This command rewrite tslint.json base of Angular 6.
set formatter
This command set formatter. Import prettier
and set package.json
.
set alias
You can use @
alias. @
connect src
folder. so you can write.
import { HomePage } from '../pages/home/home';
↓
import { HomePage } from '@/pages/home/home';
import { Example } from '../../providers/example/example';
↓
import { HomePage } from '@/providers/example/example';
And you can use environment file. This change --prod
or none.
(This is ionic-angular(v3) only. angular(v4) have default environment file)
import { environment } from '@app/environment';
console.log(environment)
Environment file create src/environments
. If you add command --prod
, environment is environment/environment.prod.ts
.
Or nothing, environment is environment/environment.dev.ts
.
beta: set mount
This command is angular(v4) only. Add this development file.
- src/app/components/components.module.ts
- src/app/directives/directives.module.ts
- src/app/pipes/pipes.module.ts
- src/interfaces/index.ts
server
$ ionic-sub server netlify -d example.com
server netlify
This command create Netlify's build file. This file auto set this.
- create robot.txt.
- create _redirects for redirect to www.
- create _headers for ServerPush.
- change styles inline. (v4 only)
You should add Build command node netlify.build.js in Netlify's deploy setting.
License
Donation
If this project help you reduce time to develop, you can give me a cup of coffee :)
Others
I'm waiting for you at any time, including code reviews, bug reports, feature additions, questions and more!