gruntjs,yeoman,bower,bower-install,grunt-contrib-concat , bower add Jquery UI theme in style

bower add Jquery UI theme in style


Tag: gruntjs,yeoman,bower,bower-install,grunt-contrib-concat

In my project I have included to jQuery UI.I am using Bower, Yeoman and Grunt.
I added jQuery UI: bower install jquery-ui --save .
but the jQuery UI theme was not included in Bower style components.

<!-- build:css(.) styles/vendor.css --> 
<!-- bower:css --> 
<link rel="stylesheet" href="bower_components/components-font-awesome/css/font-awesome.css" /> 
<!-- endbower --> 
<!-- endbuild --> 
<!-- build:css(.tmp) styles/main.css ->

Help me with this problem .


This is not issue with library . its in Grunt-wiredep which has problem in injecting dependencies which has file name like jquery-ui,socket-io,font-awesome. there is way to override it .

wiredep: {
            target: {
                src: '<%= jericho.client %>/index.html',
                ignorePath: '<%= jericho.client %>/',
                exclude: [/es5-shim.js/, /json3.js/ ,/bootstrap.css/, /font-awesome.css/ ],
                overrides: {
                    '': {
                        main: ''
                    'jqueryui-touch-punch': {
                        main: 'jquery.ui.touch-punch.js'

so add 'jquery-ui': { main: 'jquery-ui.js' } . in the grunt wiredep configuration.



Add locale moment to an AngularJS app

I'm trying to configure the locale language for an AngularJS app based on Yeoman. When I serve the dist package after building my app (grunt build), the script reference dissapears. Here's a list of my dependencies on the index.html file. <!-- build:js(.) scripts/vendor.js --> <!-- bower:js --> <script src="bower_components/jquery/dist/jquery.js"></script> <script...

Handlebars does not output anything

At the start of the file I define Handlebars etc.: <!-- build:js(.) scripts/vendor.js --> <!-- bower:js --> <script src="bower_components/jquery/dist/jquery.js"></script> <script src="bower_components/bootstrap/dist/js/bootstrap.js"></script> <script src="bower_components/handlebars/handlebars.js"></script> <!-- endbower --> <!-- endbuild --> At the end of the index.html-file I pull in my Handlebars-file: <!-- build:js({app,.tmp}) scripts/main.js --> <script...

Yeoman - Gruntfile.js generates source map at build but deletes it after any changes

I installed Yeoman with angular generator, and it created Gruntfile.js. The problem is that after launching the webserver in the terminal with: grunt serve Yeoman generates main.css with in the end the reference of the source map /*# */ But after changing any scss the watch routine regenerates it...

How do I access a user input from grunt-prompt in other tasks

I need to write a grunt job for reading a user input using grunt-prompt and then create a directory with that name. I am trying to use the config to access variable in another grunt task which will be executed after the grunt-prompt. But all following methods gives an undefined....

“Arguments to path.resolve must be strings” when calling 'gitbook build' from a Git hook

I am trying to run gitbook build within a post-receive Git hook on my (Gitlab, Debian 7, virtual private) server. Basically I want to: checkout the bare repository to a temporary dir run gitbook build in that temporary dir sync with the webspace through rsync The post-receive script runs something...

Customize Bootstrap on a Yeoman project

I've an Angular application scaffolded with Yeoman and using Twitter Bootstrap. On their website, Bootstrap prupose to customize the design of their components ( Then you download a zip containing Bootstrap files with your customization. On the downloaded zip there are : bootstrap/ fonts/ js/ css/ config.js I just modified...

How to use dynamic values in Grunt tasks called from inside a forEach?

We are trying to run grunt tasks using grunt.config.set for dynamically concatinated strings. These grunt.configs are set in a forEach loop and change each time before the task is run. This does unfortunately not work, as grunt only uses the last grunt.config.set and runs it multiple times with that very...

Changing JS variable with Grunt for different environments

I'm trying to configure my JS build to do next: I'm using a JS variable to define the application root: globals.js define(function (require) { "use strict"; return { mainRoot: "" //mainRoot: "http://localhost:3000" - local run //mainRoot: "" - test server }; }); During local development I'm using code without Grunt...

Asynchronous tasks in grunt.registerTask

I need to call two functions within grunt.registerTask, but the second function has to be called after the first function is done. So I was wondering if we can use callbacks or promises or other asynchronous mechanisms within grunt.registerTask. (More specifically, I need to launch karma in my first function...

When starting Nightwatch with Grunt, the website server is not started

I am using Nightwatch.js to run system tests for a website. I want to automate the tests by running them via grunt. My Gruntfile contains these lines: ... var nightwatch = require('nightwatch'); nightwatch.initGrunt(grunt); ... nightwatch: { options: { standalone: true, test_settings: { "default": { "launch_url": "http://localhost", "selenium_port": 4444, "selenium_host": "localhost",...

Images doesn't display on AngularJS website after uploading them with filezilla

I created an AngularJS project. With doing the grunt serve, grunt serve:dist commands in my terminal, my images are loaded. I upload my page to a webserver with filezilla, but on the public webpage my images are not found. I discovered that the images in my dist folder 2 extensions...

Does an existing gruntfile need to be edited? What is the common workflow?

For an existing app, is there a proper protocol for specifying bower packages such that they're handled correctly when running "grunt build"? Does an existing gruntfile need to be edited? What is the common workflow?

SailsJS: Requiring Assets, Such As,

As the problem is short & sweet, I'll keep the question so. CAN'T LOAD ASSETS. Using Sails.js (v0.11.n). Can't load assets... That's about it... I'm trying to load -- or now even just assets/alert.js. <script type="text/javascript" src="/js/dependencies/"></script> Doesn't work :( Even when I switch the src to /alert.js --...

How to define bourbon and neat in grunt js file / windows 8 user?

I'm trying to use this code and I get error for using "loadPath" duplicated. options: { style: "compressed", sourcemap : true, loadPath: require('node-bourbon').includePaths, loadPath: require('node-neat').includePaths }, ...

How to make grunt run some tasks at a special point in time?

I am using Grunt to run Jasmine tests and Nightwatch.js tests. Is it possible to make Grunt run the tests at a special point in time? For example Grunt could run the tests always when saving changed code. Or Grunt could run the tests always at 1 am in the...

JSLint error: “Expected a newline at EOF”, conflict with Beautify plugin

I have a problem while building the sources using Grunt, with JSLint task for error check: L177: Expected a newline at the end of the file. Warning: Formatting check failed. Use --force to continue. Aborted due to warnings. The problem is obvious, but I use also the Beautify plugin for...

Sailsjs with angularjs npm install error

i am using sails js backend and frontend angularjs. i have given npm install. npm install package show this error: npm ERR! peerinvalid The package grunt does not satisfy its siblings' peerDependencies requirements! npm ERR! peerinvalid Peer [email protected] wants [email protected]~0.4.0 npm ERR! peerinvalid Peer [email protected] wants [email protected]>=0.4.0 npm ERR! peerinvalid...

Using grunt for front end with php

Forgive me, I'm new to Grunt and I don't typically code PHP. This is a new project for me. I'm trying to use Grunt, because it's awesome, with some html files that have minimal php in them. I originally installed the regular grunt, not the php grunt. Now I realize...

Integrating a Single-Page Angular App Template into Sails.js

I'm currently trying to build an educational single-page web app which will use Angular for the front end and Sails.js for the backend. I am using an Angular app template which can be found here. I want to integrate it into a Sails.js project, and I even read through and...

Writing multiple functions in AMD javascript module

I am quite new to writing javascript code using AMD. I am stuck at figuring out how to write multiple functions in a file: define(function(){ return { and: function(a,b){ return (a&&b); } }; } ); I tried writing another function plus in the following way: define(function(){ return { plus: function(a,b){...

Grunt tasks running indefinitely

I have installed grunt and trying the grunt-react and grunt-contrib-imagemin tasks. I have setup the following Gruntfile.js. module.exports = function(grunt) { grunt.initConfig ({ imagemin: { dynamic: { files: [{ expand: true, cwd: 'public', src: ['development/images/*.{png,jpg,gif}'], dest: 'images' }], options: { cache: false } } }, react: { single_file_output: { files:...

How to output timestamp when node.js server is restarted via grunt-nodemon?

I have simple hello world nodejs express application and I just added grunt-nodemon that should watch changes on *.js files. Here is the console output I get when I run grunt and then change some .js file: Running "nodemon:dev" (nodemon) task [nodemon] v1.3.7 [nodemon] to restart at any time, enter...

grunt-http-server is stop running

I am trying to use the grunt-http-server I follow the example that is on the link 'http-server': { 'dev': { // the server root directory root: apps, // the server port // can also be written as a function, e.g. // port: function() { return 8282; } port: 8282,...

rethinkdb does not connect form grunt task

I created a grunt task to create tables in a rethinkDB database. the issue that i am facing is that the connection is never established and no tables are created however if i do the same while serving a regular API endpoint everything works as expected. below is an extract...

Electron default app doesn't change

I am trying to convert my Google Closure Library used web app to Electron. I've used grunt-electron to package the application but it seems it doesn't change the default app of the In there exist my application, but it doesn't load my app, but indeed loads default app....

How do I compile mutliple HTML Jade templates that use the same mixin

mixin hero(title) .hero .hero__inner h1.hero__title #{title} So, my project uses a Jade mixin like the above on multiple pages and, when I compile the Jade to HTML pages, I have to copy that mixin on each page that it is used. I can compile the pages using either grunt-jade or...

Is grunt.file.write(…) synchronous or asynchronous?

I have a code in which i am running a grunt task asynchronously using var done = this.async(); Somewhere in the code I am writing to a file and then calling a callback as follows: grunt.fie.write(<necessary arguments>); callback(null); My question is, will there be a case in which the callback...

Strange npm behavior when installing packages like grunt

I run the following command in my bash and I get the related results: [email protected]:~$ sudo npm install -g grunt-cli /usr/local/bin/grunt -> /usr/local/lib/node_modules/grunt-cli/bin/grunt [email protected] /usr/local/lib/node_modules/grunt-cli ├── [email protected] ├── [email protected] ([email protected]) └── [email protected] ([email protected], [email protected]) and [email protected]:~$ grunt /usr/bin/env: node: No such file or directory I also have try to install...

Message appears when running scsslint

I am following the step by step on I have installed everything, and seems to be working fine when I type in Terminal 'scss-lint'. However I want this to be running in Grunt Gruntfile: scsslint: { allFiles: [ 'src/scss/**/*.scss', ], options: { bundleExec: true, config: '.scss-lint.yml', reporterOutput: 'scss-lint-report.xml', colorizeOutput:...

Combine js files from different directories via config using grunt

I'm using grunt and sass and I'm looking for a sass-like feature to import any JS file I like to and combine them to 1 file via some config depending on the directory I am in. Example directories: startpage file1.js file2.js importjs.json page1 file3.js file4.js importjs.json global global1.js global2.js Each...

Is express similar to grunt? what is the difference? what are the advantages of express over grunt?

I've been working on node,grunt,bower and yeoman from couple of months. I came across MEAN stack applications, in which expressjs is providing the server environment(my understanding). Are both grunt and express similar? Requesting for some helpful link on express and MEAN stack. ...

Error 'uiGrid' must have exactly one root element. ui-grid/ui-grid when UI-Grid is initiated

While trying to add ui-grid to an angular project, I came across this issue. I’ve bootstrapped the angel;ar application with ui-grid dependency injected. var app = angular.module(‘myApp’,
 ]); The controller looks like this. angular.module('controllers').controller('UIGridCtrl',function UIGridCtrl($scope) {
 $scope.init = function(){
 $scope.myData = [
 {"firstName": "Cox",...

Yoeman task “autoprefixer:dist” gets stuck

I'm pretty new to grunt workflow. I have installed When i run grunt serve, its gets stuck at autoprefixer:dist task. When I commented out autoprefixer task the rest of the task go through and I get the app running. Not sure whats wrong. Please help me get rid of...

Grunt tasks stuck in endless loop

Working on putting together a base Gruntfile.js for some upcoming projects. Starting in on a new computer so everything has been a fresh build. Installed Node and NPM using Homebrew, and then installed Grunt globally, as well as in my local directory. Here is my package.json: { "name": "timespent-prototype", "version":...

grunt watch and sass is not compiling. It just notices change

I cannot figure out why my 'grunt watch' command will not compile. It is only finding that a change has been made but then it will not actually compile it into my sass. Here is my gruntfiles.js module.exports = function(grunt) { var devPath = 'dev/'; var distPath = 'dist/'; grunt.initConfig({...

grunt.file write/copy with permissions

Is there a way to specify the permissions of a file during a grunt.file.copy(...), except using the 'fs.chmod' after copy has finished? I will have to require the whole 'fs' module otherwise, just for changing the permissions. Will it be a lot of overhead?...

Yeoman angular dist version of app, does not restrict the direct folder access

I am facing this issue for my angular app. Dist version of app, does not restrict the direct folder access. so and /images and /styles folder are accessible. This issue is not coming in development i.e. grunt serve this is coming in grunt serve:dist. I have tried the deny...

How to run multiple application on Grunt

I have two applications say applicationA and applicationB and if I run following command on terminal grunt serve my one applicationA will up and work fine. when i need to run applicationB, first i need to stop applicationA and then i can run applicationB. If i try to run both...

How do I create a deploy git branch for my Yeoman project?

I created a new project using Yeoman. Using Grunt I've created the dist directory. My whole project is on Github,, and I've created a prod branch. My question is how do I get my prod branch to have only the contents of dist instead of having the dist directory...

What does slash dot refer to in a file path?

I'm trying to install a grunt template on my computer but I'm having issues. I realized that perhaps something different is happening because of the path given by the Grunt docs, which is %USERPROFILE%\.grunt-init\ What does that . mean before grunt-init? I've tried to do the whole import manually but...

Using npm to install grunt on nodeenv results in findup-sync error

After establishing a node virtualenv using nodeenv, I use source /bin/activate to switch into the correct directory, update npm, and execute npm install -g grunt or npm install -g grunt-cli and I recieve the same error: npm ERR! Linux 3.13.0-53-generic npm ERR! argv "node" "/home/{redacted-home-dir}/NodeProjects/vue/bin/npm" "install" "-g" "grunt-cli" npm ERR!...

Grunt : Usemin prepare, options for cssmin

I'm using usemin in my Grunt file. I'd like to use purifycss. BUT, i get this error when running grunt : Warning: Please check the validity of the CSS block starting from the line #1 Use --force to continue. I think it's because Font Awesome is the first library in...

$http.get returns actual php script instead of running it (yeoman, grunt)

I'm building a "simple" AngularJS app with an articles newsfeed. My articles are stored in a mysql database, and I extract them using php PDO. I used to do this using AJAX with a simple LAMP configuration (php5, mysql, apache2), and everything worked as intended. Now I'm trying to rebuild...

Is there a way with Grunt to automatically link css files to HTML

I am just wondering if there is a way to automatically link css files to HTML. For example just give the files (dependencies) path and it will be automatically stylesheet link to the specific HTML file. Thank you...

Compiling SASS files using Grunt creates an unnecessary folder

So I have been trying to create my first compiled css files using grunt and sass, and i am having a problem that I cant figure it out. Every time that I run the sass task, an unnecessary "sass" folder is created inside of my css folder: This is how...

yeoman and bower not adding bootstrap css (angular generator)

I'm completely new to using yeoman, bower and grunt (just started learning angular), so if you need any more info please let me know and I'll update the question. I am following along a codelab on the yeoman webpage, and so far I've managed to follow along (with a few...