Skip to content

imapi/grunt-profile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grunt: Profiles

Environment profiles configuration for grunt, many thanks for the idea to Logan Koester

Gittip

NPM

Getting Started

This plugin requires Grunt ~0.4.1

To install:

npm install grunt-profile --save-dev

How to use:

grunt.initConfig({
  // ...

  profile: {
    default: 'local',
    profiles: ['local', 'live']
  },

  concat: {
    options: {
      separator: ';',
      sourceMap: false,
      local: {
        sourceMap: true  
      }
    },
    // ...

  }
});

grunt.loadNpmTasks('grunt-profile');

You can use profile/profiles at any place in any task configuration, based on the current profile it would be automatically substituted with the correct one. For example running the snippet about with:

grunt concat

Will include the sourceMap, and with:

grunt profile:live concat

will not.

You can setup as many profiles as you like, these two is just for the reference.

About

Environment configuration for grunt

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published