diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..3c3629e64 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/Gruntfile.js b/Gruntfile.js index e3db2c467..972683032 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -276,10 +276,30 @@ module.exports = function(grunt) { "bower.json", "composer.json" ] + }, + "regex-replace": { + // disable image fonts in default HTML-CSS config + noImageFont: { + src: ['unpacked/jax/output/HTML-CSS/config.js'], + actions: [ + { + name: 'nullImageFont', + search: /imageFont:[^,]+,/, + replace: 'imageFont: null,', + } + ] + } } }); grunt.loadNpmTasks("grunt-contrib-clean"); + grunt.loadNpmTasks('grunt-regex-replace'); + + grunt.registerTask("component", [ + // components-mathjax excludes only PNG fonts + "regex-replace:noImageFont", + "clean:png", + ]); grunt.registerTask("template", [ // **Notes** on the template. When instructions say "Pick one", this means commenting out one item (so that it"s not cleaned). diff --git a/package.json b/package.json index 574e643e0..e329b13c4 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "devDependencies": { "grunt": "^0.4.5", "grunt-contrib-clean": "^0.6.0", + "grunt-regex-replace": "^0.2.6", "matchdep": "*" } }