Socket
Book a DemoInstallSign in
Socket

grunt-angular-templates

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-angular-templates

Grunt build task to concatenate & register your AngularJS templates in the $templateCache

0.1.1
Source
npmnpm
Version published
Weekly downloads
27K
-3.29%
Maintainers
1
Weekly downloads
 
Created
Source

grunt-angular-templates Build Status

Grunt build task to concatenate & register your AngularJS templates in the $templateCache

Getting Started

Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-angular-templates

Then add this line to your project's grunt.js gruntfile:

grunt.loadNpmTasks('grunt-angular-templates');

Documentation

This plugin provides the grunt task ngtemplates, which will allow you to compile your HTML templates into a single JS file, which preloads $templateCache to prevent round-trips to the server.

Update Grunt:

// grunt.js
grunt.initConfig({
  ngtemplates:  {
    app:        {
      options:  { base: 'src/views' },
      src:      [ 'src/views/**.html' ],
      dest:     'dist/templates.js'
    }
  }
});

Add template module to your app

// js/app.js
angular.module('app', [
  'app.templates'  // Generated by ngtemplates:app
  ...
]);

Changelog

v0.1.1

  • Fixes

  • New

    • Added directions to README on how to integrate with AngularJS app
    • Integrated with TravisCI

v0.1.0

  • Released to NPM

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

License

Copyright (c) 2013 Eric Clemmons Licensed under the MIT license.

Keywords

gruntplugin

FAQs

Package last updated on 09 Jan 2013

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.