Skip to content

Commit

Permalink
chore(Build): Add less files to releases
Browse files Browse the repository at this point in the history
Closes #3368, Closes #2778
  • Loading branch information
c0bra committed Jul 1, 2015
1 parent a0ec813 commit b7002ba
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 17 deletions.
6 changes: 3 additions & 3 deletions grunt/aliases.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = function (grunt, options) {
'default': ['before-test', 'test:single', 'after-test'],

// Build with no testing
'build': ['ngtemplates', 'concat', 'uglify', 'fontello', 'less', 'ngdocs', 'copy'],
'build': ['ngtemplates', 'concat', 'uglify', 'fontello', 'less', 'ngdocs', 'copy:site'],

// Auto-test tasks for development
'autotest:unit': ['karmangular:start'],
Expand Down Expand Up @@ -48,10 +48,10 @@ module.exports = function (grunt, options) {
var currentTag = semver.clean( util.getCurrentTag() );

if (currentTag) {
baseTasks['release'] = ['clean', 'ngtemplates', 'build', 'cut-release', 'gh-pages:ui-grid-site', 'update-bower-json', 'gh-pages:bower', 'npm-publish'];
baseTasks['release'] = ['clean', 'ngtemplates', 'build', 'cut-release', 'copy:less_dist', 'gh-pages:ui-grid-site', 'update-bower-json', 'gh-pages:bower', 'npm-publish'];
}
else {
baseTasks['release'] = ['clean', 'ngtemplates', 'build', 'cut-release', 'gh-pages:ui-grid-site'];
baseTasks['release'] = ['clean', 'ngtemplates', 'build', 'cut-release', 'copy:less_dist', 'gh-pages:ui-grid-site'];
}

return baseTasks;
Expand Down
10 changes: 10 additions & 0 deletions grunt/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ module.exports = function ( grunt ) {
dest: '<%= dist %>'
}
]
},
less_dist: {
files: [
{
expand: true,
cwd: 'src/less',
src: '**/*.less',
dest: '<%= dist %>/release/src/less'
}
]
}
};
};
5 changes: 3 additions & 2 deletions grunt/cut-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ module.exports = {
keepUnstable: false
},
dist: {
src: '<%= dist %>/release/*.{js,css,svg,woff,ttf,eot}',
dest: '<%= dist %>/release/'
files: [
{ src: '<%= dist %>/release/*.{js,css,svg,woff,ttf,eot}', dest: '<%= dist %>/release/' }
]
}
};
24 changes: 12 additions & 12 deletions grunt/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,57 @@ var util = require('../lib/grunt/utils.js');
module.exports = function( grunt, options ){
var config = {
// list of files to watch, and tasks to run if those files change

gruntfile: {
files: ['<%= jshint.gruntfile.src %>', 'grunt/*.js'],
tasks: ['jshint:gruntfile', 'ngdocs']
},

ngtemplates: {
// files: ['src/templates/**/*.html', 'src/features/*/templates/**/*.html'],
files: '<%= ngtemplates.uigrid.src %>',
tasks: ['ngtemplates']
},

rebuild: {
files: util.testFiles.unit,
tasks: ['jshint:src_test', 'jscs', 'karmangular:run', 'concat', 'uglify', 'ngdocs'],
},

protractor: {
files: ['.tmp/doc-scenarios/**/*.spec.js', 'test/e2e/**/*.spec.js'],
tasks: ['protractor:auto']
},

less: {
files: 'src/**/*.less',
tasks: ['less', 'ngdocs', 'concat:customizer_less']
},

fontello: {
files: 'src/font/config.json',
tasks: ['fontello', 'less']
},

docs: {
files: ['misc/tutorial/**/*.ngdoc', 'misc/api/**/*.ngdoc', 'misc/doc/**'],
tasks: 'ngdocs'
},

copy: {
files: ['misc/site/**'],
tasks: 'copy'
tasks: 'copy:site'
},

livereload: {
options: { livereload: true },
files: ['dist/**/*', 'misc/demo/**/*.html', 'docs/**/*'],
}
};

if (grunt.option('fast') || grunt.option('e2e') === false){
config.protractor.tasks = [];
}

return config;
};

0 comments on commit b7002ba

Please sign in to comment.