Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var globalConfig = {
- paths:{
- base:'docroot/_diffs',
- js:'<%=globalConfig.paths.base %>/js',
- css:'<%=globalConfig.paths.base %>/css',
- sass:'<%=globalConfig.paths.base %>/sass',
- templates:'<%=globalConfig.paths.base %>/templates'
- },
- urls: {
- theme:'/nbn-spark-theme',
- css:'<%=urls.theme %>/css',
- js:'<%=urls.theme %>/js'
- }
- };
- // Project configuration.
- grunt.initConfig({
- pkg: grunt.file.readJSON('package.json'),
- "file-creator": {
- options: {
- openFlags: 'w'
- },
- "write_ie_template": {
- 'docroot/_diffs/templates/ie_css.vm':function(fs, fd, done) {
- var glob = grunt.file.glob;
- var _ = grunt.util._;
- var dir = '<%= this.globalConfig.paths.css %>/blessed';
- grunt.log.writeln('dir: '+ dir);
- // OUTPUT dir: <%= this.globalConfig.paths.css %>/blessed
- glob(dir, function (err, files) {
- var stylesheets = [];
- _.each(files, function(file) {
- stylesheets.push(file);
- grunt.log.writeln(['found file: '+file]);
- });
- fs.writeSync(fd, '## built '+ grunt.template.today("yyyy-mm-dd") +'n');
- _.each(stylesheets, function(file, i) {
- grunt.log.writeln('file: '+ file);
- var file_url = file.replace('docroot/_diffs/','');
- fs.writeSync(fd, '<link rel="stylesheet" type="text/css" href="/nbn-spark-theme/' + file_url + '" />'+'n');
- });
- done();
- });
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement