Gruntfile.js in ustyle-1.16.2 vs Gruntfile.js in ustyle-1.19.2

- old
+ new

@@ -1,12 +1,18 @@ +var browsersList = require('./package.json')['browserslist'] + module.exports = function (grunt) { grunt.loadNpmTasks('grunt-postcss') require('load-grunt-tasks')(grunt) grunt.loadTasks('grunt/tasks') grunt.initConfig({ + clean: ['dist', 'docs'], shell: { + upgrade: { + command: 'bundle exec rake ustyle:upgrade' + }, publish: { command: 'bundle exec rake ustyle:publish' } }, version: { @@ -17,11 +23,11 @@ postcss: { options: { map: false, processors: [ require('autoprefixer')({ - browsers: ['last 5 versions', 'Firefox ESR', 'not Explorer < 9', '> 1%', 'Opera > 18'] + browsers: browsersList }) ] }, dist: { src: ['docs/**/*.css', 'dist/**/*.css'] } }, @@ -99,12 +105,11 @@ 'vendor/assets/javascripts/ustyle/utils.js', 'vendor/assets/javascripts/ustyle/anchor.js', 'vendor/assets/javascripts/ustyle/backdrop.js', 'vendor/assets/javascripts/ustyle/overlay.js', 'vendor/assets/javascripts/ustyle/tabs.js', - 'vendor/assets/javascripts/ustyle/classtoggler.js', - 'vendor/assets/javascripts/ustyle/radioToggle.js' + 'vendor/assets/javascripts/ustyle/classtoggler.js' ], dest: 'dist/ustyle.js' }, app: { src: [ @@ -166,11 +171,10 @@ 'svg4everybody', 'hljs', 'Overlay', 'ClassToggler', 'Tabs', - 'RadioToggle', 'reportData' ] }, ustyle: { src: [ @@ -204,21 +208,23 @@ } } }) grunt.registerTask('lint', ['scsslint', 'standard']) - grunt.registerTask('icons', ['newer:svgmin', 'svgstore']) + grunt.registerTask('icons', ['svgstore']) - grunt.registerTask('build', ['sass', 'sassdoc', 'copy', 'concat:ustyle', 'uglify:ustyle', 'concat:app', 'lint', 'postcss', 'styleguide', 'builder']) + grunt.registerTask('build', ['clean', 'sass', 'sassdoc', 'copy', 'concat:ustyle', 'concat:app', 'uglify:ustyle', 'lint', 'postcss', 'styleguide', 'builder', 'icons']) - grunt.registerTask('publish', ['env:build', 'build', 'buildcontrol:pages']) + grunt.registerTask('publish', ['env:build', 'build']) grunt.registerTask('publish:version', 'Build and publish ustyle version', function (version) { if (version === null) { grunt.warn('Version must be specified when publishing ustyle') } - grunt.task.run('env:build', 'version::' + version, 'build', 'shell:publish', 'buildcontrol:pages') + grunt.task.run('env:build', 'version::' + version, 'build', 'shell:upgrade') }) + + grunt.registerTask('deploy', ['shell:publish']) grunt.registerTask('default', ['env:dev', 'build', 'browserSync-init', 'watch']) }