Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

grunt-user-story

0.0.1 • Public • Published

Build Status

NPM

grunt-user-story

Grunt plugin for UserStory.js

Getting Started

npm install grunt-user-story --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-user-story');

The "userStory" task

Overview

In your project's Gruntfile, add a section named userStory to the data object passed into grunt.initConfig().

grunt.initConfig({
    userStory: {
        options: {
            // Task-specific options go here.
        },
        your_target: {
            // Target-specific file lists and/or options go here.
        },
    },
});

Options

options.destDir

Type: String Default value: null

A string value that represents the directory in which to save the converted files.

grunt.initConfig({
    userStory: {
        options: {
            destDir: 'output'
        },
        src: ['src/1.js', 'src/dir/2.js']
    },
});

This code will produce in the following files:

output/src/1.js
output/src/dir/2.js

If destDir is null, source files will be overwritten with the converted content.

options.baseDir

Type: String Default value: null

A string value that indicates the base directory of files that should be excluded from the directory hierarchy at non-null destDir.

grunt.initConfig({
    userStory: {
        options: {
            destDir: 'output',
            baseDir: 'src'
        },
        src: ['src/1.js', 'src/dir/2.js']
    },
});

This code will produce in the following files:

output/1.js
output/dir/2.js

Keywords

Install

npm i grunt-user-story

DownloadsWeekly Downloads

1

Version

0.0.1

License

none

Last publish

Collaborators

  • avatar