File tree Expand file tree Collapse file tree 2 files changed +8
-19
lines changed
Expand file tree Collapse file tree 2 files changed +8
-19
lines changed Original file line number Diff line number Diff line change 11import { Buffer } from 'node:buffer' ;
2- import transformStream from 'easy-transform-stream' ;
3- import PluginError from 'plugin-error' ;
2+ import { gulpPlugin } from 'gulp-plugin-extras' ;
43
54const BOM = Buffer . from ( '\uFEFF' ) ;
65
76export default function gulpBom ( ) {
8- return transformStream ( { objectMode : true } , async file => {
9- if ( file . isNull ( ) ) {
10- return file ;
11- }
12-
13- if ( file . isStream ( ) ) {
14- throw new PluginError ( 'gulp-bom' , 'Streaming not supported' ) ;
15- }
16-
7+ return gulpPlugin ( 'gulp-bom' , file => {
178 file . contents = Buffer . concat ( [ BOM , file . contents ] ) ;
18-
199 return file ;
2010 } ) ;
2111}
Original file line number Diff line number Diff line change 1313 "type" : " module" ,
1414 "exports" : " ./index.js" ,
1515 "engines" : {
16- "node" : " >=14.16 "
16+ "node" : " >=18 "
1717 },
1818 "scripts" : {
1919 "test" : " xo && ava"
3333 " prepend"
3434 ],
3535 "dependencies" : {
36- "easy-transform-stream" : " ^1.0.0" ,
37- "plugin-error" : " ^1.0.1"
36+ "gulp-plugin-extras" : " ^0.1.0"
3837 },
3938 "devDependencies" : {
40- "ava" : " ^3.15.0 " ,
39+ "ava" : " ^5.3.1 " ,
4140 "gulp" : " ^4.0.2" ,
42- "p-event" : " ^5 .0.1 " ,
43- "vinyl" : " ^2.2.1 " ,
44- "xo" : " ^0.47 .0"
41+ "p-event" : " ^6 .0.0 " ,
42+ "vinyl" : " ^3.0.0 " ,
43+ "xo" : " ^0.56 .0"
4544 },
4645 "peerDependencies" : {
4746 "gulp" : " >=4"
You can’t perform that action at this time.
0 commit comments