@nestjs/cli (master) doxdox documentation

Nest - modern, fast, powerful node.js web framework (@cli)

# createGitIgnoreFile(dir, content)

Write a file .gitignore in the root of the newly created project. .gitignore available in @nestjs/schematics cannot be published to NPM (needs to be investigated).

Parameters

Name Types Description
dir Relative path to the project.
content (optional) Content written in the .gitignore.

Returns

Resolves when succeeds, or rejects with any error from `fn.writeFile`.

# path()

Load the TypeScript compiler, then load the TypeScript gulpfile which simply loads all the tasks. The tasks are really inside tools/gulp/tasks.

# closeWatchers()

Using on nest build to close file watch or the build process will not end Interval like process If no action has been taken recently close watchers If action has been taken recently flag and try again

# convertPath(windowsPath)

Converts Windows specific file paths to posix

Parameters

Name Types Description
windowsPath

# copyPathResolve()

Helper function for returning a copy destination filename

# getBuilder(configuration, cmdOptions, appName)

Returns the builder to use for the given application.

Parameters

Name Types Description
configuration Configuration object.
cmdOptions Command line options.
appName Application name.

# getTscConfigPath(configuration, cmdOptions, appName)

Returns the path to the tsc configuration file to use for the given application.

Parameters

Name Types Description
configuration Configuration object.
cmdOptions Command line options.
appName Application name.

# fragment.startsWith()

When path is escaped with "" double quotes, concatenate the property path. Reference: https://github.com/nestjs/nest-cli/issues/947

# getWebpackConfigPath(configuration, cmdOptions, appName)

Returns the path to the webpack configuration file to use for the given application.

Parameters

Name Types Description
configuration Configuration object.
cmdOptions Command line options.
appName Application name.

# outputDir()

The output directory to write the metadata to.

# PluginMetadataGenerator()

Generates plugins metadata by traversing the AST of the project.

# ts.Program()

A reference to an existing ts.Program instance.

# visitors()

The visitors to use to generate the metadata.

# PluginMetadataPrinter()

Prints the metadata to a file.

# preserveWatchOutput()

If undefined, the value of 'preserveWatchOutput' option from tsconfig file will be used instead.

# loadedConfigsCache()

A cache table that maps some reader (by its name along with the config path) to a loaded configuration. This was added because several commands relies on the app's config in order to generate some dynanmic content prior running the command itself.

# rawFullCommand(command)

Parameters

Name Types Description
command

# normalizeToKebabOrSnakeCase(str)

Parameters

Name Types Description
str

# camelCase(flag)

private method

Camel-case the given flag

Parameters

Name Types Description
flag String

Returns

String

# describe.skip()

This test is temporarily skipped because it's flaky on CI. Not yet clear why but it's not a blocker.

# cleanDirs()

Cleans empty dirs

# cleanOutput()

Cleans the build output assets from the packages folders