watch

grunt watch task block the command line

五迷三道 提交于 2019-12-20 18:31:03
问题 I'm new to grunt, still learning, so I came up to a very strange problem. When I run "watch" task, my command line becomes blocked, so basically I cant do anything on it. Bare in mind that the task is completed with success. This is my command line output: C:\server\css-test>grunt w Running "watch" task Waiting...OK >> File "compass-examples-master\02\sass\screen.scss" changed. Running "compass" (compass) task unchanged compass-examples-master/02/sass/ie.scss unchanged compass-examples-master

How to run fswatch to call a program with static arguments?

醉酒当歌 提交于 2019-12-20 10:34:32
问题 I used to use fswatch v0.0.2 like so (in this instance to run django test suit when a file changed) $>fswatch . 'python manage.py test' this works fine. I wanted to exclude some files that were causing the test to run more than once per save (Sublime text was saving a .tmp file, and I suspect .pyc files were also causing this) So I upgraded fswatch to enable the -e mode. However the way fswatch has changed which is causing me troubles - it now accepts a pipe argument like so: $>fswatch . |

Nodemon-like task in Grunt : execute node process and watch

[亡魂溺海] 提交于 2019-12-20 10:33:49
问题 I feel like I'm missing something. Here is what I want to achieve : Having a grunt task that executes my server.js and runs watch task in parallel. It feels to me that this is precisely one of the tasks grunt was designed for but I can't achieve this configuration. Among others, I have read this : Running Node app through Grunt but I still can't make it. Here is my Gruntfile.js : module.exports = function(grunt) { // Project configuration. grunt.initConfig({ watch: { scripts: { files: ['*.js'

$watch not working on variable from other controller?

余生颓废 提交于 2019-12-19 10:16:56
问题 I have one controller which displays a checklist, and stores the selection in an array. My other controller runs an $http.get on the array from the first controller. How do I set a $watch so that whenever the array changes, a new HTTP GET request is sent? My attempt: http://plnkr.co/edit/EaCbnKrBQdEe4Nhppdfa // See plnkr for other controller + FooSelection factory + view function SimpleQueryResCtrl($scope, $http, FooSelection) { $scope.foo_list_selection = FooSelection; $scope.$watch('foo

How do I watch all keys in a data object in Vue 2

≯℡__Kan透↙ 提交于 2019-12-19 05:14:05
问题 My data object: data: { selected: { 'type': null, 'instrument': null }, My template: <select v-model="selected['instrument']" @change="switchFilter('instrument', $event)"> <option v-for="instrument in instruments" :value="instrument.value">@{{ instrument.text }}</option> </select> <select v-model="selected['type']" @change="switchFilter('type', $event)"> <option v-for="type in types" :value="type.value">@{{ type.text }}</option> </select> How can I watch both selected indexes at the same time

Grunt - Watch a file and SFTP when it's changed

假如想象 提交于 2019-12-19 02:34:31
问题 I'm trying to automatically upload a .css file, when it's compiled from Sass. This is what I've got in my Gruntfile.js : module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), watch: { coffee: { files: ['**/*.coffee'], tasks: ['coffee'] }, scripts: { files: ['**/*.scss'], tasks: ['compass'] }, sftp: { files: ['**/*.css'], tasks: ['sftp-deploy'] } }, coffee: { compile: { files: { 'testing.js': 'testing.coffee' } } }, compass: {

Nodemon Doesn't Restart in Windows Docker Environment

旧街凉风 提交于 2019-12-18 11:45:03
问题 My goal is to set up a Docker container that automatically restarts a NodeJS server when file changes are detected from the host machine. I have chosen nodemon to watch the files for changes. On Linux and Mac environments, nodemon and docker are working flawlessly. However, when I am in a Windows environment , nodemon doesn't restart the server. The files are updated on the host machine, and are linked using the volumes parameter in my docker-compose.yml file. I can see the files have changed

Detecting change in a Javascript Object

夙愿已清 提交于 2019-12-17 19:38:03
问题 I found this gist to detect changes on specified fiels of a object : https://gist.github.com/3138469 But it bind an event only on one field. Someone know a function or a tricks to detect change on an entire Javascript Object ? 回答1: 2019 Update: These days this can be achieved using Proxy API in a much more efficient manner. The on-change library uses the Proxy API behind the scene to make this even easier. 2012 Update: I've just noticed that the author of Watch.js is referencing a library

AngularJs $watch on $location.search doesn't work when reloadOnSearch is false

我们两清 提交于 2019-12-17 17:45:15
问题 My routeProvider for route has reloadOnSearch set to false : $routeProvider .when( "/film/list", { templateUrl: '/film/list.html', controller: FilmListController, reloadOnSearch: false } .... ) I did this because I don't want the whole controller to be reloaded after query string changes, but I still use it and the url looks like this: film/list?sort=isbn&order=asc&offset=0 . Now whenever query string changes I want to call a function from my controller. So I tried to set up a $watch in the

how to watch changes in whole directory/folder containing many sass files

人走茶凉 提交于 2019-12-17 10:16:31
问题 How could I trace changes in whole directory containing many sass files ? I'm using the following command to watch changes in sass file: sass --watch style.scss:style.css But how to watch changes in whole directory/folder containing many sass files. 回答1: Simply use the command sass --watch <input folder>:<output folder> , like this: $ ls -l css/ sass/ $ sass --watch sass:css Where <input folder> contains the Sass files and <output folder> that hosts the generated CSS files. 回答2: Expanding the