File tree 3 files changed +629
-9088
lines changed
3 files changed +629
-9088
lines changed Original file line number Diff line number Diff line change 1
1
import gulp from 'gulp' ;
2
- import plugins from 'gulp-load-plugins' ;
2
+ import cssimport from 'gulp-cssimport' ;
3
+ import header from 'gulp-header' ;
4
+ import autoPrefixer from 'gulp-autoprefixer' ;
3
5
import del from 'del' ;
4
-
5
- import pkg from './package.json' ;
6
+ import { createRequire } from 'module' ;
7
+ const require = createRequire ( import . meta. url ) ;
8
+ const pkg = require ( './package.json' ) ;
6
9
7
10
const license = `/* ${ pkg . name } ${ pkg . version } | ${ pkg . license } License | ${ pkg . homepage } */\n` ;
8
11
@@ -17,17 +20,17 @@ let files = [
17
20
18
21
gulp . task ( 'concat' , ( ) => {
19
22
return gulp . src ( `${ src } /main.css` )
20
- . pipe ( plugins ( ) . cssimport ( ) )
21
- . pipe ( plugins ( ) . header ( license ) )
22
- . pipe ( plugins ( ) . autoprefixer ( {
23
+ . pipe ( cssimport ( ) )
24
+ . pipe ( header ( license ) )
25
+ . pipe ( autoPrefixer ( {
23
26
cascade : false
24
27
} ) )
25
28
. pipe ( gulp . dest ( dist ) ) ;
26
29
} ) ;
27
30
28
31
gulp . task ( 'copy' , ( ) => {
29
32
return gulp . src ( files , { } )
30
- . pipe ( plugins ( ) . header ( license ) )
33
+ . pipe ( header ( license ) )
31
34
. pipe ( gulp . dest ( dist ) ) ;
32
35
} ) ;
33
36
You can’t perform that action at this time.
0 commit comments