gruntjs

How to implement Compass, Sass to a node.js project?

扶醉桌前 提交于 2020-01-16 18:37:11
问题 i have recently implemented the grunt task runner on my Node.js project and i'm using grunt-contrib-compass and grunt-contrib-watch in order to compile my sass and compass code through grunt whenever i make any changes. My grunt file is like this:- module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), compass: { dist: { options: { sassDir: 'public/sass', cssDir: 'public/css' } } }, watch: { css: { files: '**/*.scss', tasks: ['compass'] } } }); grunt

Grunt-Browserify extensions flag not working

十年热恋 提交于 2020-01-15 11:34:13
问题 I am trying to use Grunt-browserify and reactify to parse and bundle React components written in jsx. I want to use the extension flag so that I don't have have to specify the file extension name of my modules, but I have been unable to get this to work. Here is some test code: A Gruntfile: 'use strict'; module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), browserify: { dev: { src: 'src/app.jsx', dest: 'dest/app.js', options: { debug: true, transform

Grunt-Browserify extensions flag not working

大憨熊 提交于 2020-01-15 11:33:29
问题 I am trying to use Grunt-browserify and reactify to parse and bundle React components written in jsx. I want to use the extension flag so that I don't have have to specify the file extension name of my modules, but I have been unable to get this to work. Here is some test code: A Gruntfile: 'use strict'; module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), browserify: { dev: { src: 'src/app.jsx', dest: 'dest/app.js', options: { debug: true, transform

How do I run a node script through Grunt?

醉酒当歌 提交于 2020-01-15 11:18:20
问题 I am looking to run a node command through my gruntfile. I just need to run: node index.js as the first task before any other tasks. I tried searching around but haven't found the answer. I believe it might be something simple but I am not sure how. Do I need to load in nmp tasks? This is how my Gruntfile looks like: "use strict"; module.exports = function(grunt) { // Project configuration. grunt.initConfig({ jshint: { all: [ 'Gruntfile.js' ], options: { jshintrc: '.jshintrc', }, }, // Before

Ensuring IE-9 compatibility while end to end testing using phantomJS

寵の児 提交于 2020-01-15 03:10:47
问题 I am using PhantomJS (headless end to end testing),selenium webdriver,grunt(task runner) for my application testing. My requirement is that the application should be compatible with IE-9. I have to do headless testing because I'm using jenkins for continuous integration. How do i make sure that my application will run perfectly on IE-9 while testing on phantomJS ? 回答1: You can't use PhantomJS for testing compatibility with Internet Explorer, because it is a Webkit browser. Since you're using

angularjs app web.js structure to deploy on heroku

为君一笑 提交于 2020-01-15 01:39:38
问题 I have been struggling with this deployment for weeks now, but no success. For my app to run locally, I run grunt serve and also node backend/app.js , however, I am trying to follow the way it was deployed here as an example. I also tried to follow the instructions here because my app was generated by yeoman. - How is it possible to run node web.js instead of node backend/app.js as you can see here that the app is linked to the web.js file. how to modify the and correct my web.js file? or any

Getting Error message “No ”concat“ targets found” when running grunt-usemin

自作多情 提交于 2020-01-14 14:39:21
问题 My grunt file is shown below: module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), uglify: { options: { banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n' }, build: { src: 'src/**/*.js', dest: 'dist/<%= pkg.name %>.min.js' } }, watch: { js: { files: ['src/**/*.js'], options: { livereload: '<%= connect.options.livereload %>' } }, livereload: { options: { livereload: '<%= connect.options.livereload %>

Wait async grunt task to finish

北慕城南 提交于 2020-01-14 10:29:05
问题 I received a grunt setup and one of the new tasks should execute (grunt.task.run) already existing task. The task to execute is asynchronous, and the new task should wait until the async task has finished. What is the preferred way to do this? 回答1: grunt already got this covered, you should declare your task as an async one, and use the done() func in your task to tell grunt that it is done, look at this repo and this article, that have been very helpfull to me when I first had to deal with

grunt serve: concurrent:server aborts due to warnings

青春壹個敷衍的年華 提交于 2020-01-14 07:34:39
问题 suddenly my projects stops working with grunt. Unfortunately, I haven't committed my changes for a while into git, so I can't tell whats different. When I run grunt server --verbose , I get the following output (everything above ... passes with an OK ): ... Running "wiredep" task Running "wiredep:app" (wiredep) task Verifying property wiredep.app exists in config...OK Files: app/index.html Verifying property wiredep.app.src exists in config...OK Running "wiredep:sass" (wiredep) task Verifying

Run Grunt tasks recursively over array

一个人想着一个人 提交于 2020-01-14 04:33:11
问题 I have to build a number of css files for different locations and browsers all delineated by a flag in the file name. For instance: styles-en.css styles-jp.css styles-ie.css The content differences are handled by LESS boolean variables @isIE, @isEN, @isJA, @isDE etc. that match the file naming pattern. I would love to automate building these different versions by passing Grunt an array of flags then for each: set the variable for LESS run LESS compiler for all files in a folder (same for all