2017-09-30 12:01:29 +00:00
|
|
|
const path = require('path');
|
|
|
|
const gulp = require('gulp');
|
|
|
|
const concat = require('gulp-concat');
|
|
|
|
|
|
|
|
const prismScripts = [
|
|
|
|
'prismjs/components/prism-core',
|
|
|
|
'prismjs/components/prism-markup',
|
|
|
|
'prismjs/components/prism-clike',
|
|
|
|
'prismjs/components/prism-c',
|
|
|
|
'prismjs/components/prism-javascript',
|
|
|
|
'prismjs/components/prism-css',
|
|
|
|
'prismjs/components/prism-ruby',
|
2018-01-14 16:27:06 +00:00
|
|
|
'prismjs/components/prism-cpp',
|
2017-09-30 12:01:29 +00:00
|
|
|
].map(require.resolve);
|
|
|
|
prismScripts.push(
|
|
|
|
path.join(path.dirname(require.resolve('prismjs/components/prism-core')), 'prism-!(*.min).js'));
|
|
|
|
|
|
|
|
gulp.task('build-prism', () => gulp.src(prismScripts)
|
2017-09-30 12:18:43 +00:00
|
|
|
.pipe(concat('prism.js'))
|
|
|
|
.pipe(gulp.dest(path.dirname(require.resolve('prismjs')))));
|