Go to repository

Function init

The same as create, but runs on the local folder as a project. That is, initialize a project in the given folder, which default to the root. Note that the folder must be empty in order to initialize a project in the folder.

If the current folder is not empty.

Parameters

  • Optional
    projectType: string

    The project type to initialize (Defaults to "library").

  • Optional
    packageManager: string

    The package manager to use when downloading dependencies.

  • Optional
    test: boolean

    Whether test information should be added to the .npmrc file.

Returns void