add option 'pathPrepend' #16

Merged
merged 4 commits into from Mar 27, 2013

Projects

None yet

2 participants

@mbarchein
Contributor

This PR proposes a new option to prepend some custom string to $templateCache template's id

@ericclemmons ericclemmons commented on the diff Mar 26, 2013
README.md
@@ -33,7 +33,10 @@ which preloads `$templateCache` to prevent round-trips to the server.
grunt.initConfig({
ngtemplates: {
myapp: {
- options: { base: 'src/views' },
+ options: {
+ base: 'src/views', // strips this string from beggining of $templateCache id
+ pathPrepend: '/static/assets/' // optional, prepends this string to $templateCache id
ericclemmons
ericclemmons Mar 26, 2013 Owner

How do you feel about turning this into just prepend? I hate to delay a useful PR, so I'll make the change if you approve and would like! Then I'll bump & release ASAP :D

mbarchein
mbarchein Mar 26, 2013 Contributor

ok, go on

@ericclemmons ericclemmons commented on the diff Mar 26, 2013
tasks/angular-templates.js
@@ -16,12 +16,12 @@ module.exports = function(grunt) {
grunt.registerMultiTask('ngtemplates', 'Compile AngularJS templates', function() {
var id = this.target;
- var base = grunt.file.expand(this.options().base || '.')[0];
+ //var base = grunt.file.expand(this.options().base || '.')[0];
ericclemmons
ericclemmons Mar 26, 2013 Owner

I guess this sucker needs to get cut out!

mbarchein
mbarchein Mar 26, 2013 Contributor

sure :)

@ericclemmons ericclemmons merged commit 990e82b into ericclemmons:master Mar 27, 2013

1 check passed

default The Travis build passed
Details
Owner

Just deployed v0.3.1 for you! (baad256)

Thanks for your help @mbarchein! Let me know if you have any issues and I'll patch 'em :D

Contributor

Thank you

@ericclemmons ericclemmons added a commit that referenced this pull request May 6, 2013
@ericclemmons Fix #19 - bug introduced by #16 bad515b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment