npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

grunt-concat-properties

v0.0.14

Published

Grunt plugin for concating JavaScript models methods from many files

Readme

grunt-concat-properties

Grunt plugin for concating JavaScript models methods or attributes from many files

 View/init.js
 View/firstMethod.js     -->    View.js
 View/secondMethod.js
 ...
  • Usage Example
  • How to start
  • Advantage configuring
  • Recommendations

Usage Example

grunt.initConfig({
    concatProperties: {
        myApp: {
            src: [
                'View/{**/,}*.js'
            ],
            dest: 'build/View.js'
        }
    }
};

src

Type: Array Default value: []

Array of files masks for concatination. Files will be concated at specified sequence.

dest

Type: String Default value: ''

The destination file path


How to start

Sample project structure

Instalation
npm install grunt-concat-properties --save-dev
1 For each model, view or other object you need to create a folder with init.js file.

Example for constructor:

// View/init.js
MyApp.View = function () {};
MyApp.View.prototype = {
    // @include prototypeProperties
};
2 Add files with properties or groups to your object folder.
// View/firstMethod.js
MyApp.Model.prototype.firstMethod = function () {};
// View/secondMethod.js
MyApp.Model.prototype.secondMethod = function () {};
3 Run task
grunt concatProperties
Result:
// build/View.js
MyApp.View = function () {};
MyApp.View.prototype = {
    firstMethod:  function () {},
    secondMethod: function () {}
};

Also you can concat inline properties using other place definition

// @include properties

Advantage configuring

grunt.initConfig({
    concatProperties: {
        myApp: {
            options: {
                base: 'test/App/',
                sourceProcessor: null,
                initFiles: [
                    '**/init.js',
                    '!init.js'
                ]
            },

            src: [
                'models/{**/,}*.{json,yaml,yml,js}',
                'View/{**/,}*.js'
            ],
            dest: 'build/properties.js'
        }
    }
};

src

Type: Array Default value: []

Source files. Task can parse JS, JSON or YAML files

options.base

Type: String Default value: ''

Path to your application from Gruntfile.js You need to specify this property only if Gruntfile.js isn`t placed at your app folder,

options.sourceProcessor

Type: Function Default value: null

The function will being called for process each property source data.

For example:

/**
 * @param source {String}
 * @param propertyData {Object}
 * @param propertyData.name     {String}
 * @param propertyData.source   {String}
 * @param propertyData.comment  {String}
 * @param propertyData.type     {String}  'function' || 'object'
 * @param propertyData.isPublic {Boolean}
 * @param propertyData.isFromPrototype {Boolean}
 * @param propertyData.filePath {String}
 */
function sourceProcessor (source, propertyData) {
    return source;
}

options.initFiles

Type: Array Default value: ['**/init.js', '!init.js']

Masks of initialization files

Multiple destination files configuration

grunt.initConfig({
    concatProperties: {
        myApp: {
            files: {
                'build/models.js': [
                    'models/{**/,}*.js'
                ],
                'build/View.js': [
                    'View/{**/,}*.js'
                ]
            }
        }
    }
};

Recommendations

Use some like grunt-jsbeautifier to keep indentation at concated files