Giter Club home page Giter Club logo

aang-template-brunch's Introduction

aang-template-brunch 1.7.6

Compile static HTML or Jade files to Angular templates. This plugin scans .html or .jade files (except in assets) and returns JavaScript in a format similar to this:

angular.module('app').run(['$templateCache', function($templateCache) {
  $templateCache.put('template/header.html', '<div>Title</div>');
}]);

Make sure you have the module (default is app) defined in your JavaScript before templates are declared. (see config.files.order.before)

Config

You can change the behavior of this plugin by adding options to config.plugins. Here is an example with the default options.

files: {...},
...,
plugins: {
  angularTemplate: {
    moduleName: 'app',
    pathToSrc: function(x) { return x },
    jadeOptions: {},
    ignore: []
  }
},
....

moduleName

The name of an established Angular module. This module will be used to access $templateCache. The default value is app.

pathToSrc

A function to be able to transform the path of the file. (ex: templates/sample.html) The default value is a no-op.

jadeOptions

Local data that can be injected into Jade templates when compiling. The default value is an empty object.

ignore

A function/regex/string or an array of functions/regexs/strings that can be used to define files that do not get compiled. (ex: outdated/old.html) Default is an empty array. (nothing ignored)

Usage

Add "aang-template-brunch": "x.y.z" to package.json of your brunch app.

Pick a plugin version that corresponds to your minor (y) brunch version.

If you want to use git version of plugin, add "aang-template-brunch": "git+ssh://[email protected]:jupl/aang-template-brunch.git".

aang-template-brunch's People

Contributors

jupl avatar

Watchers

Vitaliy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.