Wondering what’s next for npm?Check out our public roadmap! »

    grunt-cson

    0.17.0 • Public • Published

    CSON Grunt plugin Build Status

    Grunt plugin to compile CSON files to JSON.

    Installing

    npm install grunt-cson

    Building

    • Clone the repository
    • Run npm install
    • Run grunt to compile the CoffeeScript code
    • Run grunt test to run the specs

    Configuring

    Add the following to your Gruntfile.coffee:

    grunt.initConfig
      cson:
        glob_to_multiple:
          expand: true
          src: ['src/**/*.cson' ]
          dest: 'lib'
          ext: '.json'
     
    grunt.loadNpmTasks('grunt-cson')

    Then run grunt cson to compile all the .cson files under src/ to .json files under lib/.

    Options

    The following are options are supported when configuring the task.

    cson:
      options:
        rootObject: true | false

    rootObject

    Setting this to true will verify that each file parsed contains a single root object (such as in package.json). This option defaults to false.

    Install

    npm i grunt-cson

    DownloadsWeekly Downloads

    57

    Version

    0.17.0

    License

    MIT

    Last publish

    Collaborators

    • avatar
    • avatar