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

gulp-mock-inject

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-mock-inject

Inject mock script into html file for development

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

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

#gulp-mock-inject

Auto inject mock test script into html.

##Usage

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!-- mockinject -->
<!-- endinject -->
</body>
</html>
var gulp   = require('gulp'),
    inject = require('../src/index');
    
gulp.task('Inject',function(){
    return  gulp.src('./test/*.html')
                .pipe(inject.server({
                    script:'123.js'
                }))
                .pipe(gulp.dest('test'));
});

gulp.task('clearInject',function(){
    return  gulp.src('./test/*.html')
                .pipe(inject.dist())
                .pipe(gulp.dest('test'));
});

##API

server(options) Inject script into html file with designated script. Html file should have inject sign like:

<!-- mockinject -->
<!-- endinject -->

options.script

Type:String

Path of script.

dist()

Clear injected script for build.

Keywords

FAQs

Package last updated on 20 Jun 2016

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