문제

I want to use Stylus (http://learnboost.github.io/stylus/) preprocessor in my express.js application.

What is the best practice for using it (or simply share your experience) -

  • build stylus files with grunt.js or smth similar tool before starting application?

  • or using it as middleware app.use(stylus.middleware...) - the main thing here is - how that deals with apps performance (because as I see this middleware runs on every request while writing css files)?

Thanks!

도움이 되었습니까?

해결책

How about using middleware the first time and write the result to file, which as the cache, would serve the next request. Just like "coffee-middleware" and "less-middleware".

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top