Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: gulp/grunt support #23

Open
bartveneman opened this issue Apr 8, 2014 · 10 comments
Open

Idea: gulp/grunt support #23

bartveneman opened this issue Apr 8, 2014 · 10 comments

Comments

@bartveneman
Copy link

I'm not really into Node.js, but I'd like to see Parker integrated in my development workflow with Gulp along with CSSLint, Gulp-Sloc etc.

@bartveneman
Copy link
Author

FWIW: For now I'm fixing this with gulp-shell. Then created a task like so:

gulp.task('parker', shell.task('parker assets/css/master.css'));

@felquis
Copy link

felquis commented Aug 19, 2014

Thanks @bartveneman I think this will be really useful in my CI :)

@bartveneman
Copy link
Author

Btw, @katiefenn, feel free to close this, as using it with gulp-shell has done the trick for me the last couple of months very, very well.

@leny
Copy link

leny commented Sep 14, 2014

For the record, I've made a dedicated gruntplugin for parker. I will add soon the possibility to choose the metrics via the task's options.

@katiefenn
Copy link
Owner

@bartveneman: Thank you for for the tip. I'd still like to write (or contribute to) a dedicated plugin, I'm ticking off the features I want to release to get there.

@leny: Brilliant! You might be interested in a couple of features I'm working on in the develop branch. The warnings formatter will output warnings when metric results exceed a configured threshold, which is less verbose than outputting Parker each time the task is run. It'll hopefully be merged into master in the next month or so.

@leny
Copy link

leny commented Sep 15, 2014

Looks nice. I will add these features to the grunt plugin when they will be ready. :)

@bartveneman
Copy link
Author

Maybe nice to add a small update as I didn't really like to run parker with gulp-shell. By installing Parker to the project, I'm able to run it directly from a gulp task:

gulp.task("css:report:parker", function () {
    var Parker = require("parker"),
        metrics = require("parker/metrics/All.js"),
        parker = new Parker(metrics),
        fs = require("fs");

        fs.readFile("path/to/your-css-file.css", "utf8", function (err, data) {
            if (err) {
                return console.log(err);
            }
            console.log(parker.run(data));
        });
});

Perhaps this is useful for someone else.

@fnky
Copy link

fnky commented Feb 5, 2015

Been working on a gulp version of it. Took some ideas (and code) from @leny to keep things consistent. Still working out different formats, but check it out

@katiefenn
Copy link
Owner

@fnky Thank you!

@AdrianoCahete
Copy link

Grunt version (from @leny ) don't output as csv or jason. :(
This will be awesome if do (or if is from original creator: @katiefenn )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants