Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
grunt-xjade
Advanced tools
Compile XJade templates with grunt.
This plugin requires Grunt ~0.4.4
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-xjade --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-xjade');
Run this task with the grunt xjade
command.
Task targets, files and options may be specified according to the grunt Configuring tasks guide. XJade specific options are described below. For more information about XJade Template Language visit project homepage: (https://github.com/dorny/xjade).
Type: String
Default: js
Sets the XJade compiler option:
js
- generate JavaScript codehtml
- generate HTML from in-memory compiled & executed template(s)Type: Any
Sets the data passed to executed template as argument.
Type: String
Default: 5
Sets the doctype for generated HTML.
Doctype can be any string or shortcut: '5'
, 'strict'
, 'transitional'
, 'xhtml'
.
Type: Boolean
Default: false
Output indented HTML.
Generate index.html from our root tempate:
grunt.initConfig({
index: {
src: 'index.js-tpl',
dest: 'index.html',
options: {
compile: 'html',
data: { sitename:"XJade Example"}
pretty: true,
doctype: '5'
}
},
});
Compile all templates inside "tpl" directories to standard JavaScript code for browser usage:
grunt.initConfig({
client: {
options: {
compile: 'js'
},
files: [{
expand: true,
src: 'views/tpl/*.js-tpl',
ext: '.js',
}]
},
});
Compile and concat all templates inside "templates" directory:
grunt.initConfig({
templates: {
src: 'src/templates/*.js-tpl',
dest: 'www/templates.js',
options: {
compile: 'js',
}
},
});
FAQs
Compile XJade templates with grunt.
The npm package grunt-xjade receives a total of 0 weekly downloads. As such, grunt-xjade popularity was classified as not popular.
We found that grunt-xjade demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.