Using JADE Template Engine
PyCharm supports integration with the JADE template engine.
On this page:
Before You Start
- Enable Node.js support as described in Node.js.
- Make sure the NodeJS and Jade plugins are installed and enabled. The plugins are not bundled with PyCharm, but they can be installed from the JetBrains plugin repository as described in Installing, Updating and Uninstalling Repository Plugins and Enabling and Disabling Plugins. Once enabled, the plugins are available at the IDE level, that is, you can use it in all your PyCharm projects.
Changes to the UI
The JADE plugin introduces the following changes to the PyCharm UI:
- The Jade file item is added to the menu.
-
Coding assistance is provided in the JADE-specific and HTML context:
- Code formatting
- Syntax highlighting
- Code completion
- Color schemes
Using JADE Templates in a NodeJS Application
In the runtime, the JADE files fill be transformed into HTML pages.
- Create a project from scratch, or around existing sources, or based on a NodeExpress template, see Creating New Project from Scratch, Creating a Project from Existing Local Sources, or Generating a Project from a Framework Template for details.
-
Create the JADE files you need:
-
In the Project tool window, select the directory in which you want to create a new file.
Choose or press Alt+Insert.
Alternatively, right-click the corresponding directory and choose New from the context menu.
- On the context menu, choose Jade file and specify the file name in the dialog box that opens.
-
In the Project tool window, select the directory in which you want to create a new file.
Choose or press Alt+Insert.
-
Create a File Watcher to transform
.jade
files into.html
pages:- Click the Add Watcher link in the upper right-hand corner of the editor.
-
In the New Watcher Dialog, accept the default predefined settings and specify the location of the JADE transpiler executable file
jade.cmd
orjade
.
-
As you edit a
.jade
file, PyCharm invokes the file watcher which creates an.html
file with the name of the processed.jade
file and stores the generated HTML code in it.
See Using File Watchers for details.
See Also
Last modified: 20 April 2016