Skip to content

Instantly share code, notes, and snippets.

@adamtomat
Created August 17, 2017 15:47
Show Gist options
  • Save adamtomat/c3069ce44515dc2c116e1b48c0ae4c3d to your computer and use it in GitHub Desktop.
Save adamtomat/c3069ce44515dc2c116e1b48c0ae4c3d to your computer and use it in GitHub Desktop.
Combining Prism.js languages
module.exports = function(grunt) {
pkg = grunt.file.readJSON('package.json');
require('load-grunt-config')(grunt, pkg);
require('load-grunt-tasks')(grunt, pkg);
// ...
grunt.registerTask('prism', ['concat', 'uglify']);
};
module.exports = {
prism: {
options: {
separator: ';',
},
src: [
'bower_components/prism/prism.js',
'bower_components/prism/components/prism-php.js',
'bower_components/prism/components/prism-bash.js',
'bower_components/prism/components/prism-sass.js',
'bower_components/prism/components/prism-twig.js',
],
dest: '../js/prism.js',
}
};
module.exports = {
prism: {
options: {
banner: '/**\n * Prism: Lightweight, robust, elegant syntax highlighting\n * MIT license http://www.opensource.org/licenses/mit-license.php/\n * @author Lea Verou http://lea.verou.me\n */\n'
},
files: [
{
'../js/prism.min.js' : '../js/prism.js',
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment