npm.io
14.4.2 • Published 2d agoCLI

@o3r/create

Licence
BSD-3-Clause
Version
14.4.2
Deps
6
Size
21 kB
Vulns
0
Weekly
2.9K

Otter project initializer

Super cute Otter!

Description

Stable Version Bundle Size

This package is an NPM initializer to generate a web application based on the Otter Framework.

Create an Otter application

This package is simplifying the start of an Otter Framework based application.

Usage

npm create @o3r <project-name> -- [...options]

yarn create is not supported.

On Windows OS, Git Bash terminal is not fully supported by different CLI used behind Otter project and can lead to execution error. We recommend to minimize its usage.

Custom package manager

By default, the npm package manager will be used to generate the project, but you can generate an environment with a specific package manager using the --package-manager option:

npm create @o3r <project-name> -- --package-manager=yarn [...options]

The option --package-manager=yarn can be simplified to --yarn.

At the moment, the package-manager option only supports yarn and npm.

Custom registry

You can specify the npm's package registry to use.

npm create @o3r <project-name> --registry=<registry-url> -- [...options]

It will create a project with a .npmrc file configured to target the specified registry. If the specified package manager is yarn, it will also configure the .yarnrc.yml file.

Others available options

The generator accepts all the configurations from the Angular ng new command, see the options list. On top of them, the following options can be provided to the initializer:

  • --yarn: Enforce yarn package manager. This option will be ignored if --package-manager is already specified.
  • --yarn-version: specify the version of yarn to use (default: latest)
  • --exact-o3r-version: use a pinned version for Otter packages.
  • --preset <preset_name>: the collection of Otter modules to install. If not provided, it defaults to recommended. The full list of presets is available in @o3r/core

Keywords