mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2025-02-25 18:55:21 -06:00
commit
b4ab3f6714
23
Gruntfile.js
23
Gruntfile.js
@ -111,7 +111,26 @@ module.exports = function(grunt) {
|
|||||||
dest: 'sphinx_rtd_theme/static/js/theme.js'
|
dest: 'sphinx_rtd_theme/static/js/theme.js'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
uglify: {
|
||||||
|
dist: {
|
||||||
|
options: {
|
||||||
|
sourceMap: false,
|
||||||
|
mangle: {
|
||||||
|
reserved: ['jQuery'] // Leave 'jQuery' identifier unchanged
|
||||||
|
},
|
||||||
|
ie8: true // compliance with IE 6-8 quirks
|
||||||
|
},
|
||||||
|
files: [{
|
||||||
|
expand: true,
|
||||||
|
src: ['sphinx_rtd_theme/static/js/*.js', '!sphinx_rtd_theme/static/js/*.min.js'],
|
||||||
|
dest: 'sphinx_rtd_theme/static/js/',
|
||||||
|
rename: function (dst, src) {
|
||||||
|
// Use unminified file name for minified file
|
||||||
|
return src;
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
},
|
||||||
exec: {
|
exec: {
|
||||||
bower_update: {
|
bower_update: {
|
||||||
cmd: 'bower update'
|
cmd: 'bower update'
|
||||||
@ -162,5 +181,5 @@ module.exports = function(grunt) {
|
|||||||
grunt.loadNpmTasks('grunt-browserify');
|
grunt.loadNpmTasks('grunt-browserify');
|
||||||
|
|
||||||
grunt.registerTask('default', ['exec:bower_update','clean','copy:fonts','sass:dev','browserify:dev','exec:build_sphinx','connect','open','watch']);
|
grunt.registerTask('default', ['exec:bower_update','clean','copy:fonts','sass:dev','browserify:dev','exec:build_sphinx','connect','open','watch']);
|
||||||
grunt.registerTask('build', ['exec:bower_update','clean','copy:fonts','sass:build','browserify:build','exec:build_sphinx']);
|
grunt.registerTask('build', ['exec:bower_update','clean','copy:fonts','sass:build','browserify:build','uglify','exec:build_sphinx']);
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
"grunt-contrib-connect": "^1.0.2",
|
"grunt-contrib-connect": "^1.0.2",
|
||||||
"grunt-contrib-copy": "~1.0.0",
|
"grunt-contrib-copy": "~1.0.0",
|
||||||
"grunt-contrib-sass": "~1.0.0",
|
"grunt-contrib-sass": "~1.0.0",
|
||||||
|
"grunt-contrib-uglify": "~3.3.0",
|
||||||
"grunt-contrib-watch": "~1.0.0",
|
"grunt-contrib-watch": "~1.0.0",
|
||||||
"grunt-exec": "~1.0.1",
|
"grunt-exec": "~1.0.1",
|
||||||
"grunt-open": "0.2.3",
|
"grunt-open": "0.2.3",
|
||||||
|
Loading…
Reference in New Issue
Block a user