gruntjs

Grunt jade compiler filling out empty attributes

纵然是瞬间 提交于 2019-12-07 20:16:01
问题 I'm using the grunt-contrib-jade module to compile my Jade templates, if I leave my attribute blank like the following line: article(ui-view) It will compile to: <article ui-view="ui-view"></article> And that will break my AngularJS ui-router, as it will not handle the "ui-view" directive as if it is a named view (not what I want). Of course it's an option to write my jade file like this: article(ui-view='') But that's not what I want, is there some way to stop the jade compiler from filling

Puppet installing packages, but these do not seem to work

旧时模样 提交于 2019-12-07 19:29:21
问题 I have the following puppet file. It seems to have installed everything without errors, but commands such as yo or bower dont seem to work. Any idea why? class yeoman { Exec { path => [ "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/" ] } $yeomanPackages = ["git", "rubygems", "libjpeg-turbo-progs", "optipng", "phantomjs", "python-software-properties" ] package { $yeomanPackages: ensure => "installed", require => Exec['apt-get update'], } exec { "apt-get update": command => "/usr/bin/apt-get

Grunt: jit-grunt: Plugin for the “protractor” task not found

一曲冷凌霜 提交于 2019-12-07 19:05:32
问题 I am new to yeoman/grunt/bower and I am working on setting up a angularjs project with: yo angular I made some changes to gruntfile myself and recently I found protractor very useful and I wanted to add that to my project. I followed a lot of instructions online (like this one Integrating Protractor with Yeoman via Grunt 2 years ago) but I still cannot get protractor properly installed. Here is my Gruntfile.js : (only showed relevant parts) 'use strict'; module.exports = function (grunt) { //

Git: Storing but not pulling LESS files

╄→гoц情女王★ 提交于 2019-12-07 18:14:19
问题 I recently started working with LESS, and as I did some research to automated builders like Jenkins and Grunt, it seemed a common piece of advice was not to store LESS files on the repo, or not to have them on the live server, just the compiled CSS. So I was hoping to get some advice on this. It seems that as LESS files are part of the project, storing them is necessary. But it makes sense not to have extra, random files on the live server. Deleting them myself seems the wrong way to do it

Why can't different servers bind to the same port?

泄露秘密 提交于 2019-12-07 17:29:29
I am confused about ports. I find it odd that we need to bind different servers to different ports. Example: Apache binded on 8080, Express.js can't bind on 8080 How does server port binding differ from application port listening? Example: Different browsers, ie, chrome, firefox, can listening and communicated on port 80? This issue came up when trying to run "grunt test:unit". There was a tomcat server that was already bound to 8080, but the server grunt starts, middleware I believe, is able to startup, but it is not able to to capture the browser. Stopping the tomcat server made things work.

How to get grunt-watch to live reload HTML changes under different build tasks

北战南征 提交于 2019-12-07 16:40:47
问题 I can easily set up my Grunt file to live reload HTML and SCSS changes by doing something like: watch: { options: { livereload: true, }, css: { files: ['scss/*.scss'], tasks: ['compass'] }, html: { files: ['index.html'], tasks: ['build'] } } However, I have a build task for dev environment: dev , and a build task for production environment: build . Therefore, calling build when the HTML is changed will build the site for production which is not what I want if I only want the dev version.

grunt-contrib-watch causing Maximum call stack size exceeded

不羁岁月 提交于 2019-12-07 15:39:39
问题 When I execute the clean task (grunt clean), everything works as expected but when I run the watch task (grunt test), I get the following error: util.js:35 var str = String(f).replace(formatRegExp, function(x) { ^ RangeError: Maximum call stack size exceeded Here's my gruntfile module.exports = (grunt) -> grunt.initConfig pkg: grunt.file.readJSON('package.json') clean: ['tmpDir/'] watch: options: spawn: false src: tasks: ['clean'] files: [ src: 'client/assets/strings/en/str.coffee' ] #

Grunt.js: Fire livereload as soon a files are modified, before task completes

ⅰ亾dé卋堺 提交于 2019-12-07 13:44:52
问题 I'm using Grunt to compile my CSS with compass and trigger the browser livereload. These are my watch tasks: watch: { styles: { options: { spawn: false, }, files: [assetsDir + '/**/*.scss', '!**/*.{dev,min}.scss'], tasks: [ 'concat:styles', 'compass:styles', 'imagemin:styles', 'cssmin:styles', 'clean:styles', ], }, scripts: { options: { spawn: false, }, files: [assetsDir + '/**/*.js', '!**/*.{dev,min}.js'], tasks: [ 'concat:scripts', 'uglify:scripts', ], }, livereload: { options: { livereload

How can I generate multiple pages from a JSON file with Assemble

房东的猫 提交于 2019-12-07 12:00:48
问题 So I'm building a framework for reproduceable articles. Each article will be composed of a combination of 'sections' which basically constitute an html block and some associated content. For example a given article may be composed as follows: author section text section image section text section blockquote section carousel section text section I'm imagining there's a partial template for each section, and as mentioned the sections will have associated data, so for a text section it might

Minifying scripts using GruntJs

懵懂的女人 提交于 2019-12-07 11:58:50
问题 I have a couple js files that I can seem to get GruntJs to concat/minify properly. If I do each individually they work fine. If I combine separately then attempt to minify just the combined file it doesn't work either. Here is the error: Any ideas on how to fix this? Or maybe what is causing it? 回答1: There is currently a problem with GruntJs and the BOM I mentioned in the comment of Derick's answer. You can find the issue here: https://github.com/cowboy/grunt/issues/218#issuecomment-6329807