WebStorm does not play well with gulp watch - webstorm

When I use WebStorm with gulp watch, watchify, tsc ... not all save commands trigger the watch.
I am sure that WebStorm has it for performance reasons but this drives me crazy.
Is there a flag which I can set, which saves the file immediately?

Webstorm support helped me with a quick response.
Turning 'Safe write' option ( Settings | Appearance & Behavior | System Settings) off fixed the issue.

Related

Gnome 3 and .desktop files - What exactly does "Allow/Disallow lauching do"?

I know that when creating a .desktop file, one can set the metadata::trusted as true and false, in order to be able to launch the icon as an executable.
What is intriguing me however is the fact that:
When right-clicking on the .desktop file and "Allow launching" apparently the only thing it does is to set the metadata::trusted to true. The icon, however, changes, as expected, instantly to the icon described in the .desktop file Icon=.
However when setting the metadata::trusted to either false or true via command-line the icon doesn't seem to change its behavior
$ gio set android-studio.desktop metadata::trusted false
Once I refresh the Desktop manually (Alt + F2 >> restart) the environment refreshes and the icon turns to be executable again, BUT the whole environment is restarted.
So, What does exactly "Allow/Disallow launching" does after setting the metadata::trusted? How does it refresh the metadata in the .desktop itself without refreshing the whole Desktop?
Your question is exactly the same as what I'm looking for.
On Ubuntu 18.04 (GNOME 3.28):
dbus-launch gio set file.desktop "metadata::trusted" yes
and (although this is not quite what you need)
killall nautilus-desktop && nautilus-desktop & disown
Ubuntu 20.04 (GNOME 3.36):
dbus-launch gio set file.desktop "metadata::trusted" true
but no nautilus-desktop...
dbus-send --type=method_call --print-reply --dest=org.gnome.Shell /org/gnome/Shell org.gnome.Shell.Eval string:'global.reexec_self()'
or something like systemd*...
Look at this code:
https://gitlab.gnome.org/GNOME/nautilus/commit/1630f5348
and here search "trusted":
https://download.gnome.org/core/3.36/3.36.2/sources/
nautilus-3.36.2/src/nautilus-file-operations.c
nautilus-3.36.2/src/nautilus-mime-actions.c
It may turns out to be simpler.
From desktop-file-utils.
man desktop-file-install
For example:
desktop-file-install --mode=0755 --dir=$HOME/Desktop /path/to/source/file.desktop
Quiet interesting, I've used combination of the two previous answers in order to "Allow Launching" .desktop file located at my desktop within Kali Linux 2022 with GNOME Shell:
desktop-file-install --mode=0755 --dir=$HOME/Desktop ~/Desktop/Telegram.desktop
dbus-launch gio set ~/Desktop/Telegram.desktop "metadata::trusted" true
Note the order of the execution of the commands is important!
Here is similar topic at Ask Ubuntu: .desktop files - Allow launching - set this via CLI.
Also for these who are interested in here is How to install the latest version Telegram for Desktop via CLI which was the reason to searching for the current topic.

Travis CI with Swift Framework

I'm not sure if Travis CI is behaving like it should, I feel like it's "overreacting". It's testing when I open a PR, when I merge the PR and when I (for example) edit the README.md and push to master.
This is my Travis CI config YML.
language: objective-c
xcode_workspace: {name}
xcode_scheme: {name}Tests
xcode_sdk: iphonesimulator10.0
osx_image: xcode8.3
branches:
only:
- master
before_install:
- pod repo update
script:
- xcodebuild -workspace {name}.xcworkspace -scheme {name} -sdk iphonesimulator ONLY_ACTIVE_ARCH=no
- xcodebuild test -workspace {name}.xcworkspace -scheme {name}Tests -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO -destination 'platform=iOS Simulator,name=iPhone 6s Plus,OS=10.0'
It is not "overreacting" :p
Actually, from my own kinda newbie experience, it is its default behaviour, which is justified. When you open a PR, it tests whether the branch you want to merge is not breaking anything, which is normal.
Once the merge happened, it tests if nothing has been broken by the merge, which is maybe what you call overreacting. But it actually happened to me once, even if i can't give you the reason why, it was quite a long time ago.
The documentation of Travis-CI explains how to limit the jobs to branches, but i guess you already know it when i read your travis.yml. Just in case, it is this part. What you may not be aware of is the possibility to skip a build by specifying
[ci skip] or [skip ci]
in the git commit message. Here is the doc reference.
I haven't actually ever heard about a way to prevent Travis to test before and after PR.
Hope this helps.
Edit : When watching your last build on travis-ci.org, on the top right, you have the "More options" button. Click on it and select Setting. Here you can select whether you want to Build branch updates and/or Build pull request updates. Take a look a bit further on this setting page, you can also decide to auto-cancel builds when there i a new one in the queue, e.g. when you just realize you made a mistake in your last push and make a new push to fix it.

WebStorm error message - use esversion 6

WebStorm is showing the following error message:
JSHint: 'let' is available in ES6 (use 'esversion': 6) ...
In the Preferences -> Languages & Framework -> JavaScript menu I've selected the ECMAScript 6 option and my .jshintrc file does contain the "esversion": 6, line.
I've tried the two most recent versions of the app (which are now 2016.3.6 and 2017.1.2) but to no avail.
I've also deleted the files in ~/Library/Application Support/WebStormXX and
~/Library/Preferences/WebStormXX but nothing seems to have changed.
I'm using OS X 10.10.5.
Thanks to #lena's comment I was able to figure out what was wrong. The Use config file checkbox of the Preferences | Languages & Frameworks | JavaScript | Code Quality Tools | JSHint was not checked so my .jshintrc was just being ignored.
If you don't have your own config file, you can enable EcmaScript.next in Relaxing options in in
Settings | Languages & Frameworks | JavaScript | Code Quality Tools |
JSHint
See this question How-do-I-resolve-these-JSHint-ES6-errors
I'd probably recommend a more feature rich editor like vim

oh-my-fish `omf: command not found` in WebStorm terminal emulator

I am using WebStorm 2017.1.3 on Fedora 25.
I have fish set up as my default shell and installed oh-my-fish so in
Terminal I see my git branch and other information by default. omf update runs as expected.
In the WebStorm terminal emulator I still get fish, but not omf:
user#host ~> omf
fish: omf: command not found...
I'm a noob fish and omf user, can anyone help?
Thanks.
I have fish set up as my default shell and installed oh-my-fish so in Terminal I see my git branch and other information by default.
Note that you don't need omf for this. Fish ships a number of prompts that include vcs information. You can pick one with fish_config or add the __fish_vcs_prompt function to your fish_prompt.
In the WebStorm terminal emulator I still get fish, but not omf:
user#host ~> omf
fish: omf: command not found...
The "omf" function is stored in a file named "omf.fish" in a directory in $fish_function_path. This means that directory isn't included there.
The way omf works in a reasonably current (> 2.3.0) fish is that it has a bootstrap file (~/.config/fish/conf.d/omf.fish) that then sources the rest. It seems this isn't run.
I'd suggest you compare the values of $fish_function_path, $OMF_PATH and possibly $XDG_DATA_HOME in webstorm and outside of it.
An answer was given here: IntelliJ's embedded terminal does not load fish functions. I.e, add some lines of code to the app for the time being (until Jetbrains makes a fix).
I fixed this by going to Settings | Terminal then turning off Shell integration.
This allowed me to run omf and also have the bobthefish theme work with powerline/nerd fonts (after updating the terminal font at Settings | Editor | Color Scheme | Font Console)
I was using phpStorm 2017.3.4 but I assume this will also work in any IntelliJ embedded terminal.

Webstorm run command when editor starts

Is there a way to have Webstorm run a cmd code when it stars. I'm using grunt watch and at the moment I have to go to the terminal and type "grunt watch" to start the task but I'm pretty sure I'll forget this from time to time and I want it automated.
Is there a way to have Webstorm run a cmd code when it stars.
No.
http://youtrack.jetbrains.com/issue/WEB-11818 -- star/vote/comment to get notified on progress.