🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
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
Package was removed
Sorry, it seems this package was removed from the registry

grunt-angular-template-stitch

Combine AngularJS templates into a single HTML file.

0.1.0
unpublished
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
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

gruntplugin

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