New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grunt-depend-concat

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-depend-concat

Concatenates files in order via path references

  • 0.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

grunt-depend-concat

A Grunt task that concatenates files in order via path references.

This task was initially developed to be used in conjunction with grunt-ts for concatenating separately compiled JavaScript files.

Written in TypeScript.

Supported Path References

Comments Tags

/**
 * @depends ../path/to/file.js
 */

/* @requires ../path/to/file.js */

// @include ../path/to/file.js

TypeScript References

/// <reference path="../path/to/file.ts" />

Getting Started

This plugin requires Grunt ~0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-depend-concat --save-dev

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

grunt.loadNpmTasks('grunt-depend-concat');

Configuration

method

The method used for finding dependencies. Default: "depends"

Comment Tags

If the method option is set to a string that doesn't match a built in method it will be treated as a comment tag. For example, setting the method to "use" will result in the following comments be recognized.

/**
 * @use ../path/to/file.js
 */

/* @use ../path/to/file.js */

// @use ../path/to/file.js
TypeScript References

Set the the method to "reference" for TypeScript references to be recognized.

/// <reference path="../path/to/file.ts" />
Custom

You can also use a custom method by providing a literal object with the regex and index properties set.

{
    /**
     * A regular expression used to find the dependencies
     */
    regex: /somefancyregex/gi,

    /**
     * An array index where each dependency's file path
     * can be found from the result of RegExp.exec()
     */
    index: 1
}

separator

File contents separator. Default: "\n"

ignore_ext

When looking for matching dependency files, the file extensions are ignored. Allows TypeScript references (.ts) to discover their compiled (.js) counterparts. Default: true

Example

grunt.initConfig({
    'depend-concat': {
        options: {
            method: 'depends',
            separator: '\n'
        },
        build: {
            src: ['src/files/**.js'],
            dest: 'dist/concat.js'
        }
    }
});

License

Released under the MIT license


(^_^)

Keywords

FAQs

Package last updated on 28 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc