grunt-contrib-less

Grunt compile all .less to .css in each directory

馋奶兔 提交于 2020-01-04 14:16:40
问题 So I have setup my site to use modules, in which each module has it's own .less file which needs to be compiled into .css. Folder Structure: /common/modules/{module-name}/style.less I need all the style.less files to be converted into style.css files in the same directory. For example: /common/modules/clock/style.less would need to be compiled to /common/modules/clock/style.css I don't want to have to add each of the modules individually to my grunt file, is there a way to do this dynamically

Grunt-contrib-less fails with Angular-Material @media queries

走远了吗. 提交于 2019-12-12 05:24:59
问题 I'm experiencing a strange error with angular-material & grunt-contrib-less. Every time i'm trying to run a simply grunt less task it fails with the following error message >> ParseError: media definitions require block statements after any features in lib/angular-material/angular-material.css on line 654, column 14: >> 653 >> 654 @media screen\0 { >> 655 .flex { Warning: Error compiling less/libs.less I'm using the latest stable release of angular material (v.1.0.1). It's required in less

grunt-contrib-less: compilation on watch task removes sourcemap link

醉酒当歌 提交于 2019-12-12 01:39:53
问题 Here's my less task config: less: { development: { options: { compress: false, sourceMap: true, yuicompress: true, sourceMapFilename: 'export/style/app.css.map', sourceMapURL: '/style/app.css.map' }, files: { "export/style/app.css": "less/app.less" } } }, If I just type grunt less , in my compiled file i get the /*# sourceMappingURL=/style/app.css.map */ comment correctly. Instead, when i run grunt and my watch task kicks in, the /*# sourceMappingURL=/style/app.css.map */ comment is removed

Does grunt-contrib-less support --source-map-map-inline?

风流意气都作罢 提交于 2019-12-02 16:46:54
问题 Title says it all. Is this Less option: http://lesscss.org/usage/#command-line-usage-source-map-map-inline Available via grunt-contrib-less, or some other plugin? I'm not hopeful since it does not seem be mentioned anywhere in the grunt-contrib-less docs. To be clear, I don't want grunt to output a separate map file, I'd like the mapping information to appear inline, in the primary output CSS file. 回答1: It sure does, here's a stripped down config of what I use: less: { options: { sourceMap

Does grunt-contrib-less support --source-map-map-inline?

笑着哭i 提交于 2019-12-02 09:16:52
Title says it all. Is this Less option: http://lesscss.org/usage/#command-line-usage-source-map-map-inline Available via grunt-contrib-less, or some other plugin? I'm not hopeful since it does not seem be mentioned anywhere in the grunt-contrib-less docs. To be clear, I don't want grunt to output a separate map file, I'd like the mapping information to appear inline, in the primary output CSS file. It sure does, here's a stripped down config of what I use: less: { options: { sourceMap:true, outputSourceFiles: true }, lessFiles: { src: [ '*.less' ], ext: '.css', cleancss:true } }, 来源: https:/