warapitiya / gulp-yarn Goto Github PK
View Code? Open in Web Editor NEWAutomatically install node modules using Yarn. :heart_eyes_cat:
License: MIT License
Automatically install node modules using Yarn. :heart_eyes_cat:
License: MIT License
Hi there,
As the title suggest, I experience what looks like a bug with version 2.0.0-beta.3 of gulp-yarn on Windows 10.
The following task
var gulp = require('gulp');
var yarn = require('gulp-yarn');
gulp.task('yarn', function() {
return gulp.src(['./package.json'])
.pipe(yarn());
});
Produces the aforementioned error:
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
I couldn't find a way to produce a more meaningful output but I remain at your disposition.
Note: I am aware that this is a beta release, the reason I tried to updated gulp-yarn in the first place is to fix the problem mentioned in Issue #18
Instead of manually implementing arguments in the options object, please allow straightforward passing of any argument to the underlying yarn
command. For example, I want to use --ignore-scripts
. Instead of relying on an API to do that for me, why not something like .pipe(yarn({ args: ['--ignore-scripts'] })
?
If you try to pass on arguments that have values, it seems that gulp-yarn ends up prepending the value with '--'
so if you tell it:
--registry https://www.google.com
it actually sends this to Yarn:
--registry --https://www.google.com
this module should not depend on a global install of yarn
$ ./node_modules/.bin/gulp --gulpfile gulpfile-yarn.js yarn
events.js:167
throw er; // Unhandled 'error' event
^
Error: Can't yarn! `yarn` doesn't seem to be installed.
at /Users/ulrichk/github-ui/self-service-ui/node_modules/gulp-yarn/lib/utils/commandRunner.js:24:13
at F (/Users/ulrichk/github-ui/self-service-ui/node_modules/which/which.js:68:16)
at E (/Users/ulrichk/github-ui/self-service-ui/node_modules/which/which.js:80:29)
at /Users/ulrichk/github-ui/self-service-ui/node_modules/which/which.js:89:16
at /Users/ulrichk/github-ui/self-service-ui/node_modules/isexe/index.js:42:5
at /Users/ulrichk/github-ui/self-service-ui/node_modules/isexe/mode.js:8:5
at FSReqWrap.oncomplete (fs.js:149:21)
Emitted 'error' event at:
at DestroyableTransform.onerror (/Users/ulrichk/github-ui/self-service-ui/node_modules/gulp/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js:558:12)
at DestroyableTransform.emit (events.js:182:13)
at onwriteError (/Users/ulrichk/github-ui/self-service-ui/node_modules/readable-stream/lib/_stream_writable.js:449:12)
at onwrite (/Users/ulrichk/github-ui/self-service-ui/node_modules/readable-stream/lib/_stream_writable.js:470:11)
at WritableState.onwrite (/Users/ulrichk/github-ui/self-service-ui/node_modules/readable-stream/lib/_stream_writable.js:180:5)
at DestroyableTransform.afterTransform (/Users/ulrichk/github-ui/self-service-ui/node_modules/readable-stream/lib/_stream_transform.js:93:3)
at /Users/ulrichk/github-ui/self-service-ui/node_modules/gulp-yarn/lib/index.js:72:32
at /Users/ulrichk/github-ui/self-service-ui/node_modules/gulp-yarn/lib/utils/commandRunner.js:24:4
at F (/Users/ulrichk/github-ui/self-service-ui/node_modules/which/which.js:68:16)
at E (/Users/ulrichk/github-ui/self-service-ui/node_modules/which/which.js:80:29)
Hello,
I believe I am missing something. I am trying to call gulp-yarn
in my gulp file and then when it has completed I am attempting to zip the directory. gulp-yarn
is not returning as expected. I have tried calling .on('end', callback) and a number of other techniques.
Is there a stream or promise step I am missing when trying to do something like this:
gulp.task('default', ['dist-zip']);
gulp.task('build-modules', () => {
return gulp.src(['./package.json', './yarn.lock'])
.pipe(gulp.dest('./build'))
.pipe(yarn({
production: true
}));
});
gulp.task('dist-zip', ['build-modules'], () => {
return gulp.src(['./index.js', './build/**', '!./build/package.json', '!./build/yarn.lock'])
.pipe(zip('lambda-function.zip'))
.pipe(gulp.dest('dist'));
});
The use case is packaging things for an AWS Lambda function. We are trying to bundle only the files needed for Production. Yarn would run to create the node_modules directory, then some other steps before a zip file is created. Right now we can't get anything to happen after the gulp-yarn
step.
Thanks,
Mark
gulp.src(glob)
.pipe(yarn({
noProgress: true
}));
This doesn't install the packages as yarn install --no-progress
. Am I doing something wrong or is this not supported yet?
3.0.2
to 3.0.3
.This version is covered by your current version range and after updating it in your project the build failed.
coveralls is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
As suggested by NPM and Snyk.
The new version differs by 1 commits.
aa2519c
dependency security audit fixes from npm & snyk (#210)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:
.travis.yml
If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.
Greenkeeper has checked the engines
key in any package.json
file, the .nvmrc
file, and the .travis.yml
file, if present.
engines
was only updated if it defined a single version, not a range..nvmrc
was updated to Node.js 10.travis.yml
was only changed if there was a root-level node_js
that didn’t already include Node.js 10, such as node
or lts/*
. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.For many simpler .travis.yml
configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
2.0.3
to 2.0.4
.This version is covered by your current version range and after updating it in your project the build failed.
through2 is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
The new version differs by 4 commits.
e839de7
2.0.4
c778d93
added coverage
0293a9e
replace function into arrow function in README
40d2668
update to latest shiny stuff
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
I can try to make a pull request for this
Logging like
[18:03:15] Starting 'scripts'...
[18:03:33] 9285525 bytes written (17.93 seconds)
[18:03:43] 9519593 bytes written (27.85 seconds)
[18:03:51] Finished 'scripts' after 36 s
[18:03:51] Starting 'default'...
[18:03:51] Finished 'default' after 23 μs
vanished when upgrading from 1.0.0
to 1.0.1
.
I really enjoy using your package! I'm looking to upgrade from yarn 1 -> yarn 2, but I realized that gulp-yarn
is incompatible with the latest version. Are there plans to support yarn 2?
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.