Sha256: 3241aedc9e781ea0e4c6813b4cb4c830d66ea7597f5ff491a2a9dfce73aacfa2

Contents?: true

Size: 1.32 KB

Versions: 13

Compression:

Stored size: 1.32 KB

Contents

var gulp   = require('gulp'),
	rename = require('gulp-rename'),
	uglify = require('gulp-uglify'),
	header = require('gulp-header'),
	concat = require('gulp-concat'),

	paths  = {
		components: ['components/**/*.js', '!components/**/*.min.js'],
		main: [
			'components/prism-core.js',
			'components/prism-markup.js',
			'components/prism-css.js',
			'components/prism-clike.js',
			'components/prism-javascript.js',
			'plugins/file-highlight/prism-file-highlight.js'
		],
		plugins: ['plugins/**/*.js', '!plugins/**/*.min.js']
	};

gulp.task('components', function() {
	return gulp.src(paths.components)
		.pipe(uglify())
		.pipe(rename({ suffix: '.min' }))
		.pipe(gulp.dest('components'));
});

gulp.task('build', function() {
	return gulp.src(paths.main)
		.pipe(header('\n/* **********************************************\n' +
			'     Begin <%= file.relative %>\n' +
			'********************************************** */\n\n'))
		.pipe(concat('prism.js'))
		.pipe(gulp.dest('./'));
});

gulp.task('plugins', function() {
	return gulp.src(paths.plugins)
		.pipe(uglify())
		.pipe(rename({ suffix: '.min' }))
		.pipe(gulp.dest('plugins'));
});

gulp.task('watch', function() {
	gulp.watch(paths.components, ['components', 'build']);
	gulp.watch(paths.plugins, ['plugins', 'build']);
});

gulp.task('default', ['components', 'plugins', 'build']);

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
polymer-elements-rails-1.0.1 app/assets/components/prism/gulpfile.js
polymer-elements-rails-1.0.0 app/assets/components/prism/gulpfile.js
polymer-elements-rails-1.0.0.pre.rc.1 app/assets/components/prism/gulpfile.js
polymer-iron-rails-1.0.0.pre.rc.3 app/assets/components/prism/gulpfile.js
polymer-iron-rails-1.0.0.pre.rc.2 app/assets/components/prism/gulpfile.js
polymer-iron-rails-1.0.0.pre.rc.1 app/assets/components/prism/gulpfile.js
hyhyhy-1.0.0 lib/hyhyhy/structure/_includes/prism/gulpfile.js
hyhyhy-0.0.9 lib/hyhyhy/structure/_includes/prism/gulpfile.js
hyhyhy-0.0.8 lib/hyhyhy/structure/_includes/prism/gulpfile.js
hyhyhy-0.0.7 lib/hyhyhy/structure/_includes/prism/gulpfile.js
hyhyhy-0.0.6 lib/hyhyhy/structure/_includes/prism/gulpfile.js
hyhyhy-0.0.5 lib/hyhyhy/structure/_includes/prism/gulpfile.js
hyhyhy-0.0.4 lib/hyhyhy/structure/_includes/prism/gulpfile.js