thiebo
thiebo

Reputation: 1435

gulp transcompiling partially

I am building a simple test (new to gulp). my directory looks like this :

menu/
    js/
        node_modules/
        dist/
        es6/
        public/
            dist/
            es6/
    gulpfile.js
    .babelrc

gulpfile.js contains this :

const gulp = require('gulp');
const babel = require('gulp-babel');
gulp.task('default',function(){

    gulp.src("e6/**/*.js")
    .pipe(babel())
    .pipe(gulp.dest("dist"));

    gulp.src("public/es6/**/*.js")
    .pipe(babel())
    .pipe(gulp.dest("public/dist"));
});

Then creating a test.js and run 'gulp' from the terminal (cd to js/), I get this :

LEA js # gulp 
[09:29:42] Using gulpfile ~/Bureau/menu/js/gulpfile.js
[09:29:42] Starting 'default'...
[09:29:42] Finished 'default' after 8.93 ms

and a file js/public/dist/test.js is created that functions well (using node in terminal).

BUT : no js/dist/test.js is created. I don't see why ...

Upvotes: 0

Views: 39

Answers (1)

Prototype
Prototype

Reputation: 276

You are missing es6 in here -> gulp.src("e6/**/*.js")

Upvotes: 1

Related Questions