Created
May 30, 2014 12:25
-
-
Save intellix/33cd16f108d2a75ef706 to your computer and use it in GitHub Desktop.
ngtemplates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
grunt.initConfig({ | |
ngtemplates: { | |
yourModuleName: { | |
options: { | |
// This will add a / so make sure you ng-include="/app/blah.tpl.html" etc | |
prefix: '/' | |
}, | |
cwd: '<%= yeoman.src %>', | |
src: 'app/{,**/}*.tpl.html', | |
dest: '.tmp/templates/templates.js' | |
} | |
}, | |
}); | |
grunt.registerTask('build', function(target) { | |
grunt.task.run([ | |
'clean:dist', | |
'useminPrepare', | |
'concurrent:dist', | |
'ngtemplates', | |
'concat', | |
'ngmin', | |
'copy:dist', | |
'cssmin', | |
'uglify', | |
'rev', | |
'usemin', | |
'htmlmin', | |
]); | |
}); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<!-- build:css({.tmp,src}) styles/app.css --> | |
<link rel="stylesheet" href="/styles/vendor.css"> | |
<link rel="stylesheet" href="/styles/app.css"> | |
<!-- endbuild --> | |
</head> | |
<body ng-app="yourModuleName"> | |
<div ng-include="'/app/_partials/header.tpl.html'"></div> | |
<div ng-view></div> | |
<div ng-include="'/app/_partials/footer.tpl.html'"></div> | |
<!-- build:js app/vendor.js --> | |
<script src="/vendor/angular/angular.js"></script> | |
<!-- endbuild --> | |
<!-- build:js({.tmp,src}) app/app.js --> | |
<script src="/app/app.js"></script> | |
<!-- This will 404 during development --> | |
<script src="../.tmp/templates/templates.js"></script> | |
<!-- endbuild --> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment