6.0.1 • Published 1 year ago

@ionic/cli-framework v6.0.1

Weekly downloads
75,633
License
MIT
Repository
github
Last release
1 year ago

CLI Framework, by Ionic

The foundation framework of the Ionic CLI.

Getting Started

index.js:

const { Command, CommandMap, Namespace, execute } = require('@ionic/cli-framework');

class VersionCommand extends Command {
  async getMetadata() {
    return {
      name: 'version',
      summary: 'Print CLI version',
    };
  }

  async run() {
    console.log('1.0.0');
  }
}

class RootNamespace extends Namespace {
  async getMetadata() {
    return {
      name: 'mynewcli',
      summary: 'A cool CLI that prints its own version',
    };
  }

  async getCommands() {
    return new CommandMap([['version', async () => new VersionCommand(this)]]);
  }
}

module.exports = async function(argv, env) {
  await execute({ namespace: new RootNamespace(), argv, env });
}

bin/mynewcli:

#!/usr/bin/env node

const run = require('../');
run(process.argv.slice(2), process.env);

command line:

$ ./bin/mynewcli
$ ./bin/mynewcli version
$ ./bin/mynewcli version --help
6.0.1

1 year ago

5.1.7

1 year ago

5.1.6

1 year ago

6.0.0

1 year ago

5.1.4

2 years ago

5.1.4-testing.0

2 years ago

5.1.3

3 years ago

5.1.2

3 years ago

5.1.1

3 years ago

5.1.2-testing.0

3 years ago

5.1.1-testing.0

4 years ago

5.1.0

4 years ago

5.0.6

4 years ago

5.0.5

4 years ago

5.0.4

4 years ago

5.0.3

4 years ago

5.0.2

4 years ago

5.0.1

4 years ago

5.0.0

4 years ago

4.2.2

4 years ago

4.2.1

4 years ago

4.2.0

5 years ago

4.1.5

5 years ago

4.1.4

5 years ago

4.1.3

5 years ago

4.1.2

5 years ago

4.1.1

5 years ago

4.0.2

5 years ago

4.1.0

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.0.6

5 years ago

3.0.5

5 years ago

3.0.4

5 years ago

3.0.3

5 years ago

3.0.2

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.1.8

5 years ago

2.1.7

5 years ago

2.1.6

5 years ago

2.1.5

5 years ago

2.1.4

5 years ago

2.1.3

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.1.1-testing.0

5 years ago

2.1.0

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

2.0.0-beta.3

6 years ago

2.0.0-beta.2

6 years ago

2.0.0-beta.1

6 years ago

2.0.0-beta.0

6 years ago

1.7.0

6 years ago

1.6.3

6 years ago

1.6.2

6 years ago

1.6.1

6 years ago

1.6.0

6 years ago

1.5.3

6 years ago

1.5.2

6 years ago

1.5.1

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

1.0.0-rc.13

6 years ago

1.0.0-rc.12

6 years ago

1.0.0-rc.11

6 years ago

1.0.0-rc.10

6 years ago

1.0.0-rc.9

7 years ago

1.0.0-rc.8

7 years ago

1.0.0-rc.7

7 years ago

1.0.0-rc.6

7 years ago

1.0.0-rc.5

7 years ago

1.0.0-rc.4

7 years ago

1.0.0-rc.3

7 years ago

1.0.0-rc.2

7 years ago

1.0.0-rc.1

7 years ago

1.0.0-rc.0

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago