You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

grunt-preprocessor

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-preprocessor

Grunt task to preprocess JS files.

0.2.0
Source
npmnpm
Version published
Weekly downloads
25
66.67%
Maintainers
1
Weekly downloads
 
Created
Source

grunt-preprocessor

Grunt task to preprocess JS files using preprocessor.

Getting Started

Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-preprocessor.

Then add this line to your project's grunt.js gruntfile:

grunt.loadNpmTasks("grunt-preprocessor");

Documentation

Options

root default: .

Include path

Options

src

Source file path

dest

Destination file path

context

Preprocessor context (will be merged with process environment context)

Example #1

  config.preprocessor = {
    main: {
      root: "app/includes",
      src: "app/main.js",
      dest: "build/main.js",
      context: {
        DEBUG: true
      }
    }
  };

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

Release History

  • 20/08/2013 - 0.2.0: Introduce context with process.env merge.
  • 26/07/2013 - 0.1.0: Initial release.

License

Copyright (c) 2013 Stanislav Lesnikov Licensed under the MIT license.

Keywords

javascript

FAQs

Package last updated on 20 Aug 2013

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