Skip to content

Commit 5fc42c1

Browse files
committed
feat: remove cordova API commands
1 parent 4e9a4f0 commit 5fc42c1

File tree

2 files changed

+9
-31
lines changed

2 files changed

+9
-31
lines changed

README.md

+9-16
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
# Framework7 CLI
22

3-
Framework7 command line utility makes easier to create [Framework7](http://framework7.io) apps. Since Framework7 v4 release, CLI the most recommended way to start Framework7 app development.
3+
Framework7 command line utility makes easier to create [Framework7](https://framework7.io) apps. Since Framework7 v4 release, CLI the most recommended way to start Framework7 app development.
44

55
## Install
66

77
First of all make sure you have globally installed cordova (may require "sudo"):
8+
89
```
910
$ npm install -g cordova
1011
```
1112

1213
Then install framework7-cli (may require "sudo"):
14+
1315
```
1416
$ npm install -g framework7-cli
1517
```
1618

1719
## Create Framework7 app
1820

1921
To create Framework7 app, run the following command in the directory where you want to create app:
22+
2023
```
2124
$ framework7 create
2225
```
@@ -26,18 +29,21 @@ Program will prompt for few questions about framework and template you want to s
2629
## Create Framework7 app with user interface
2730

2831
Run the following command in the directory where you want to create app:
32+
2933
```
3034
$ framework7 create --ui
3135
```
3236

3337
It will launch UI where you will be able to configure the project. By default it launches server on `localhost:3001` address. If you want to change the port then use `--port <n>` argument:
38+
3439
```
3540
$ framework7 create --ui --port 8080
3641
```
3742

3843
## Generate assets
3944

4045
In created project there is an `assets-src` directory. It contains required icons and splash screens source images. To generate your own icons and splash screen images, you will need to replace all assets in this directory with your own images (pay attention to image size and format), and run the following command in the project directory:
46+
4147
```
4248
$ framework7 assets
4349
```
@@ -47,26 +53,13 @@ That is all, script will generate all required sizes of icons and splash screens
4753
## Generate assets with user interface
4854

4955
Run the following command in the directory with Framework7 project:
56+
5057
```
5158
$ framework7 assets --ui
5259
```
5360

5461
It will launch UI where you will be able to change icons and splash screens. By default it launches server on `localhost:3001` address. If you want to change the port then use `--port <n>` argument:
55-
```
56-
$ framework7 assets --ui --port 8080
57-
```
5862

59-
## Cordova APIs
60-
61-
To run cordova related commands run the following command in the project root directory:
62-
```
63-
$ framework7 cordova [..args]
6463
```
65-
66-
For example:
67-
```
68-
$ framework7 cordova plugin add cordova-plugin-statusbar
69-
$ framework7 cordova plugin add cordova-plugin-splashscreen
70-
$ framework7 cordova build ios
71-
...
64+
$ framework7 assets --ui --port 8080
7265
```

index.js

-15
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
#!/usr/bin/env node
22
/* eslint no-console: off */
33
const program = require('commander');
4-
const exec = require('exec-sh');
5-
const path = require('path');
64
const logSymbols = require('log-symbols');
7-
const fse = require('./utils/fs-extra');
85
const checkUpdate = require('./utils/check-update');
96
const spinner = require('./utils/spinner');
107
const log = require('./utils/log');
@@ -93,18 +90,6 @@ program
9390
}
9491
});
9592

96-
program
97-
.command('cordova [args...]')
98-
.description('Cordova CLI')
99-
.action(async (args) => {
100-
if (!fse.existsSync(path.resolve(cwd, './cordova'))) {
101-
log.error('Looks like cordova project is not set up');
102-
process.exit(1);
103-
return;
104-
}
105-
exec.promise(`cd ./cordova && cordova ${args.join(' ')}`);
106-
});
107-
10893
program.on('command:*', (cmd) => {
10994
program.outputHelp();
11095
log.text(`\n Unknown command ${cmd}`);

0 commit comments

Comments
 (0)