Options
All
  • Public
  • Public/Protected
  • All
Menu

Comment Type Multi Breakstring Indent

Comment Type Multi with indent

BUILD_INCLUDE

        // BUILD_INCLUDE("./scratch/replace1.txt")[comment?type=multi,text?indent=true,breakstring?Flags=word]

File replace01.txt is to be included in output file.

The indent before // BUILD_INCLUDE is added before each line of the output.

Options

[comment?type=multi,text?indent=true,breakstring?Flags=word]

Comment

The option comments allow for input file content to be treated as comments in the output.

Comment Type Multi

type=multi The first line is /*
Pads the left side of each line with * and a single space.
The last lie is */

Example:

/*
 * my multi line comments
 * comments continue on this line
 */

See: Enum values for commentkind for possible types.

Text

The option text allow for input file content to be manipulated in several ways before being outputed.

Text Indent

The option text?indent or text?indent=true will result in the output including the indent on each line that came before the BUILD_INCLUDE.

Breakstring

The various options of breakstring allow for the breaking of lines in different ways.
If the width option of breakstring is not set then width defaults to 80.

Breakstring Flags Word

flags=word determines that lines are not to be broken on a word.

Config

GruntFile.js

module.exports = function (grunt) {
  grunt.initConfig({
    build_include: {
      default: {
        match: {
          kind: 'buildIncludeSlash'
        },
        src: './lib/test.txt',
        dest: './scratch/test.txt'
      }
    }
  });
  grunt.loadNpmTasks('grunt-build-include');
  grunt.registerTask('default', ['build_include:default']);
};

Output

        /*
         * The quick, brown fox jumps over a lazy dog. DJs flock by when MTV ax quiz prog.
         * Junk MTV quiz graced by fox whelps.Bawds jog, flick quartz, vex nymphs. Waltz, bad
         * nymph, for quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs
         * jumpy veldt fox.Bright vixens jump; dozy fowl quack. Quick wafting zephyrs vex bold
         * Jim. Quick zephyrs blow, vexing daft Jim. Sex-charged fop blew my junk TV quiz.How
         * quickly daft jumping zebras vex. Two driven jocks help fax my big quiz. Quick, Baz,
         * get my woven flax jodhpurs! "Now fax quiz Jack!" my brave ghost pled. Five quacking
         * zephyrs jolt my wax bed. Flummoxed by job, kvetching W. zaps Iraq. Cozy sphinx waves
         * quart jug of bad milk.A very bad quack might jinx zippy fowls. Few quips galvanized
         * the mock jury box. Quick brown dogs jump over the lazy fox. The jay, pig, fox, zebra,
         * and my wolves quack!Blowzy red vixens fight for a quick jump. Joaquin Phoenix was
         * gazed by MTV for luck. A wizard’s job is to vex chumps quickly in fog. Watch "Jeopardy!
         * ", Alex Trebek's fun TV quiz game. Woven silk pyjamas exchanged for blue quartz.
         */

Generated using TypeDoc