Generated resources directory JetBrains PhpStorm and WebStorm - phpstorm

Is it possible to mark a directory as generated, so it will be excluded in the search indexing, but still uploads files automatically to an FTP when changed?
More specific: In my project I have a src and a dist folder, so while working in src I don't need any file suggestions for dist files in the search. Marking the directory as 'excluded' seems to work, but then it does not upload external changes to the FTP anymore when compiling the code (using webpack/gulp/babel). So now I need to upload everything manually on each change.
The reason I need to exclude the dist folder is because not all files in there are minified, and I sometimes find myself working in dist without noticing, because they're so similar.
Is there a way to get a combination of both features?

Is there a way to get a combination of both features?
AFAIK -- Not really.
You can mark files as Plain Text in your dist folder .. but it will have to be done on per file basis (which is a real PIA if you need to do this for lots of files or often)...
For JavaScript files you may try adding them as JavaScript Library files.
Otherwise -- only mark such folder(s) as Excluded. Not sure about automatic upload ... but manually invoking Deployment | Synchronize with Deployed... works (which you may be using anyway).
https://youtrack.jetbrains.com/issue/IDEABKL-4253
https://youtrack.jetbrains.com/issue/WEB-12345
Watch these and related tickets (star/vote/comment) to get notified on any progress.
Check all the comments in those tickets as well -- maybe you will find better/working-good-enough workarounds there.

Related

Adding an images folder to GitHub Rep

I need help with creating a dedicated folder for my images in my Website repository, and heres how it looks right now.Image of my repository rigt now
Side-Note: I'm not using Git to push or commit these folders, all I'm doing is dumping these folders form my computers storage into github.
If the image doesn't work, heres the link to the rep.
Link to my repository
If anybody could help me with this, that would be a lifesaver.
Thank You.
So I tried importing the images folder itslef tat is located on my computer, and that didn't work out
I'll provide this answer, but I believe this is an excellent opportunity to learn some Gitfu. As this would be so much easier if you had git tracking your repo on your local machine.
First off, I believe you are using the "Add File" functionality on GitHub to upload you files. You can use this functionality to add folders as well. Just provide a slash after the root folder name and then add some dummy file name. This will create the dummy file in your new folder.
After having creating the folder you can upload the files you want into that folder using the same add file mechanism. One thing to keep in mind doing things this way you will have to manually delete the files from their previous location in GitHub. As well as delete the dummy file you created from the step above.
Now that I've answered the question, I highly recommend you learn git. It will save you so much time in the future.

How does Windows link HTML files to folders?

Almost every time you save a web page from a web browser to your local computer a PAGENAME.html (or .htm) file is created and a folder named 'PAGENAME_files' that contains resources specific to that page.
If you copy/move/delete either the folder or the .html file Windows automatically does the same operation the other file as well.
This behaviour also happens if you create a file named 1.html and a folder called 1_files.
How does this link happen? And why does it work only with web files?
This is a shell feature, not a file system feature. The shell copy engine just looks for a folder with the same name (plus a localized suffix) when copying/moving .htm[l] files.
This feature is called Connected Files and is documented here.
It's a built-in linkage in Windows.
Open up Explorer (not IE, Windows), Tools, Options, View, then in Advanced Settings there'll be a "Managing pairs of Web pages and folders" section.
If people are stuck and ended up here to find how to unlink, here's an easy trick : on Windows 10, I couldn't find how to unlink a .html file from its associated media folder, so I deleted both of them, and in the bin I restored only the .html file and it was then restored and unlinked from its folder.
It is a good question.
Under Windows 7 I managed to solve forced links by simply renaming the file.
I think it is the easiest way.

Upload files from external library?

I've added my cms as an external library in PhpStorm:
I just wanted to know if there is an option to upload (deploy) these files too? I always have to switch to my cms and open it itself as a project to be able to upload its files.
I've found nothing in the documentation also.
If it's not part of the project root/outside of the project -- then no.
But you can make it part of the project by:
adding it as Additional Content Root (Settings/Preferences | Directories) -- it will be listed as additional node in the Project View panel (similar to actual project's main folder)
or just symlink it (e.g. a subfolder inside the project root that is symlink to outside folder).
Please note that in both cases such folder becomes part of the project so the search routine will take those files into consideration as well as other functionalities (find usages; look for errors in a code; TODO's etc.). You may also accidentally edit your CMS core files and IDE will not tell you anything (in case of External Library it will notify you about this).

threepenny-gui - opening files

Dear Haskell community I have written my first gui application and decided to use
threepenny-gui to do so.
The task is the following search the files in a given folder for matches and provide links to open those files. In addition I made nice parse and render function as the files (mostly) have a special formatting.
But now I have stumbled upon a problem - most browsers prohibit links to local files by href="file://localhost/home/user/folder/file.pdf" being opened, for security reasons, which I do understand and find completely sensible.
I tried to use href="./file.pdf" when the program and the file are in the same folder, which also doesn't seem to work.
The code of the whole application is available at github/epsilonhalbe, I run it in a folder and access it via a browser at localhost:100000
The HTTP server provided by threepenny-gui will serve up static content from the directory you specify in tpStatic. Put your files in that directory, and make your links' paths be relative to it, and you'll be good to go!
As of threepenny-gui-0.4.*, there are also two functions loadFile and loadDirectory that can be used to serve a local file or directory at an automatically generated URL. This can be useful if the tpStatic field is not enough.

Build directory .js files missing, css link broken, jpegs not processing - common issue?

I'm running HTML5 Boilerplate 3.0 and the latest ant build script. I'm on Windows 7.
After a few issues, the .bat file now executes and everything runs. Upon completion though the script directory is my publish folder is empty, though I have the following .js files in my intermediate directory:
js/scripts-concant.min.js
js/scipt.js
js/plugins.js
js/libs/jquery-1.7.1.js
js/lib/modernizr-2.5.3.min.js
In a possibly related issue, my .css file is minified and renamed and links beautifully from index.html but the rest of the files continue to try to link to style.css
In a maybe possibly related issue, I get a can't open for writing error on every single jpeg that it tries to open. They're copied across fine though, so I just wanted to include this for completion.
I've Googled to no avail and can't seem to find a common reason this would happen. I'd really appreciate any pointers, I don't mind fixing things myself, I just can't find a common thread here.
Many thanks.
For the css issue I was having this issue because I had to include all index files by putting specifying *.html in config/project.properties file.
# Web Pages
#
# These are the pages (files) that will be served to users (.html, .php, .asp, etc).
Files in this property will
# be minified / optimised and have any stylesheet or javascript references updated to
the minified examples
#
# The paths need to be relative
#
# Files can be added in a comma separated form
file.pages = *.html
Don't know about the other issues