Created
September 29, 2014 12:03
-
-
Save S3ak/33a99e56f7e018ab0696 to your computer and use it in GitHub Desktop.
grunt task: convert to aspx
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
// Put files not handled in other tasks here | |
copy: { | |
dist: { | |
files: [{ | |
expand: true, | |
dot: true, | |
cwd: '<%= yeoman.app %>', | |
dest: '<%= yeoman.dist %>', | |
src: [ | |
'*.{ico,png,txt}', | |
'.htaccess', | |
'images/{,*/}*.{webp,gif}', | |
'styles/fonts/*' | |
] | |
}, { | |
expand: true, | |
cwd: '.tmp/images', | |
dest: '<%= yeoman.dist %>/images', | |
src: [ | |
'generated/*' | |
] | |
}] | |
}, | |
// converts html to aspx | |
aspx: { | |
files: [{ | |
expand: true, | |
cwd: '<%= yeoman.dist %>', | |
src: [ | |
'**/*.html' | |
], | |
dest: '<%= yeoman.dist %>/', | |
rename: function(dest, src) { | |
return dest + src.replace(/\.html$/, '.aspx'); | |
} | |
}] | |
}, | |
// converts html to aspx | |
aspxPrefix: { | |
files: [{ | |
expand: true, | |
cwd: '<%= yeoman.dist %>', | |
src: [ | |
'**/*.html' | |
], | |
dest: '<%= yeoman.dist %>/', | |
rename: function(dest, src) { | |
return dest + src.replace(/\index.html$/, 'default.html'); | |
} | |
}] | |
} | |
}, | |
clean: { | |
aspx: { | |
files: [{ | |
dot: true, | |
src: [ | |
'<%= yeoman.dist %>/{,*/}.htaccess', | |
'<%= yeoman.dist %>/{,*/}404.aspx', | |
'<%= yeoman.dist %>/{,*/}favicon.ico', | |
'<%= yeoman.dist %>/{,*/}robots.txt', | |
'<%= yeoman.dist %>/{,*/}*.html', | |
'<%= yeoman.dist %>/{,*/}index.aspx' | |
] | |
}] | |
}, | |
dist: { | |
files: [{ | |
dot: true, | |
src: [ | |
'.tmp', | |
'<%= yeoman.dist %>/*', | |
'!<%= yeoman.dist %>/.git*' | |
] | |
}] | |
}, | |
server: '.tmp' | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment