0.1.3 • Published 10 years ago

grunt-filenames-to-json v0.1.3

Weekly downloads
3
License
-
Repository
github
Last release
10 years ago

grunt-filenames-to-json

Grunt plugin that generates a json file contains list of files in a given path. Json is an array of file name strings.

Getting started

  • install in npm

    	npm install grunt-filenames-to-json
  • add to Gruntfile

    grunt.loadNpmTasks('grunt-filenames-to-json');

Configure

grunt.initConfig({

    filenamesToJson : {
    	options : {
    		// true if full path should be included, default is false
    		fullPath : false,
    		// true if file extension should be included, default is false 
    		extensions : false
    	},
    	// any valid glob
        files : '**/js',

        // path to write json to
        destination : 'some/path/output.json'
    }

});

Test

  • Clone repo
  • Run "npm install"
  • Run "grunt test" to generate a JSON file of all js files in the repo you've cloned. The file output is "javascriptFileNames.json" in the repo root.
0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

11 years ago

0.1.0

11 years ago