gruntjs

Using grunt-sass to compile node-sass, I get the error “Fatal error: The ”original“ argument must be of type function.”

a 夏天 提交于 2019-12-11 17:01:03
问题 Here is my sass declaration in my gruntfile. sass: { dist: { options: { implementation: 'node-sass', style: 'expanded', noCache: true }, files: { 'dist/css/jk.css' : 'src/styles/jk.scss' } } }, Here is the output when running grunt -v. Running "sass:dist" (sass) task Verifying property sass.dist exists in config...OK Files: src/styles/jk.scss -> dist/css/jk.css Options: precision=10, implementation="node-sass", style="expanded", noCache undefined Fatal error: The "original" argument must be

How to run a shell command from Grunt task function

試著忘記壹切 提交于 2019-12-11 16:06:12
问题 I'm trying to move some icons in my app directory based on a function i have inside my Gruntfile.js . Would it be possible to do something like this? I've tried the following (going into dev or staging folder and copying all files to the previous directory), but coudn't get it to work. Thanks in advance. grunt.registerTask('setAppIcon', 'Task that sets the app icon', function(environment) { if (environment.toLowerCase() == "development") { grunt.task.run(['exec:command:cd app/lib/extras/res

Grunt. Programmatically merge corresponding files in parallel folders with concat

只愿长相守 提交于 2019-12-11 14:56:11
问题 that's my first post on StackOverflow!:D I mean... ever! Anyway... I couldn't find any clear answer to this, and maybe I'm missing something really obvious. I'm really new to Grunt as well. I'm looking for a way to merge parallel css files in two different folders in few lines of code. So a better solution than doing this for each couple of files: concat : { options : { separator : '\n' }, css : { files:{ '<%= pkg.dest %>/app/css/main_blue.css' : [ 'app/css/base/main_blue.css', 'app/css

Configure grunt-contrib-sass in Yeoman

a 夏天 提交于 2019-12-11 14:52:51
问题 As I want to use Bourbon, I'm looking forward to remove compass grunt task and use plain sass task, however for some reason it doesn't seems to compile my scss files. I have the following directory structure: yeomanApp/ app/ styles/ css/ scss/ My Gruntfile.js looks something like this: ... grunt.initConfig({ ... sass: { dist: { files: [{ expand: true, cwd: '<%= yeoman.app %>/styles', src: ['scss/{,*/}*.scss'], dest: 'css', ext: '.css' }] } }, ... }); grunt.loadNpmTasks('grunt-contrib-sass');

How do I create a list of data based on actual twig files within project

*爱你&永不变心* 提交于 2019-12-11 14:17:41
问题 I am creating an app via NPM using https://www.npmjs.com/package/grunt-twig-render. It essentially is twig.js. I'm keeping it slim, so right now there isn't any other php or anything like that. Just npm / twig.js and other npm packages, including Grunt. Here's what I'm trying to do. Right now, I have a bunch of twig files within subfolders of a directory. What I'd like to do is generate a list of data of the .twig files in that subdirectory. Something like this may work well files: [ { "name"

SyntaxError: Use of reserved word 'import' running enzyme with karma

Deadly 提交于 2019-12-11 14:08:57
问题 Tried unit testing my React application with Enzyme v3, did not work. PFB the details: modules installed: "enzyme": "^3.1.1", "enzyme-adapter-react-15.4": "^1.0.5", Created a file enzyme.config.js : import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-15.4'; Enzyme.configure({ adapter: new Adapter() }); Included the above file in my karma runner conf: files: [ // test setup ........... 'test/unit/testutils/enzyme.config.js', .......... ] Got following error: 14 11 2017 16:21

Sapui5 app not uglified using grunt

拈花ヽ惹草 提交于 2019-12-11 14:07:14
问题 I'm trying to uglify ( mangle + remove comments ) a SapUI5 app by using grunt together with the grunt-sapui5-bestpractice-build plugin. According to this link, there should not be an uglify task by using this plugin so I've combine it together with the grunt-contrib-uglify plugin. The problem that I have is; when performing the application build, it seems that my uglify task is being ignored because the grunt-sapui5-bestpractice-build has an implicit uglify task that overwrites the one I'm

Import bootstrap in scss project + grunt + css compile load time

杀马特。学长 韩版系。学妹 提交于 2019-12-11 13:55:05
问题 I have setup SASS and Grunt. Every time I save my main.scss file, it will compile it to CSS. Perfect. Now, in the top of main.scss I import bootstrap: @import "bootstrap"; However, when I do this, each SCSS -> CSS compile takes around 8 seconds ! Is there a smarter way to import bootstrap? I specially import it, because I need to make use of extend , i.e.: .button { @extend .btn; } 回答1: You have 2 solutions and a bonus : don't compile bootstrap. Quick but you lose the @extend ".bootstrap

grunt-spritesmith configuration is not working correctly on gruntfile.js

孤人 提交于 2019-12-11 12:56:46
问题 In my gruntfile.js I've this setup for my plugin for generating sprites. I've to say that everything is well configured, spritesmith is installed via npm install, the plugin is a dependency in the package.json . but there's something else blocking the execution of my sprite command sprite:{ dist: { src: ['css/theme/images/*.jpg'], destImg: 'css/theme/sprite/sprite.jpg', destCSS: 'css/theme/sprite/spritejpg.css' } }, and this is my result but the verbosed message is not the best to understand