lundi 1 août 2016

gulp build not outputing file. Where did I go wrong?

I would like to know why my gulp task is not outputing any files.

Here is my task:

import gulp from 'gulp';
import babelify from 'babelify';
import sourcemaps from 'gulp-sourcemaps';
import browserify from 'browserify';
import source from 'vinyl-source-stream';

gulp.task('build', function () {
  return browserify({entries: './src/app/index.jsx'})
    .transform(babelify, {presets: [ 'es2015', 'react' ]})
    .bundle()
    .pipe(source('bundle.js'))
    .pipe(gulp.dest('dist'));
});

gulpfile.babel.js is in the app root, and I have the following directory structure in my app.

src

|- app

|- index.jsx

I tried to created /dist myself, but still no bundle.js is generated inside it.

Where did I go wrong?

Aucun commentaire:

Enregistrer un commentaire