absolvent / gore-gulp

Simple way to run and maintain React.js projects without any configuration.
MIT License
1 stars 0 forks source link

Plugin System #26

Closed kl3ryk closed 9 years ago

kl3ryk commented 9 years ago

Create a plugin system for gore-gulp extending. For example we are using sass and want it to work with gore-gulp so now we need to do something like this:

gg(__dirname).setup(gulp);

gulp.task("sass", function () {
    gulp.src("./scss/**/*.scss")
        .pipe(sourcemaps.init())
        .pipe(sass({
            errLogToConsole: true
        }))
        .pipe(autoprefixer({
            browsers: ["last 4 versions"],
            cascade: false
        }))
        .pipe(minifycss())
        .pipe(sourcemaps.write())
        .pipe(gulp.dest("./web/css"));
});

So this is not so perfect because we still need to copy-paste it per project. Better solution would be a plugin system with ussage like this:

gg(__dirname).setup({
    "gulp": gulp,
    "plugins": plugins
});