Coffeescript 1.1.3 Watch only works once - node.js

I have nodejs v0.6.3 and coffeescript 1.1.3. on Archlinux.
I know they changed the way watch works in the latest release of coffeescript and that watch requires at least node v0.6.2.
In my case it only works once. After that when I save a file again, coffee does not take notice.
What could be the problem here?

There are a number of problems with fs.watch, which I've been actively discussing on both the Node and CoffeeScript issue trackers. One problem—likely the one you're encountering—is that some programs save changes not by writing directly to the existing file, but rather by writing to a temporary file and then mv-ing that file on top of the existing one. From fs.watch's perspective, this means that the watched file has been deleted, and changes to the new file will be ignored.
On the current CoffeeScript master, we try to work around this by re-watching the file each time a rename event is emitted. So please install that and let me know whether it solves your problem. If it doesn't, you should revert to using the older fs.watchFile API, either by downgrading to CoffeeScript 1.1.2 or by using a third-party tool like my own Jitter.

Related

How to switch from LESS to SCSS in Meteor / Iron in an existing project

I made a small project in Meteor / Iron. There's almost no styling in it yet but a lot of JavaScript already coded. I would like to update the system to handle SCSS instead of LESS since it seems more adapted for this specific project.
I can't find anywhere how to do such thing, do you have any idea ? Do I have to do everything manually ?
According to the docs:
$ iron create myApp --css=scss
You could then dump everything but your .scss files into the new project.
Or you can manually swap out packages as mentioned above:
meteor remove less
meteor add fourseven:scss
As far as converting your LESS into SASS, this may help, but I dont think its going to be as automatic as you want.

Is it possible to get "paths" functionality with tsify similar to what vanilla browserify has?

In vanilla browserify you can specify "paths" option to set directories where browserify looks for "required" files.
browserify({paths: ["./source/App"]})
When using tsify to compile TypeScript, this option seems to be ignored. The reason for using paths in the first place, is to avoid having every require statement start with "../../../etc".
I know an alternative option is to place the code in node_modules, but firstly that does seem pretty odd (you wouldn't normally keep you application code with your dependencies) but it also requires you to commit node_modules to your repositories and make sure no one ever clears that directory to reinstall dependencies.
The other alternative; symlinks don't work on windows, and also seems like quite a "hacky" solution.
I am quite new to browserify (coming from RequireJS), so it is possible that I overlooked something. But at this point I really would appreciate some input. If it makes any difference I am also using gulp.
Well, given that Path mappings based module resolution feature is proposed for TypeScript 1.8 and tsify is a thin wrapper of the TypeScript compiler, I can't imagine a way how it can work nowadays.
I expect that TypeScript 1.8 will be ready in a few months.

When using cx_freeze, what files have to be updated to update the application?

I want to implement an autoupdater in my Python application. This is no problem with the source version; Python doesn't care at all that the script it's running is trying to overwrite itself.
Windows, however, does care if an EXE tries to overwrite itself. My question is, does my EXE even have to overwrite itself? Or is the EXE just an interpreter, and I only have to overwrite library.zip?
If it does, is there any alternative to starting an updater application and shutting down the main EXE?
The cx_Freeze exe is compiled along with cx_Freeze, so in most cases you can safely leave it alone and just update library.zip. However, you should make sure that you prepare your updates using the same version of cx_Freeze that you froze the application with originally, in case it expects specific things about the files around it.
Also, the exe gets stamped with a version number relating to your application (you can see it in the file properties). If you don't replace it, that version number won't change.
If you do need to replace the exe, I believe the trick is to copy it to a temporary folder and re-run from there, so that it can replace the original. You can also look into update frameworks like Esky, which aim to handle these kinds of details for you. I haven't used that, so I don't know how well it works.

Files not being overwritten even with REINSTALLMODE=amus

I'm pretty new to InstallShield - so bear with me.
I have created a Basic MSI installer that correctly installs our application and, until recently, every time I rebuilt it (with some new files for a new build of our application), it would replace the files with no issues.
However, I rebuilt it this morning with a new version, it flat out refuses to replace any files.
For example, out main exe now has a file version of 8.0.0.15, the one it is replacing is 8.0.0.13; the new modified and created date is 7/11/2013, the one it is replacing is 6/26/2013 for both - it still wont replace the old file with the new one (this is just 1 file in hundreds, but is the main exe and so it definitely gets changed with each release).
I have changed the properties of our own exe's and dll's to 'Always Overwrite' under 'Files and Folders' to no avail (I haven't touched the 3rd party dll's since they never changed).
I have changed the ResintallModeText to 'asum' to no avail - should I try 'asumv'?.
Before I have the application completely uninstall itself prior to reinstall, is there anything else I should be looking at to try and determine what may be preventing the installshield from replacing the files on the target machine?
I have no idea what could have changed to cause it to stop upgrading - we haven't had to make any changed to the installshield for some months since everything was running fine.
If you need logs or anything, let me know (though I can't get it to write out the installshield verbose log on install - but I can provide the Windows installer logs).
Thanks for your help!
Thanks to the comment from #anand which solved my problem as well. In my case, the executable was not updating even when I updated the product version (i.e. 1.0.001 to 1.0.002) and changing the package code for a new build.
The solution for me was to right-click on the executable in Files and Folders (in InstallShield) and select Properties. After checking "Always Overwrite" my executable now gets updated regardless of the product version or package code.

how to create a debian package which updates only required files while updating the package

After few weeks of struggle i am able to create a medium native package debian package which works well in installation and removing of the package.
As http://www.quietsche-entchen.de/cgi-bin/wiki.cgi/-wiki/CreatingDebianPackages
Debian wiki
http://wiki.debian.org/HowToPackageForDebian http://www.debian.org/doc/manuals/maint-guide/ these are the quite good material for beginners,
I have basic problem, in updating the package all the files data.tar.gz are updated by default.
I want only few files to get updated in the data.tar.gz based on a key variable stored in all the files.
After the unpacking that is executing preinst script, all the files in data.tar.gz are already updated..
my idea was to take back up of the files intially before upgrading the package, and check key variable in files.. if the key variable is greater than the current variable replace it..
which means i am writing a simple backup script.. and executing in the postinst file..
i donot think this is good idea.. and more over limitations in dash script make it a very tough job..
What are you trying to accomplish here? During the reinstallation (or upgrading) of a Debian package, replacement of all of the non-conffiles with the latest version is exactly what's supposed to happen. If the file hasn't changed since the last installed version of the package then there's no harm in updating it anyway, and if is has changed, it's supposed to be updated.
If you have specific files which might be modified by the user and should be preserved across upgrades, make then conf files. The package system will prompt the user and ask them if they want to keep the package maintainer's version or the locally modified version.
(But if you're going to make every file a conf file, then you're probably doing something wrong.)
To make a file a conffile, list it in debian/conffiles. But if the file is going to be installed under /etc then you don't need to do this because dh_installdeb will do it for you.
EDIT following additional information in comment:
Suppose you have files test1.sh and test2.sh (among others) in your package. In the Debian world, they are either conffiles are intended to be modified by the end user, or they're not.
conffiles should be relatively few in number and as short as possible, to minimize the burden of having to reconcile changes made by the package maintainer with conflicting changes made by the end user.
If there are things mixed into the code that the end user is likely to want to tune, try to factor them out into a configuration file. If you put that file in /etc, you don't even have to manually designate it as a conffile.
If the end user needs to make a change to a non-conffile, they should use the dpkg-divert protocol to (1) move the original file aside, and (2) edit a copy. Diverted files are respected by package upgrades. The end user who uses dpkg-divert should be aware that things might break after upgrades as a result, because the package maintainer hasn't foreseen that these files would be modified by end users and the locally modified version might be incompatible with a newly upgraded version of a different file. dpkg-divert should be used carefully and sparingly.

Resources