gruntjs

How do I automate the task of compiling front-end frameworks like Twitter Bootstrap in my Node.js project?

℡╲_俬逩灬. 提交于 2019-12-22 04:49:06
问题 How do I automate the task of compiling Twitter Bootstrap in my Node.js project? I'm editing the LESS files that compile into a custom build of Bootstrap for my Node.js project, so I can't just use the online customizer or the pre-compiled JavaScript/CSS distribution. How do I use something like Grunt or Bower to automate the process of building and compiling the Twitter Bootstrap front-end framework into my project from source? Is there a package manager for front-end libraries and

Disable typescript compilation in Visual Studio 2013

淺唱寂寞╮ 提交于 2019-12-22 04:09:44
问题 I am running grunt and have set up a typescript build process that listens for file changes, therefore I don't need the default VS compilation of my typescript files when I save or build my project. I have unchecked the 'Compile on save' option under typescript in my project properties, but the ts files are still being compiled. The only way this works for me is if I set the build action of individual TS files to 'None', but this is still causing some Typescript files to be compiled. Is there

Getting grunt karma to run one unit test

谁都会走 提交于 2019-12-22 03:24:49
问题 I was wondering if anyone has got grunt karma to run just one spec that is changed on watch. This is my config below. The problem is that the line grunt.config('karma.unit.options.files', filepath); doesn't seem to be doing anything as all the specs still get run however foo does get output before the karma:unit:run gets fired. grunt.initConfig({ karma: { unit: { configFile: 'karma.conf.js', background: true, singleRun: false, options: { files: allFilesArray } } }, watch: { options: { spawn:

How to have a the docpad grunt skeleton min vendor js files with live reload

…衆ロ難τιáo~ 提交于 2019-12-21 22:21:36
问题 I'm using skeleton #2, HTML5BP + Grunt. The first time I docpad run the following happens: info: LiveReload listening to new socket on channel /docpad-livereload Performing writeFiles (postparing) at 0/1 0% [...] Running "min:js" (min) task File "../out/scripts/all.min.js" created. Uncompressed size: 298495 bytes. Compressed size: 38257 bytes gzipped (106756 bytes minified). Which is as is supposed to be. However using the livereload plugin if I change a template or document file, I get: -

Grunt - how to watch and synchronize files' deletion

半城伤御伤魂 提交于 2019-12-21 20:55:25
问题 I am a new user of Grunt. Currently I have a folder static_src/img that contains image source files (.psd) and image files (.png, .jpg, etc.). This folder is not public. Instead, I want to sync the change of only image files to another public folder static/img . The problem is - it works well when I add/change a image file in static_src/img , but I don't know how to sync the change when I delete a file. Grunt-contrib-watch can detect the deletion in static_src/img , but I don't know how to

Yeoman, How to reference a bower package (font-awesome)?

廉价感情. 提交于 2019-12-21 19:47:36
问题 I'm totally new to Yeoman and I'm facing an issue with it after setting up my project I decided that I want to use font-awesome so I installed it using bower and it works fine the issue is that font-awesome is not in the dist/bower_components folder but when I reference the css file of font-awesome in the html page like this <link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.css"> it works in the localhost but still no files in dist/bower_components except for

How to organize sass files, so compass includes them in the right order

给你一囗甜甜゛ 提交于 2019-12-21 19:45:54
问题 I'm building a single page app using the most recent yeoman build 1.0.0beta3 and compass 0.12.2 When starting compass:server I get lots of errors, but during dev time all seems to be ok in my browser. grunt build then does not fail, but builds improper CSS output, so that the layout in the browser is borken. Maybe that's all my fault, caused by a misunderstanding. What I have is a main.sass file with all my includes: // compass @import 'compass' @import 'compass/reset' @import 'compass/css3'

Integrate Grunt into Rails asset pipeline [closed]

空扰寡人 提交于 2019-12-21 12:31:32
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . I would like to exchange / enhance the asset Pipeline with some Grunt tasks. Is there a Way i can integrate grunt into my build process? 回答1: You might want to check out the gem half-pipe And here is a video explaining it 来源: https://stackoverflow.com/questions/20025091/integrate

grunt serve from a fresh Yeoman install returns - Warning: Task “serve” not found

[亡魂溺海] 提交于 2019-12-21 11:34:11
问题 After running yo angular and then cd 'ing into the application's root folder (at same level as the app folder, gruntfile , package.json etc) I try grunt serve and I get the above error. Grunt won't start a server for me. I have searched all over but couldn't find say to run npm install and bower install within the application's root directory, which I have tried but still the same error. I've updated and checked bower/grunt/npm and they're all good. Any suggestions please? 回答1: I think I have

Pass params to an grunt task from an alias task

半腔热情 提交于 2019-12-21 08:07:11
问题 Is there a way to pass an argument from a alias task like this into on of the calling tasks: grunt.registerTask('taskA', ['taskB', 'taskC']) grunt taskA:test so that task taskB and taskC will be called with the parameter test ? 回答1: You can create a dynamic alias task like this: grunt.registerTask('taskA', function(target) { var tasks = ['taskB', 'taskC']; if (target == null) { grunt.warn('taskA target must be specified, like taskA:001.'); } grunt.task.run.apply(grunt.task, tasks.map(function