Skip to content
This repository has been archived by the owner on May 20, 2022. It is now read-only.

treycordova/gulp-nativejsx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-nativejsx Build Status Version Status

Gulp plugin for nativejsx.

Hello, my soda-slurping Gulpers. Here's a Gulp plugin to help fill your cup.

Installation

Install gulp-nativejsx by running this command in your project folder:

npm install gulp-nativejsx --save-dev

Configuration

'use strict';

var gulp = require('gulp');
var nativejsx = require('gulp-nativejsx');

gulp.task('nativejsx', function() {
  return gulp.src('./templates/**/*.jsx').
    pipe(nativejsx().on('error', error)).
    pipe(gulp.dest('./build/templates'));
});

gulp.task('nativejsx:watch', function() {
  gulp.watch('./templates/**/*.jsx', ['nativejsx']);
});
Options
gulp.task('nativejsx', function() {
  return gulp.src('./templates/**/*.jsx').
    pipe(nativejsx({variablePrefix: '__', declarationType: 'let'}).on('error', error)).
    pipe(gulp.dest('./build/templates'));
});
  • declarationType: Either var (default), const, or let.
  • variablePrefix: Any string (defaults to $$) you can conjure up that produces a valid JavaScript variable.
  • acorn: All acorn options are available here. Defaults to {plugins: {jsx: true}, ecmaVersion: 6, sourceType: 'module'}.

About

Gulp plugin for nativejsx. 💛

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published