Interface OptionModule

{@link http://gruntjs.com/api/grunt.option}

Index

Call signatures

Properties

Methods

Call signatures

(key: string, value: T)

Gets or sets an option. Boolean options can be negated by prepending no- onto the key. For example:

grunt.option('staging', false); var isDev = grunt.option('no-staging'); assert(isDev === true)

Parameters

  • key: string
  • value: T

(key: string): T

Parameters

  • key: string

Returns

T

Properties

public flags: IFlag[]

Returns the options as an array of command line parameters.

Methods

public init(initObject?: any)

Initialize grunt.option. If initObject is omitted option will be initialized to an empty object otherwise will be set to initObject.

Parameters

  • initObject?: any optional