Giter Site home page Giter Site logo

gulp-rigger's People

Contributors

isochronous avatar kutsenkoa avatar kuzyk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gulp-rigger's Issues

Error while include file

When I write comments like / ========= / into file where I try to load another scripts (with using //= path/to/file.js) I catch the next error:

buffer.js:247
  throw new TypeError(kFromErrorMsg);
  ^

TypeError: must start with number, buffer, array or string
    at fromObject (buffer.js:247:9)
    at Function.Buffer.from (buffer.js:115:10)
    at new Buffer (buffer.js:94:17)
    at /var/www/gateway-portal/node_modules/gulp-rigger/index.js:20:29
    at Rigger.<anonymous> (/var/www/gateway-portal/node_modules/rigger/index.js:719:9)
    at emitOne (events.js:90:13)
    at Rigger.emit (events.js:182:7)
    at /var/www/gateway-portal/node_modules/rigger/index.js:252:16
    at /var/www/gateway-portal/node_modules/rigger/node_modules/async/lib/async.js:232:13
    at /var/www/gateway-portal/node_modules/rigger/node_modules/async/lib/async.js:113:21

When I delete the comments I have a working code without any changes for another sides.

Doesn't show an error in gulp-notify, only in console.

I had a gulp 3 configuration with gulp-plumber as error handler (so current running task never crashes) and also had a gulp-notify as a message alert to system in a case for errors, for example if I made a mistake in the path of the file name, such as an empty space at the end, there was a handy notify. But i recently update my gulp to 4 version and here the problems started - gulp-plumber stopped working, current task doesn't fail in the 4th version of gulp (in case a space typo on the end of filepath), only alert in console, so plumber became unnecessarily thing in this configuration in my opinion, and unfortunately gulp-notify also stopped working.

//My old gulp 3 task:

gulp.task('htmlTemplate', function () {
    return gulp.src(path.layout.htmlTemplate) 
        .pipe(plumber({errorHandler: notify.onError({
            message: "Error: <%= error.message %>",
            title: "HTML - ошибка компиляции"
          })}))
        .pipe(rigger())
        .pipe(gulp.dest(path.layoutDest.html))
        .pipe(reload({stream: true})); 
});


//Current gulp 4, unfortunantely notifier and onerror doesn't work

gulp.task('htmlTemplate', function () {
    return gulp.src(path.layout.htmlTemplate)
        .pipe(rigger()
            .on('error', notify.onError({
                message: "Error: <%= error.message %>",
                title: "HTML - ошибка компиляции"
            })
        ))
        .pipe(rigger()) 
        .pipe(gulp.dest(path.layoutDest.html))
        .pipe(reload({stream: true})); 
});

Maybe someone have a working configuration in gulp 4?

Gulp-rigger doesnt work with gulp-plumber

Gulp-rigger doesnt work with gulp-plumber. Buffer.js:67 error appears.

var gulp = require('gulp'),
    plumber = require('gulp-plumber'),
    rigger = require('gulp-rigger');

var onError = function(err) {
        notify.onError({message: "Failed\n<%= error.message %>", sound: true})(err);
        this.emit('end');
}
gulp.task('javascript', function() {
    gulp.src('src/js/*.js')
        .pipe(plumber({errorHandler: onError}))
        .pipe(rigger())
        .pipe(gulp.dest('./js'))
        .pipe(onComplete());
});
gulp.task('default', ['javascript']);

Плагин перестал выгружать собранные файлы в папку назначение

Возможно это из-за большого кол-ва файлов. Таск отрабатывает:

gulp.task('html', function () {
    gulp.src('app/pages/*.html')
        .pipe(rigger())
        .pipe(gulp.dest('app/'))
		.pipe(browsersync.reload( {stream: true} ))
});

вот консоль:
[20:06:02] Starting 'html'...
[20:06:02] Finished 'html' after 1.82 ms

Но файлы не выгружаются. Если поудалять все полностью и закинуть все заново в папку сборки, то страницы начинают собираться, но не все(

Прошу помочь! так как проект весьма крупный, и не хотелось бы сейчас переделывать во что-то другое

Сonnect 2 css files into one using gulp-rigger

Is it possible to connect 2 css files into one using gulp-rigger? And how to do it?
I tried to do it:
My main.css:

/*
 * Third party
 */
//= ../../bower_components/normalize.css/normalize.css
/*
 * Custom
 */
//= partials/style.css

Task for gulp:

gulp.task('css:build', function () {
    gulp.src(path.src.css)
        .pipe(rigger())
        .pipe(sourcemaps.init())
        .pipe(cssmin())
        .pipe(sourcemaps.write())
        .pipe(gulp.dest(path.build.css))
        .pipe(connect.reload());
});

But as a result I get:

//=../../bower_components/normalize.css/normalize.css //=partials/style.css
/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5jc3MiLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlcyI6WyJtYWluLmNzcyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKlxyXG4gKiBUaGlyZCBwYXJ0eVxyXG4gKi9cclxuLy89IC4uLy4uL2Jvd2VyX2NvbXBvbmVudHMvbm9ybWFsaXplLmNzcy9ub3JtYWxpemUuY3NzXHJcblxyXG5cclxuLypcclxuICogQ3VzdG9tXHJcbiAqL1xyXG4vLz0gcGFydGlhbHMvc3R5bGUuY3NzIl0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9 */

Update version of used rigger

Faced with a problem of RangeError: Maximum call stack size exceeded. Took a look into the versions of dependent rigger version and it's:"gulp-rigger": "^0.5.8" and i found it totally out of date as this version had been release 4 years ago. Of course i fixed this problem by installing last version of rigger, but i guess it would be nice to change the version of rigger for the last one in the dependencies list.

TypeError: must start with number, buffer, array or string

buffer.js:68
throw new TypeError('must start with number, buffer, array or string');
^
TypeError: must start with number, buffer, array or string
at new Buffer (buffer.js:68:11)
at D:\SERVER_U2\frontend\esterfurs\node_modules\gulp-rigger\index.js:23:29
at Rigger. (D:\SERVER_U2\frontend\esterfurs\node_modules\gulp-rigger\node_modules\rigger\index.js:719:9)
at Rigger.emit (events.js:107:17)
at D:\SERVER_U2\frontend\esterfurs\node_modules\gulp-rigger\node_modules\rigger\index.js:252:16
at D:\SERVER_U2\frontend\esterfurs\node_modules\gulp-rigger\node_modules\rigger\node_modules\async\lib\async.js:232:13
at D:\SERVER_U2\frontend\esterfurs\node_modules\gulp-rigger\node_modules\rigger\node_modules\async\lib\async.js:113:21
at D:\SERVER_U2\frontend\esterfurs\node_modules\gulp-rigger\node_modules\rigger\node_modules\async\lib\async.js:24:16
at D:\SERVER_U2\frontend\esterfurs\node_modules\gulp-rigger\node_modules\rigger\node_modules\async\lib\async.js:229:17
at D:\SERVER_U2\frontend\esterfurs\node_modules\gulp-rigger\node_modules\rigger\index.js:391:21

Documentation

It is not clear what your plugin does without any documentation except of just obvious gulp settings.

TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.

TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.
at fromObject (buffer.js:262:9)
at Function.Buffer.from (buffer.js:101:10)
at new Buffer (buffer.js:80:17)
at C:\Users*\alinabolat.com\node_modules\gulp-rigger\index.js:20:29
at Rigger. (C:\Users*\alinabolat.com\node_modules\rigger\index.js:719:9)
at emitOne (events.js:96:13)
at Rigger.emit (events.js:188:7)
at C:\Users*\alinabolat.com\node_modules\rigger\index.js:252:16
at C:\Users*\alinabolat.com\node_modules\rigger\node_modules\async\lib\async.js:232:13
at C:\Users*\alinabolat.com\node_modules\rigger\node_modules\async\lib\async.js:113:21

I am getting this error which I don't understand. Please, could you help me with this error. Please see below the link to my code:
https://github.com/anuar-bolatov/alinabolat.com.git

Kindest regards,
Anuar

recursive includes

Hi!
Thanx for this great lib

I have some problems

Rigger should to normally works with recursive includes, but not for me

I have next file structures

/file.html
/folder1/file1.html
/folder/file2.html

in /file.html I wrote
//= folder1/file1.html

in folder1/file1.html I wrote
//= file2.html

and catch the problem

buffer.js:68
    throw new TypeError('must start with number, buffer, array or string');
          ^
TypeError: must start with number, buffer, array or string
    at new Buffer (buffer.js:68:11)
    at /Users/itimohin/Documents/CLOUD_STORAGES/OneDrive/PHPStorm-Projects/template-frontend/node_modules/gulp-rigger/index.js:20:29
    at Rigger.<anonymous> (/Users/itimohin/Documents/CLOUD_STORAGES/OneDrive/PHPStorm-Projects/template-frontend/node_modules/gulp-rigger/node_modules/rigger/index.js:719:9)
    at Rigger.emit (events.js:107:17)
    at /Users/itimohin/Documents/CLOUD_STORAGES/OneDrive/PHPStorm-Projects/template-frontend/node_modules/gulp-rigger/node_modules/rigger/index.js:252:16
    at /Users/itimohin/Documents/CLOUD_STORAGES/OneDrive/PHPStorm-Projects/template-frontend/node_modules/gulp-rigger/node_modules/rigger/node_modules/async/lib/async.js:232:13
    at /Users/itimohin/Documents/CLOUD_STORAGES/OneDrive/PHPStorm-Projects/template-frontend/node_modules/gulp-rigger/node_modules/rigger/node_modules/async/lib/async.js:113:21
    at /Users/itimohin/Documents/CLOUD_STORAGES/OneDrive/PHPStorm-Projects/template-frontend/node_modules/gulp-rigger/node_modules/rigger/node_modules/async/lib/async.js:24:16
    at /Users/itimohin/Documents/CLOUD_STORAGES/OneDrive/PHPStorm-Projects/template-frontend/node_modules/gulp-rigger/node_modules/rigger/node_modules/async/lib/async.js:229:17
    at /Users/itimohin/Documents/CLOUD_STORAGES/OneDrive/PHPStorm-Projects/template-frontend/node_modules/gulp-rigger/node_modules/rigger/index.js:391:21

also I tried to write
//= ./file2.html
but result was just like this

Can you help me?

Thank you

Buffer error

buffer.js:68
throw new TypeError('must start with number, buffer, array or string');
^
TypeError: must start with number, buffer, array or string
at new Buffer (buffer.js:68:11)
at /home/user/testproject/node_modules/gulp-rigger/index.js:20:29
at Rigger. (/home/user/testproject/node_modules/gulp-rigger/node_modules/rigger/index.js:719:9)
at Rigger.emit (events.js:107:17)
at /home/user/testproject/node_modules/gulp-rigger/node_modules/rigger/index.js:252:16
at /home/user/testproject/node_modules/gulp-rigger/node_modules/rigger/node_modules/async/lib/async.js:232:13
at /home/user/testproject/node_modules/gulp-rigger/node_modules/rigger/node_modules/async/lib/async.js:113:21
at /home/user/testproject/node_modules/gulp-rigger/node_modules/rigger/node_modules/async/lib/async.js:24:16
at /home/user/testproject/node_modules/gulp-rigger/node_modules/rigger/node_modules/async/lib/async.js:229:17
at /home/user/testproject/node_modules/gulp-rigger/node_modules/rigger/index.js:391:21

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.