WebStorm file watchers on Windows - intellij-idea

I want a file watcher for LiveScript, so I installed it with npm install LiveScript -g and this works like expected. I can now type livescript into cmd and compile files.
But when I try to use livescript as Program in a watcher, WebStorm tells me Cannot run program "livescript"...
The command seems to be globally accessible, but somehow not for WebStorm.

Please provide a full path to livescript.cmd (should be something like 'C:\Users\your.name\AppData\Roaming\npm\livescript.cmd') in a Program field - this should help

Related

Powershell files created outside of node_modules

Up until yesterday, whenever I installed a package (e.g. nodemon), they would be added to the node_modules dir. This morning, when I installed a bigger project, the powershell and cmd files were saved outside of that directory, in addition to a file without an extension. It looked like this:
dependencies
Why is example, example.cmd and example.ps1 saved outside of node_modules?
I would like to answer my own question. I had accidentally messed around with the npm prefix. If this happens to you, go to the cmd prompt and type npm set prefix C:/bin and you should be alright :)

How to make each Vue build include a version accessible in Vue app?

In Vue, I'd like to be able to get the current build version. Preferably, it would be in YYYY-MM-DD-HH-MM format (the build time), rather than a random hash (which would be ok too).
Here's how someone did this
https://medium.com/#howitson/passing-generated-build-numbers-to-vue-app-f301e6b11877
Another idea:
have a bash script which updates .env file with a line VUE_APP_BUILD_VERSION=... (is there any utility for this?)
and then run npm run build
Any suggestions for simpler ways? Maybe get the .js file path and use that? /js/app.5e716dd8.js
You can use npm version patch in your build script, and get the version number from package.json.

VSCode Typescript.NPM Warning for Babylon.js TS File

I use VSCode as an IDE for Babylon.js. To show Babylon.js code hinting, I was recommended to use "babylon.d.ts" file as the value of the "typescript.npm" in the VSCode's User Settings.
But when I hovered over a property in my JS script, a warning came up:
Could not install typings files for JavaScript language features.
Please ensure that NPM is installed or configure 'typescript.npm'
in your user settings.
How to fix this error and show the code hinting for Babylon.js JS script on VSCode?
to get babylon.js typings, just drop the babylon.d.ts file in your folder.
The file will be used by VSCode compiler directly

Jetbrains / PhpStorm File Watcher with Jade / Pug

Install programs (I guess I did well) and my problem begins when I try to write the path for the "Program" section in the File Watcher.
Which one is the right path?
It must be a part to (globally installed) Jade executable, like C:\Users\your.name\AppData\Roaming\npm\jade.cmd if you are on Windows or /usr/local/bin/jade on OSX.
Do you have Jade installed globally? Please run 'npm install jade -g', then test jade in your system terminal by running 'jade <your jade file>.jade'. Then specify a path to installed jade script as a 'Program' in your file watcher

Sass Intellij File Watcher Output path Ubuntu

I am trying to compile a .scss file in sass directory to a sibling css directory. However, I am not able to. I dint find enough documentation on the file watcher plugin as well.
Currently, it is compiling into the sass directory. And I need to compile into css directory.
I am able to compile it manually using
sass --watch sass/file.scss:css/file.css
How do I do it using Intellij File Watcher plugin?
I tried using the macros but I dont think I understand macros much, because I either get directory not found or .scss file not found. I am aware that I have to change the argument input in some way, but
--watch sass/file.scss:css/file.scss
dint work.
Pl help.
I am guessing you may have figured this out by now. But this may be helpful for future searches.
You don't need to add sass --watch to the arguments because that happens implicitly via the Intellij watcher.
But lets say you have a directory structure like so...
-C
-path
-to
-css
styles.css
-sass
styles.scss
You would do something like this in Arguments:
--no-cache --update C:\path\to\css\sass:C:\path\to\css
And then set your working directory to C:\path\to\css\sass
Example: