gruntjs

Grunt recursive copy

岁酱吖の 提交于 2019-12-23 07:34:52
问题 I'm setting up a Grunt script that needs to copy and reorganise directories of images from A to B. Simple enough. Directory structure: components componentA js img imgfolderA imgfolderB css componentB js img imgfolderA Each img directory could contain other directories and directories within those directories to help organise the images. I want to use Grunt to take all those images and put them under one directory (assets/img): assets img dirA imgfolderA imgfolderB dirB imgfolderA Any ideas

Grunt recursive copy

跟風遠走 提交于 2019-12-23 07:34:06
问题 I'm setting up a Grunt script that needs to copy and reorganise directories of images from A to B. Simple enough. Directory structure: components componentA js img imgfolderA imgfolderB css componentB js img imgfolderA Each img directory could contain other directories and directories within those directories to help organise the images. I want to use Grunt to take all those images and put them under one directory (assets/img): assets img dirA imgfolderA imgfolderB dirB imgfolderA Any ideas

grunt-contrib-less cannot find source files even though path is correct

﹥>﹥吖頭↗ 提交于 2019-12-23 06:54:19
问题 I'm trying to get grunt-contrib-less to compile a less file for me. I have the following gruntfile: less: { files: { "httpdocs/static/assets/css/result.css": "httpdocs/static/assets/css/dashboard.less" } }, The paths are definitely correct, I've triple checked that those files exist, yet, when I run grunt I get the following message: Running "less:files" (less) task >> Destination not written because no source files were provided. What am I missing from my gruntfile to make it properly

grunt-contrib-less cannot find source files even though path is correct

随声附和 提交于 2019-12-23 06:54:03
问题 I'm trying to get grunt-contrib-less to compile a less file for me. I have the following gruntfile: less: { files: { "httpdocs/static/assets/css/result.css": "httpdocs/static/assets/css/dashboard.less" } }, The paths are definitely correct, I've triple checked that those files exist, yet, when I run grunt I get the following message: Running "less:files" (less) task >> Destination not written because no source files were provided. What am I missing from my gruntfile to make it properly

Compass plugins to work with GRUNT

有些话、适合烂在心里 提交于 2019-12-23 06:12:54
问题 Using terminal to compile my sass/compass works perfectly, Ive used it for a few projects now and have started using compass plugins within these projects. However I also need to start automating my projects using GRUNT but I havent been able to get compass plugins to work with the GRUNT sass plugin "grunt-contrib-sass".. I dont have to use this plugin its just the first I found - does anyone know how to get this to work or suggest another plugin? All help is very much appreciated.. • I want

Using GruntJS to filter which files get deployed

早过忘川 提交于 2019-12-23 05:41:51
问题 Currently the static resources we use are part of a web project in Visual Studio. There are certain files in the project that we want locally that we don't want being deployed to production. We manage this by using the .csproj file and seeing if a file is mark as "content" or "none" etc. (If it's marked as "none" it doesn't get pulled on the deploy). This works great however we are moving our development out of Visual Studio and into a more Javascript friendly IDE. However if we add or delete

Using GruntJS to filter which files get deployed

二次信任 提交于 2019-12-23 05:41:28
问题 Currently the static resources we use are part of a web project in Visual Studio. There are certain files in the project that we want locally that we don't want being deployed to production. We manage this by using the .csproj file and seeing if a file is mark as "content" or "none" etc. (If it's marked as "none" it doesn't get pulled on the deploy). This works great however we are moving our development out of Visual Studio and into a more Javascript friendly IDE. However if we add or delete

Running Grunt and Node as batch files through cron

给你一囗甜甜゛ 提交于 2019-12-23 04:59:08
问题 The last thing I'd expect to have trouble with. I have a grunt file that needs to run every minute. It runs JSHint, captures the output, and emails it through Amazon SES. It works fine when run on the command line. However, it simply fails silently when run through cron. Nothing happens. I broke the email send out into a seperate node file. It will not run by itself. I took out all the reading of files from this second file, and tried to run it all by itself, just sending an email with the

Use clean-css compatibility options in grunt-contrib-cssmin

流过昼夜 提交于 2019-12-23 04:27:03
问题 I ran into an issue with clean-css in IE10. I'm needing to turn off the spaces after closing braces optimization. I'm using the grunt-contrib-cssmin plugin to automate all these optimizations, but I don't see a way to access the compatibility flags from within this plugin. Has anyone been able to target the compatibility settings of clean-css from the grunt-contrib-cssmin plugin? 回答1: Ran into this same issue yesterday, and found the solution here: https://github.com/gruntjs/grunt-contrib

Grunt Shell output to other task

谁都会走 提交于 2019-12-23 03:33:14
问题 I am using grunt-shell and was wondering if I could take my config for shell and add to another task I have? Here is what I have: shell: { gitlog: { command: 'git log -1 --pretty=format:%h', options: { stdout: true } } } And then for my task: grunt.registerTask('build-version', 'Set the information about the version', function() { grunt.file.write('version.json', JSON.stringify({ version: pkg['version'], metaRevision: shell.gitlog, date: grunt.template.today() })); }); Thank you for any help