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

gulp-script-inject

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-script-inject

A gulp plugin to inject JS variables after reading from a directory

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
Maintainers
1
Weekly downloads
 
Created
Source

gulp-script-inject

Plugin to inject variables from filenames from a directory. Used for tapestry

Usage

First, install gulp-script-inject as a development dependency:

npm install --save-dev gulp-script-inject

Then, add it to your gulpfile.js:

var scriptInject = require('gulp-script-inject'),
    prunehtml = require('gulp-prune-html');

gulp.src('./src/index.html')
    .pipe(prunehtml(['#YamlPath']))
    .pipe(scriptInject({
        json: './src/json'
    }))
    .pipe(gulp.dest('./src'))

API

scriptInject(options)

options.path

Type: String|Number

Default: 35729

Folder path of files to be read

options.varname

Type: String

Default: yamlPath

Variable name

License

MIT License

Keywords

FAQs

Package last updated on 26 Feb 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