Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 

README.adoc

Js Closure Wrap Asset-Pipeline

The js-closure-wrap-asset-pipeline is an Asset Pipeline module that wraps javascript files in immediately executing anonymous closures to prevent variables from creeping into the global scope.

Getting Started

Gradle / Grails 3

Getting started

Gradle / Grails 3

build.gradle
plugins {
    id 'com.bertramlabs.asset-pipeline' version '2.5.0'
}

dependencies {
    assets 'com.craigburke:js-closure-wrap-asset-pipeline:1.2.0'
}

How it Works

This plugin will take a JavaScript file with a wrapped directive option like this:

//= wrapped
var foo = 'Bar';
console.log(foo);

And will wrap it in a closure like this:

(function() {
    "use strict";
    var foo = 'Bar';
    console.log(foo);
})();

About

Js closure wrap module for the Asset Pipeline

Resources

Releases

No releases published

Languages

You can’t perform that action at this time.