gulp-jinx-inject
v1.0.1
Published
This is an GulpJS plugin for inject [Jinx](https://github.com/webcaetano/jinx) .AS packages files
Downloads
3
Maintainers
Readme
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