Skip to content

Commit

Permalink
Merge pull request #290 from h5bp/convert-to-mjs
Browse files Browse the repository at this point in the history
Converts gulpfile to mjs
  • Loading branch information
roblarsen committed Jan 9, 2024
2 parents 7988326 + a44994f commit 2527b51
Show file tree
Hide file tree
Showing 3 changed files with 629 additions and 9,088 deletions.
17 changes: 10 additions & 7 deletions gulpfile.babel.js → gulpfile.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import gulp from 'gulp';
import plugins from 'gulp-load-plugins';
import cssimport from 'gulp-cssimport';
import header from 'gulp-header';
import autoPrefixer from 'gulp-autoprefixer';
import del from 'del';

import pkg from './package.json';
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
const pkg = require('./package.json');

const license = `/* ${pkg.name} ${pkg.version} | ${pkg.license} License | ${pkg.homepage} */\n`;

Expand All @@ -17,17 +20,17 @@ let files = [

gulp.task('concat', () => {
return gulp.src(`${src}/main.css`)
.pipe(plugins().cssimport())
.pipe(plugins().header(license))
.pipe(plugins().autoprefixer({
.pipe(cssimport())
.pipe(header(license))
.pipe(autoPrefixer({
cascade: false
}))
.pipe(gulp.dest(dist));
});

gulp.task('copy', () => {
return gulp.src(files, {})
.pipe(plugins().header(license))
.pipe(header(license))
.pipe(gulp.dest(dist));
});

Expand Down
Loading

0 comments on commit 2527b51

Please sign in to comment.