Skip to content

Commit

Permalink
removed full path for default sourceURLs for generated template files…
Browse files Browse the repository at this point in the history
… in bin/Templ8
  • Loading branch information
constantology committed Mar 13, 2013
1 parent aee95d6 commit 9e8db02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion bin/Templ8.js
Expand Up @@ -28,7 +28,11 @@ function toTempl8( id, src, str ) {

console.log( src + ' => ' + id );

return m8.format( "new Templ8( m8.copy( { id : \'${0}\', sourceURL : \'${1}\' }, config ), '${2}' );", id, src, str );
src = src.split( '/' );
if ( src.length > 2 )
src = src.slice( src.length - 2 );

return m8.format( "new Templ8( m8.copy( { id : \'${0}\', sourceURL : \'${1}\' }, config ), '${2}' );", id, src.join( '/' ), str );
}

function validFiles( f ) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -33,5 +33,5 @@
"scripts" : {
"test" : "mocha -c --ignore-leaks -R spec -u tdd ./test/*.test.js"
},
"version" : "0.9.25"
"version" : "0.9.26"
}

0 comments on commit 9e8db02

Please sign in to comment.