Closed p1nox closed 7 years ago
Nvm, I found the problem I had while creating files, I'm using gulp
directly instead of using bozon
. In case someone want to implement React, here you go:
require('bozon/lib/tasks');
var gulp = require('gulp');
var bozon = require('bozon/lib/bozon');
var babel = require('gulp-babel');
bozon.buildTaskBefore('scripts:renderer', 'scripts:jsx', function() {
return bozon.src('javascripts/src/**/*.js')
.pipe(babel({
presets: ['es2015', 'react']
}))
.pipe(print())
.pipe(gulp.dest('./app/javascripts/renderer/dist'));
});
And of course files are generated in app/javascripts/renderer/dist
, and I'm putting source files in app/javascripts/src
.
In case I want to use React, in order to use http://reactdesktop.js.org , I just need to add a gulp recipe to transpile jsx files right? Apart from installing needed packages in
app/package.json
I guess.This is my
gulpfile.js
:Using https://github.com/alexmingoia/gulp-jsx, but it doesn't work, no files are generated in
javascripts/renderer
.