question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Any possibility to use arbitrary node (gulp) tasks, not just CLI?

See original GitHub issue

I’m falling in love with lint-staged and the whole idea. It was nice so far with stylelint and eslint. But i’m in need of running arbitrary checks on staged files. Like, checking BEM methodology in HTML, or dist files sizes. I wrote couple of tasks with gulp, they are checking all the files. But that is surely slow on big projects.

I tried this:

  scripts: {
  "lint": "gulp check"
  },
  "pre-commit": "lint",

But obviously the task did not receive list of staged files.

I’ve read all the issues, and saw there were some plans of integrating that into lint-staged (#8 ?). Or am i wrong? Or there are reasons it would not be implemented? (Or is there any help needed? I could possible do that.) Or is there any workaround to use lint-staged with gulp task for example (i suppose the problem is to give to that task the list of staged files to run on). Sorry for so many questions, but i hope you get my idea anyway.

And thank you again for a great tool! 😃

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
okonetcommented, Mar 13, 2017

@akella it’s actaully a great feedback and I might consider adding templates for commands earlier. Something I was planning to do either way at some time point.

1reaction
okonetcommented, Mar 9, 2017

Yes, sure! Go ahead and create a docs PR!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Run gulp with an arbitrary gulpfile name (not gulpfile.js)
My search attempts for arguments to the gulp , mostly brings up results on how to get the command line arguments into the...
Read more >
Getting Started with Gulp.js - Semaphore Tutorial
Learn how to set up and use Gulp.js, a task runner for Node.js based on ... Exported functions are directly callable from the...
Read more >
Gulp Wiki | Barbarian Meets Coding
gulp.task lets you define arbitrary tasks for gulp to perform. It consist of: a name for the task; dependencies that are executed in...
Read more >
How to Use npm as a Build Tool - Keith Cirkel
The advice still stands, and I believe developers should use npm as a build tool. Myself; I've been Gulp & Grunt free since...
Read more >
Gulp - Package Control
The Sublime Gulp plugin was made for those using the Gulp Streaming Build - Task Runner System within Node.js for their workflow. Sublime...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found