Skip to content

A nodeJS module that compiles angular templates written in jade-lang into a self-contained, single file angular module.

Notifications You must be signed in to change notification settings

danielwjchen/angular-pug-template-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angularJS pug template compiler

A commonJS module provides function to compile angular templates written in jade-lang into a JS file. It utilizes $templateCache. The jade files must end with .tpl.pug or .tpl.jade as file extension.

Please note this compiler runs synchronously.

Dependencies

This module depends on node-ls. Please run npm install.

Installation

It is possible to use npm to install this repo. Simply adds the URL to the package.json and run npm install.

Usage Example

var compiler = require('node-angular-template-compiler');
var angularJSModuleName = 'Template'; // defines angularJS module name
var configs = {}; // defines jade options
var srcFolderPath =  '/path/to/template/folder/'; // defines path to folder contains jade files. Files must end with .tpl.jade
var distFilePath = '/path/to/dist/Template.js'; // defines path of the created angular module

// creates an angularJS module named Template stored as /path/to/dist/Template.js
compiler.compiler(angularJSModuleName,
                  configs,
                  srcFolderPath,
                  distFilePath);

About

A nodeJS module that compiles angular templates written in jade-lang into a self-contained, single file angular module.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published