Make phpStorm upload generated files together with original ones - phpstorm

I have some build and compile tasks that generate new files, e.g.
Now I need to upload those files to my server. I always upload the original file and forget about the compiled ones, as they aren't visible originally, but hidden behind the es6 file in this case.
Is there any way to make phpStorm auto upload the compiled files whenever I upload the original?

there is 'Upload external changes' option in Settings/Build, Execution, Deployment/Deployment/Options that allows updating files generated by external processes.

Related

How to publish html report inside VSTS

I have a simple batch (let's call it run_job.bat) job that I set up in VSTS as release definition. VSTS reads this file from the remote git repository that is also set up in VSTS.
The agent is configured on a remote machine to access certain folder, say C:\AllScans\FolderWhereScanIsRunning\ bring the necessary batch file in there and start the run. The job runs some scan against web application and generates report file with some unknown for me extension.
Another job then runs as queue in VSTS (let's call it run_report.bat) that transforms this unckown file to zip file where .html, .css and .js files are sitting. Simply exporting this manually to another folder and double clicking on the index.html file shows nicely looking html report on how the scan is run, and if there were any failures during it.
My question: is it possible to access this zip file C:\AllScans\FolderWhereScanIsRunning\report.zip, unzip it and bring this index.html file within the VSTS UI? I want be able for my other coworkers to see the results of the scan in html format without leaving VSTS interface? Thanks for the help
There isn't any way to achieve this by default.
A workaround would be deploy the html files to a web page which allow iframe embedding and then use "Embedded Webpage" widget in VSTS to show the content.

Enterprise Architect Generate Source Code

I am using Enterprise Architecture to generate C++ classes.
Every time I do a Generate Code, it forces me to navigate to the directory I want to save the files to. Is there a configuration setting for a project or model to tell it to always generate the files to directory X?
Using 'Auto Generate Files' (in the Code generation window) should set the path name to the files automatically, and once a file path is selected, you wouldn't have to select the directory again.

How to enable autominify of .js and .css files in PHP storm 10.0.3?

I want to see CSS and JS files normaly when editing them. But when I save/upload them to server I want them to be minified. Is there a plugin/setting that does this in the current version of PHPstorm?
PHPStorm doesn't have any built-in functions for minifying files... But there are plenty of different tools on the web - plus you can create your own batch files for this.
I can suggest using Grunt grunt-contrib-uglify and grunt-contrib-cssmin tasks, for example . Both tasks support merging and minifying files. You can run the tasks using Grunt console. Or, you can use YUI Compressor and set it up as a file watcher (https://www.jetbrains.com/webstorm/help/minifying-javascript.html, https://www.jetbrains.com/webstorm/help/minifying-css.html)
You can add css, or js File Watcher in PhpStorm, see their docs, using uglify or yuicompressor. All configurable from the IDE
After proper setup, your .css and .js files will be minified locally( PhpStorm shows them nicely together in the left sidebar where your files are). Each time you change your original css or js file, minified versions will be autogenerated.
When uploading to the server, you just need to upload automatically minified versions.
Very convenient. I use it for non-Symfony projects ( in symfony i use assetic for minification and combining assets into one file)

How do I get access to assets added to a library?

I have a main project and an external library. I have added a directory of assets to the external library in src/assets/[50 files here].
When I do that, I go into the external library properties and select the folder and this includes all the files in that directory. Example shown (1 file selected):
In my main application I want to access that folder and copy the files into another directory. How do I access those files?
Note:
I may update these files periodically, copying the files and pasting them into that directory. There may be a few more or less files each time. So I'm against embedding them.
Go to your main project > Properties and select Flex Build Path. Under Source path, choose Add Folder... and enter the following
${DOCUMENTS}\GigaLibrary\src\assets
(assuming your library project is called GigaLibrary, that is)

PhpStorm live edit with less files

I'm using PhpStorm with Live Edit.
Problem is that it's not updating when I change less files.
My less files are compiled to css by gulp.
I don't want to use File Watcher because it compiles all less files and I need to compile only one file app.less and watch all less files. I know how to do it with gulp but not how to do it with File Watchers.
Is there a solution that Live Edit will watch less or css files without edit?
I had the same issue with compiling scss files using gulp, namely the files in the IDE don't auto-update if they're changed via a task fired from a gulp.watch process (glitch dunno what jetbrains is doing about it).
There are 2 ways to get the files to update within the IDE:
File > Synchronize
Manually collapse and expand the tree in the project view
My hacky way to solve this problem is to macro the save process in phpstorm i.e.
Start macro record
File > Save All
File > Synchronize
File > Synchronize
File > Synchronize
Stop macro record
The Synchronize functionality is a little glitchy but i've found doing it 2 or 3 times inside the macro seems to work.
You can then rebind ctrl + s to your new macro and it should work.