I'm writing an website with intelliJ and my JS files have JSDocs annotations as supported by IntlliJ.
I there a way to produce JSDocs html files like with javadocs?
Related
I have a bunch of markdown files in my github repo. As there are many members in the team, the syntax of markdown and code in markdown files are hard to be standardised.
What I want is:
Create a github action that modify those files automatically when there is a push.
I can't find a markdown prettifier that format the code as well. (e.g. putting spaces around '=')
The solutions that I can think out of are:
Use a CLI tool that can do all the stuff
Use a tool for markdown, use a script to filter all code in it and parse it to anther tool
Send http requests to those online prettifier if such CLI tools do not exist
Note: I have Java, Cpp, Swift and more in my markdown.
Any solution for this? I will be appreciated if the script could be provided (if needed).
Thanks.
If those markdown files are located in a java project, you may try spotless.
For example, if you have a maven project, with spotless, just run mvn spotless:apply, it could fix all the styles / formatting issues of your markdown files automatically.
I'm new to thymeleaf and springboot.
I create a springboot project with thymeleaf in IntelliJ IDEA with "New Project"->"Spring Initalizr".
Then I get a project whose structure looks like below.
demo
|+-src/main
| +-java
| +-resources
| static
| templates
| application.properties
|-pom.xml
The question is what should I put in static and templates under resources? What's the difference between them?
I guess the .html files that have thymeleaf attributes should be put in templates. How about static html, css and js?
Thanks.
templates folder is a place where you put all the thymeleaf templates. It is a default directory (by default spring will look inside for any templates).
static folder is used for serving web static content, all the css, js, html etc. (also default folder search by spring)
http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-developing-web-applications.html#boot-features-spring-mvc-static-content
These folders are a way of organizing your files. These static and templates folders have special meaning in a case that it know has become common understanding for organizing your frontend files such as css, js, html etc among developers. In my understanding we should place files like css, js, images that supports your web pages which are not going to change through out your application at runtime. For eg: your design is not going to change which is done in your css file. In templates we should place html files. If you add both html and other files together, it becomes hard to organize your files.
For CSS files I have created a file watcher like described in this manual. Also for JS files, see manual, which both uses the YUI Compressor
But I didn't find how to add file watchers, which minify html files (e.g. removing comments, ..). How can I automatically minify html files with PhpStorm?
I'd suggest looking at HTMLMinifier - it has CLI and thus can be set up as a file watcher, also it can be configured as Grunt task or Gulp task and executed using Grant/Gulp console
I'm trying to create a dojo build file. What do I need to add in the profile.js file to include all the .css files inside the dojo build.js file. I'm getting dijit.js and other .js files, but the dependent .css files are not getting built into the build.js file
I'm using dojo 1.8
It doesn't really make sense to ask to combine JS and CSS into a single file. JavaScript is JavaScript; CSS is CSS.
That said, you should be able to get down to as little as one CSS request by specifying cssOptimize: 'comments' in your build profile, which will strip comments from CSS files within packages the build processes, and flatten imports. As a result, each Dijit theme's main CSS file (e.g. themes/claro/claro.css) will then require only one request, rather than requests for each component.
I need to gzip individual files that are part of my java project and replace the original file with the gzipped files.
So basically convert a directory /bla containing stylesheets, js, xml files to /bla with the same files but then all gzipped.
I can't find a simple way to do this with maven, please some advice?
I looked at the assembly plugin but that package files in to one gzip..
Should I use ant for this and run it from maven?
Ed
I am not aware of any plugin which is capable of this. I would write the Ant and execute it with the Maven Antrun Plugin.
The following blog post covers this topic: http://jorgetown.blogspot.com.br/2007/06/rhino-maven-automagic-compression.html
Alternatively you could use the YUI Compressor Maven plugin which also has an option to gzip compress the files.