Socket
Socket
Sign inDemoInstall

gulp-react-st

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

gulp-react-st

Gulp plugin for react-st npm module


Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

gulp-react-st

Gulp plugin for https://github.com/redexp/react-separate-template

Build Status

Installation

npm install gulp-react-st

Usage

var gulp = require('gulp'),
    watch = require('gulp-watch'),
    plumb = require('gulp-plumber'),
    convert = require('./index');

gulp.task('react-st', function () {
    watch(['js/components/*.js', 'js/views/*.html'])
        .pipe(plumb())
        .pipe(convert({
            relativeHtmlDir: '../views',
            relativeJsDir: '../components',
            type: 'js'
        }))
        .pipe(gulp.dest('js/build'))
    ;
});

Options

  • relativeHtmlDir: [String|Function] - optional relative to current file path to html directory if current file have .js extension.
  • relativeJsDir: [String|Function] - optional relative path to js directory if current file extension is different to .js.
  • type: ["jsx"|"js"] - optional type of output file. If jsx then output file will have .jsx extension, if js then output jsx code will be converted to js code with react-tools module and extension will be .js. Default is jsx.

Relative file name should be the same with current file, so if menu.js then html should be menu.html. If relative paths not specified then plugin will look for relative file in same directory where current file.

Keywords

FAQs

Package last updated on 16 Jan 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