alexmingoia / gulp-file Goto Github PK
View Code? Open in Web Editor NEWCreate vinyl files from a string or buffer and insert into the Gulp pipeline.
License: BSD 3-Clause "New" or "Revised" License
Create vinyl files from a string or buffer and insert into the Gulp pipeline.
License: BSD 3-Clause "New" or "Revised" License
Hey there!
Would you consider creating a CHANGELOG.md (and update it at releases), so it is easier to look through the changes between versions?
It would make deciding whether to update the package a lot easier :)
Thanks a lot!
Richard
For some gulp plugins, having these properties of a File set properly is important - in particular when combining this plugin with the standard glob function.
Happy to implement and pull request!
Hello, nice code you have. Can you please tell me what version of BSD License your project has?
I have this simple task which never finishes:
gulp.task('envJS', [], function () {
var env = {
build: {
dev: dev
}
};
var envJS = 'var env = JSON.parse(\''+JSON.stringify(env)+'\');';
return file('env.js', envJS)
.pipe(gulp.dest('temp'));
});
I get the start log:
[01:55:32] Starting 'envJS'...
but no finish and I see the main task getting done:
[Finished in 5.4s]
but I don't see the task which is depending on "envJS" start.
I have tried using this module like you described, but pipe never end,
after adding stream.end()
on line 27 everything worked fine https://github.com/alexmingoia/gulp-file/blob/master/lib/file.js#L27
Am I missing something ?
gulp-util
has been deprecated recently. Continuing to use this dependency may prevent the use of your library with the latest release of Gulp 4 so it is important to replace gulp-util
.
The README.md lists alternatives for all the components so a simple replacement should be enough.
Your package is one of the most popular packages still relying on gulp-util
, it would be good to publish a fixed version to npm as soon as possible.
See:
This plugin does not create files on Windows, works fine on OSX though.
A fix would be nice.
I am probably missing something simple. It is adding the string into the file via gulp and the stream though I always get the following output on both win and linux:
[10:33:15] โ FAIL: env.js is unexpected
My gulpfile looks like this:
gulp.task('assembleAppJS', ['bower'], function (cb) {
var envJS = 'var envConfig = JSON.parse(\''+JSON.stringify(envConfig)+'\');';
pump([
gulp.src(src, {base: "."}),
file('env.js', envJS),
expect(src),
concat('app.js'),
gulp.dest(destDir)
], cb);
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.