![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
gulp-git-sftp
Advanced tools
gulp-git-sftp
with --save-dev
$ npm i gulp-git-sftp -D
# Load index.html and my.css and delete old.html
$ gulp dep:files -f=index.html,my.css,del:old.html
# Load and delete all changes form git (what `git add` now)
# So, it is cool use before commit for preprod server for hot test
$ gulp dep:git
# Load all files to server
$ gulp deploy
# Delete all files to server
$ gulp deploy --del
# Load all files to server from `dist` (local directory) to `public` (remote directory)
$ gulp deploy --basePath=dist --remotePath=public
# Delete `public` directory on remote side
$ gulp deploy --remotePath=public --del
# Deploy files to prod server in config
$ gulp deploy --dephost=prod
gulpfile.js
This file will give you a taste of what gulp does.
var ggs = require('gulp-git-sftp'),
cnf = require('./config/cnf'), // Look in help directory
argv = require('yargs').argv,
gulp = require('gulp'),
CNF = ggs.cnf(cnf);
console.log('CNF:', CNF)
var FTP = ggs.ftp(CNF);
var conn = FTP.conn();
gulp.task('dep:files', function() {
var files = argv.f;
if (!files) return;
files = FTP._file2format( files.split(',') );
console.log(files)
// TODO: need add return for correct work with stream
// return ggs.git({...}, (err)=>{...});
ggs.git({
conn: conn,
files: files,
basePath: CNF.basePath,
remotePath: CNF.remotePath,
}, function(err) {
if (err) console.log('ERRROR2:', err);
console.log('Files from -f to FTP is deployed!!!')
return true;
});
});
gulp.task('dep:git', function() {
// TODO: need add return for correct work with stream
// return ggs.git({...}, (err)=>{...});
ggs.git({
conn: conn,
basePath: CNF.basePath,
remotePath: CNF.remotePath,
}, function(err) {
if (err) console.log('ERRROR2:', err);
console.log('Files from git to FTP is deployed!!!')
return true;
});
});
gulp.task('deploy', function() {
if (!argv.del) {
return gulp.src( [`${CNF.basePath}/**/*`, '!node_modules{,/**}', '!bower{,/**}', '!bower_components{,/**}', '**/.htaccess'], { base: CNF.basePath, buffer: false } )
.pipe( conn.newer( CNF.remotePath || argv.remotePath ) ) // only upload newer files
.pipe( conn.dest( CNF.remotePath || argv.remotePath ) );
} else {
// conn.delete(CNF.remotePath+'dd', function(e) {
return conn.rmdir(CNF.remotePath, function(e) {
console.log('deleted:', CNF.remotePath);
});
}
});
// BUILD TASKS
// ...
package.json
Something like that:
"scripts": {
"depfront:prod": "gulp deploy --remotePath=frontend --basePath=frontend --dephost=prod",
"depfront": "gulp deploy --remotePath=frontend --basePath=frontend",
"depback:prod": "gulp deploy --remotePath=backend --basePath=backend --dephost=prod",
"depback": "gulp deploy --remotePath=backend --basePath=backend",
"deploy:prod": "gulp deploy --dephost=prod",
"deploy": "gulp deploy",
"depfront:del:prod": "gulp deploy --remotePath=frontend --dephost=prod --del",
"depfront:del": "gulp deploy --remotePath=frontend --del",
"depback:del:prod": "gulp deploy --remotePath=backend --dephost=prod --del",
"depback:del": "gulp deploy --remotePath=backend --del",
"deploy:del:prod": "gulp deploy --dephost=prod --del",
"deploy:del": "gulp deploy --del"
}
FAQs
Gulp plugin for sftp deploy with git
The npm package gulp-git-sftp receives a total of 0 weekly downloads. As such, gulp-git-sftp popularity was classified as not popular.
We found that gulp-git-sftp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.