Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-infuser

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

gulp-infuser

"Insert js/css resources into .java files and wrapping them in wicket resource render js methods. Can also be used to inject files into other file types."

  • 1.0.4
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Insert js/css resources into .java files and wrapping them in wicket resource render js methods. Can also be used to insert files into other file types.

usage:
in your .java file, your resources will be inserted between these markers (or you can specify your own with your config):

//**infuse_boundary
//**infuse_boundary

In your gulp file:

var config = {
    resources : ['myJavascriptOne.js', 'myJavascript2.js'],
    pathWrap : 'response.renderJavaScriptReference(new PackageResourceReference(ToolsWebApplicationResourceBase.class,//**infuse_file));',
    pathPrefix : '../../', //optional
    boundaryMarker: '//**infuse_file' //optional (showing default)
};
//for pathWrap you can use either placeholder in a string (config above)- //**infuse_file
//or and array - ['tag/method open','tag/method close'];

gulp.task('infuseResources', function() {
    return gulp.src('path/to/java/file.java')
        .pipe(infuser(config))
        .pipe(gulp.dest(path/to/java/directory));
});

You can then set up separate gulp tasks for dev (not concatenated or minified) and default (concatenated and minified):

// Dev Task
gulp.task('dev', ['lint', 'sass', 'infuseResources', 'watch']);
// Default Task
gulp.task('default', ['lint', 'sass', 'scripts','infuseMinifiedResources', 'watch']);

FAQs

Package last updated on 12 Nov 2015

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