2.0.0 • Published 2 years ago

immersive v2.0.0

Weekly downloads
17
License
MIT
Repository
github
Last release
2 years ago

Immersive CircleCI

A framework to build immersive CLIs & great developer tools.

Features

Install

yarn add immersive
or
npm install immersive

Usage

const immersive = require('immersive');

const config = {
  // Application name used for config persistence (required)
  projectName: 'Immersive',
  // Will be displayed on CLI start (optional - default to displayName)
  displayName: 'Immersive',
  // Loaded commands (required if commandsDirectory not provided) - Should be valid map of ImmersiveCommand
  commands: {
    'import-orgs': {
      command: 'importOrgs',
      description: 'Import organizations',
      action: () => {},
    },
  },
  // Path to the directory where commands are defined (required if commands not provided)
  commandsDirectory: path.join(__dirname, 'commands'),
  // Will be accessible from commands as argument (optional)
  helpers: {
    db,
  },
  // Configuration will be passed to helpers based on the current environment (optional)
  environments: {
    development: { database: 'devdb' },
    staging: { database: 'stagingdb' },
    production: { database: 'proddb' },
  },
  // Define the current environment on CLI start
  // The current environment can be changed using the `env <envName>` command (optional)
  defaultEnvironment: 'development',
  // Default cli config (optional)
  defaultConfig: {
    // Displayed in prompt
    user: 'john',
    // Displayed in prompt
    symbol: '>',
    colors: {
      prompt: 'green',
    },
  },
};

immersive(config);

Inspiration

Inspired by the awesome vorpal framework.

1.8.1

2 years ago

1.8.0

2 years ago

2.0.0

2 years ago

1.7.0

2 years ago

1.6.0

2 years ago

1.5.0

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.4.0

4 years ago

1.3.1

5 years ago

1.3.0

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago