Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

gulp-jinx-inject

1.0.1 • Public • Published

Imgur

Gulp Jinx Inject

This is an GulpJS plugin for inject Jinx .AS packages files

Installation

npm install gulp-jinx-inject

Usage

var jinxInject = require('gulp-jinx-inject');
var tmpMainFile = '.tmp/as/app/flash/main.as';
var pkgs = require('jinx-loader')(tmpMainFile);
 
return gulp.src(tmpMainFile) // file path to inject
    .pipe(jinxInject(pkgs.as))
    .pipe(gulp.dest(path.dirname(tmpMainFile))); // injected file

Result example

// before 
 
package {
 
import flash.display.*;
 
public class main extends Sprite {
public function main() {
 
    // [[inject:jinx]]
 
    include 'partials/bar.as';
}}}
 
// after
 
package {
 
import flash.display.*;
 
public class main extends Sprite {
public function main() {
 
    include '../../../node_modules/jinx-mempanel/index.as';
  include '../../../node_modules/jinx.as/jinx.as';
 
    include 'partials/bar.as';
}}}

The MIT License

Install

npm i gulp-jinx-inject

DownloadsWeekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • avatar