Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-angular-template-stitch

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-angular-template-stitch

Combine AngularJS templates into a single HTML file.

  • 0.1.0
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

grunt-angular-template-stitch

Stitch AngularJS templates into a single HTML file, delimiting them by a comment. Useful for proxy services that need HTML files.

grunt.loadNpmTasks('grunt-angular-template-stitch');

The "angularTemplateStitch" task

Example 1
angularTemplateStitch: {
    dist: {
        files: [{
            expand : true
            cwd: 'app'
            src: 'views'
            dest: 'dist/stitched'
        }]
    }
}

Will generate a file dist/stitched/views.html that contains all html templates in app/views.

Example 2
angularTemplateStitch: {
    dist: {
        files: [{
            expand : true
            cwd: 'app/views'
            src: '*'
            filter: 'isDirectory'
            dest: 'dist/stitched'
        }]
    }
}

Will generate a file (e.g. dist/stitched/views/group1.html) of all html templates for each folder within app/views (e.g. app/views/group1/)

Options
processIdentifier

Process function that allows you to change the if name for each of the templates.

angularTemplateStitch: {
    dist: {
        ...
        options: {
            processIdentifier: function (id) {
                // just use the files name without extension
                return id.split('/').pop().replace('.html', '');
            }
        }
    }
}

Release History

  • 0.1.0 : first release, adapted from angular-combine

Keywords

FAQs

Package last updated on 26 Feb 2015

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc