In WebStorm don't work Pug's argument "--pretty" - phpstorm

In WebStorm don't work Pug's argument "--pretty"
HTML file looks like:
But I want:
Please advise what to do?
I do not want to write on the command line
pug --watch --pretty ./pug/ --out ./html/
I want to make the default setting.

Works fine for me when using the following setup:
Arguments: $FileName$ --pretty --out $ProjectFileDir$/html
Output paths to refresh: $ProjectFileDir$/html/$FileNameWithoutExtension$.html
the file in your screenshot doesn't seem to be produced by a file watcher - it's location doesn't match the output directory in your file watcher settings

Related

How to start compile SCSS to CSS on PhpStorm for example with File Watcher

I have start using SCSS for the frontend, and can setup it correctly with PhpStorm on the a MacBook Pro with Mojave installed.
First I install the npm:
Then I setup the file watcher:
But it does not work. Something what I not seeing here?
If you like the .css files to be generated in the same folder as original file, try the following settings:
Note the Create output file from stdout option - it has to be enabled, as node-sass writes CSS to stdout unless the -o option is passed.
If you like to place generated files in a separate folder, use the -o option:

Redirect gulp lint stdout to file

I have designed a gulp task for linting of .ts files present in my project. When I run it, it shows correct output on the prompt, but I am not sure how to redirect that output to a file so it can be printed so that I can handover the complete file to developer to correct the code accordingly.
my task looks like :
gulp.task('lint', function() {
gulp.src("src/**/**/*.ts")
.pipe(tslint({
formatter: "codeFrame",
configuration: "./tslint.json"
}))
.pipe(tslint.report({
configuration: {},
rulesDirectory: null,
emitError: true,
reportLimit: 0,
summarizeFailureOutput: true
}))
.pipe(gulp.dest('./Dest/reports'))
});
Could someone please suggest how do I achieve this.
See redirect via tee for some good examples of redirecting the stdout to a file. It could be as simple as
gulp lint | tee logfile.txt
With that you'll get both the output in the terminal as per usual and a copy in a file, that will be created for you if necessary. You don't say what terminal you are using though. if that doesn't work perhaps:
gulp lint 1> logfile.txt
See bash redirecting if you are using bash shell. Or SO: bash redirecting with truncating.
The linked question also has info on stderr if you need that.
Also for a quick way to copy output to the clipboard in Powershell:
gulp lint | clip
gulp lint | scb (doesn't add an extra newline at the end)
See pbcopy same as clip for macOS.
In general, see pbcopy alternatives on Windows

JetBrains WebStorm ignoring watcher settings

I'm using pug/jade watcher with the following "Output paths to refresh": $ProjectFileDir$\html\$FileNameWithoutExtension$.html. This should save the output in /html but for some reason it saves it next to the jade file.
You need changing Jade watcher arguments accordingly:
Arguments: $FileName$ --pretty --out $ProjectFileDir$/html
Working directory: $FileDir$
Output paths to refresh: $ProjectFileDir$/html/$FileNameWithoutExtension$.html

firebreath variables in custom file

I have a firebreath plugin with installer.cmake script for Mac. Instead of creating a dmg file it creates a package based on pmdoc folder.
COMMAND ${CMD_CP} -r ${CMAKE_CURRENT_SOURCE_DIR}/Mac/MyPlugin.pmdoc ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/MyPlugin.pmdoc
COMMAND /Applications/PackageMaker.app/Contents/MacOS/PackageMaker --doc ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/MyPlugin.pmdoc --version ${FBSTRING_PLUGIN_VERSION} --out ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/MyPlugin.pkg
Problem is I want to use FB variables in one of the pmdoc file, for example set title to ${FBSTRING_PluginName} ${FBSTRING_PLUGIN_VERSION} Obviously, copy command just copies the file, but how can I replace variables with their values?
Use cmake's configure_file. This will take an input file and an output file; the output file will have all variables replaced. Lots of examples of this in the firebreath codebase.

sublime text 2 dart build error

I have configured sublime text 2 according to this video from Dart site. I have added this "dartsdk_path": "/home/green/dart/dart-sdk", to the Preference -> Setting-user. The syntax highlighting and and line indention works perfectly. But when i try to build i have the following error
[Errno 2] No such file or directory
[cmd: [u'dart2js', u'--minify', u'-o/home/green/Desktop/darttut/untitled.dart.js', u'/home/green/Desktop/darttut/untitled.dart']]
[dir: /var/www]
[path: /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/green/bin]
[Finished]
Did I miss something? or did i have done something wrong? I am using Ubuntu 13.04 x64 os.
Try modifying your Dart build file (~/.config/sublime-text-2/Packages/Dart/Dart.sublime-build) to include the full path to the dart2js command - something along the lines of:
"cmd": ["/full/path/to/dart2js", "--minify", "-o$file.js", "$file"],
You will also want to either add the path to dart2js to your $PATH environment variable, or, better yet, make a link to it in /usr/local/bin:
sudo ln -s /full/path/to/dart2js /usr/local/bin/dart2js