sindresorhus / gulp-chmod Goto Github PK
View Code? Open in Web Editor NEWChange permissions of Vinyl files
License: MIT License
Change permissions of Vinyl files
License: MIT License
I have a few files downloaded from Dropbox that have extended attributes set, also called Access Control Lists in macOS. Is there a way using this plugin to modify or remove extended attributes, or is it limited to user/group/world only?
Here's the options I use to remove ACLs: chmod -RN
Hey sindresorhus,
I was about to write a tool with a similar goal in mind. Then I found this after remembering to look for "chmod" (whoops! ๐).
Anyway, the primary difference is that I was intending to create a fs.Stats
instance when it was missing. My plan was to use my module stats-ctor for that case.
Of course, there is a trade off in that some other properties of the stat
would be defaulted. What do you think? Would that be useful?
deep-assign has been deprecated and contains a known vulnerability. The maintainer of deep-assign recommends lodash.merge or lodash.merge-options as a maintained alternative.
Please consider updating dependencies to use [email protected] at a minimum.
Hello !
I am having trouble trying to set chmod to 777 on a tree.
Here is what I do :
pipes.allPermissionsAllowedOnDist = function() {
return gulp.src(paths.dist + "**/*")
.pipe(print())
.pipe(pipes.allPermissionsAllowed());
};
gulp.task("allow-all-test", pipes.allPermissionsAllowedOnDistDev);
For indication what I am currently trying to do is to lock my dist folders (and all the files in it) for avoiding to modify dist files instead of app files by error. This part is working and I set a chmod 555 on all the files.
But when gulp watch is active and try to reload files, I have a permission error as gulp is trying to modify read-and-execute-only files. So I decided to use the above function specifically for gulp watch to allow modifcation when a file is reloaded.
But this part is not working, the print line indicate that tree is correctly browsed but file are still locked after execution.
Any idea ?
Thanks !
Hi,
I was using this plugin for copy files with permission until today without a doubt, but I found a gulp.dest
{mode: '0644'} option that is doing as same as gulp-chmod.
What the purpose do you suggest to use this plugin for?
Ok so today I learned that with updating to 2.0.0 I need to use new octal integer literals.
.pipe(chmod(0o777))
It would be very kind of you to add some warning, when still using the old syntax ... as it would shorten the time to fix update errors considerably!
Thank you!
From #4
I think this should follow gulp.dest and have a separate option for dirMode as it seems that's needed for some reason: gulpjs/vinyl-fs#35 Could maybe have it as a second argument to chmod.
When using an additional gulp plugin such as gulp-concat, which returns a Buffer with no fs.Stats, then gulp-chmod throws the following error.
TypeError: Cannot set property 'mode' of null
at Transform._transform (/home/vagrant/Code/storm/node_modules/gulp-chmod/index.js:48:19)
#Hi there,
I need to change the permissions of a folder, so others can execute it. How do I do that?
Cheers!
Jens
Most deb packages needs root:root owner. It'll be cool to have this functionality or have option to set user and group params for files and folders.
Now I use this workaround to set root:root for all my files:
fakeroot gulp
when I use chmod(0o755, 0o755) to change the permission of a directory which contain a empty sub-direcotry, and then the sub-dir was lost.
and use chmod(0o755), the sub-dir is ok.
gulp-chmod version 2.0.0 from npm.
This gulpfile.js doesn't work for me if I have folders in src :-(.
const gulp = require('gulp');
const chmod = require('gulp-chmod');
gulp.task('default', () =>
gulp.src('src/*')
.pipe(chmod(0o755, 0o755))
.pipe(gulp.dest('dist'))
);
Hi, I use Gulp for development in Visual Studio, which puts the "read-only" attribute on all files in the project.
I need to clear the "read only" attribute when running Gulp.
The plugin was installed correctly, the task is written, but the attribute is not removed.
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.