When you create a new project in WebStorm, you are given the option to create a new directory structure prepopulated with files: libraries, stylesheets, etc. for patterns like HTM5 boilerplate, Twitter boilerplate, etc.
How does one create one's own template for this? Is importing dummy projects the hack for it?
I suggest not using templates. I find it far more easy and maintainable to create "empty" projects (from existing projects, of course) in a git repo (bitbucket, github, ...), clone one, and start from there.
The .idea should be in the repo, but .idea/workspace.xml should be ignored, as per the documentation.
This gives you the opportunity to gradually refine your template, and share it easily with a team.
Use the LivePlugin plugin to create a project template:
<projectTemplate projectType="foo" templatePath="resources/bar.zip" category="true"/>
Use the Velocity Template Language (VTL) to create a file template:
File and code templates are written in the Velocity Template Language (VTL). So they may include:
Fixed text (markup, code, comments, etc.).
In a file based on a template, the fixed text is used literally, as-is.
File template variables.
When creating a file, the variables are replaced with their values.
#parse directives to include other templates defined in the Includes tab on the File and Code Templates page of the Settings dialog box.
Other VTL constructs.
References
Create project template extensions using "user defined" templates
Creation of Extension to applicationConfigurable
IdeaPlugin.xml
PlatformExtensionPoints.xml
LivePlugin: Plugin for writing IDE plugins
Webstorm Help: File and Code Templates
Configuring JetBrains WebStorm for UI5 development
Webstorm Project and IDE Settings
Idea NodeJS Plugin
Apache Velocity Engine VTL Reference
Related
How can i add (already created) file templates to a custom plugin for intellij idea?
The official docs are empty for file templates, only live templates are described.
https://www.jetbrains.org/intellij/sdk/docs/tutorials/live_templates.html
Maybe someone needs the solution too...
Move your file templates to the resources subfolder, e.g. resources/fileTemplates
Add a .ft extension to your template files, e.g. TestTemplate.py.ft
A good example can be found here:
File templates of the Julia plugin for the IntelliJ Platform
See also:
File Template extension with IntelliJ plugin
I am creating a New Project Template in VS2017 based on ASPNET Core Web API project. I have followed steps as outlined here: https://learn.microsoft.com/en-us/visualstudio/ide/how-to-create-project-templates
The zip file contains all the files (C# files).
When the new project is created based on the above project template, none of the C# files are added to the project.
Are there any special steps or settings to include the C# files?
I know this response is late but it may save someone else some other day.
I had this issue as well and i realized the solution was to include the CreateInPlace tag as a child of the TemplateData tag in the .vsTemplate for the project.
Unzip the zip file and update this template file. Add the following line
<CreateInPlace>true</CreateInPlace>
as a child of the TemplateData tag
<TemplateData></TemplateData>
Resharper C++ 2017 can generate doxygen headers for functions, classes, and everything else.
However, it writes the commands with the \ prefix, and to keep a consistency with my project's other modules, I need to use the # prefix instead.
I assume that it is possible, since the command is called Document (using 'doc' live template) .
How to change doxygen formatting style in resharper?
You change it like you would any other live template - via ReSharper | Tools | Templates Explorer. Select the C++ scope and update the 'doc' template in the Visual Studio editor to your preference. Take a look at the Creating and Editing Templates help section for more info.
I have 100 TeamCity sub-projects and a configuration template.
I want to add the configuration template to all the 100 projects.
Currently I am adding the template to projects, one after another.
Is there a way to add the configuration template to all the 100 sub-projects at once?
Move the template to the parent project. This must be a project that's above all the 100 sub-projects; in the worst case, this is the .
After that, the template will be visible (and usable) from all the 100 sub-projects.
Using the versionned settings, you can backup your current configuration as xml inside your VCS.
Then, change Versionned settings to use configuration from the VCS inside the .teamcity folder.
Using regex/massive replacement, you can edit all of your configuration, and push it to your repository.
Apparently it's XML-like. Example templates can be found in the gnome Anjuta shares on an Ubuntu install at /usr/share/anjuta/project/
I think I'll go back to Eclipse and gedit if it doesn't look like Anjuta has documented a decent auto-completion, project build, and syntax-highlighting template format. Others with the same question went fishing on Ubuntu forums and had no luck.
The answer might also help people trying to build automake scripts for svn repos at [https://stackoverflow.com/questions/5926366/using-anjuta-with-svn-how-to-create-the-project]
A bit overdue, but I found the official documentation, and remembered having seen your post. From the docs:
The template files look like xml documents and have normally the
extension .wiz. All templates and others related files are installed
by default in $anjuta_install_dir/share/anjuta/templates. But the
project wizard looks for templates in the sub directory
anjuta/templates of all user data directories as defined by XDG Base
Directory Specification too. It is possible to override a Anjuta
project template by an user one put, by example, in
~/.local/share/anjuta/templates.
The template file is divided in four parts: an header block, one or
more page blocks, a content block and an optional action block. The
file is read several times, one time for each block but before reading
it, the whole file go though a transformation pass and only the
resulting file must be a valid xml file. The transformation pass uses
autogen.