Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fis-command-release

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fis-command-release - npm Package Compare versions

Comparing version 0.0.5 to 0.1.0

34

lib/deploy.js

@@ -27,2 +27,6 @@ /*

function normilize(str){
return '/' + str.replace(/^\//, '');
}
module.exports = function(dest, md5, collection, fis){

@@ -33,15 +37,9 @@ var settings = fis.config.get('deploy', {});

dest.split(/,/g).forEach(function(d){
var opt = { md5 : md5 };
if(settings[d]){
var opt = settings[d];
if(opt.to){
var from = opt.from;
if(from){
opt.from = '/' + from.replace(/^\//, '');
} else {
opt.from = '/';
}
var setting = settings[d];
if(setting.to){
opt.root = root;
opt.to = '/' + opt.to.replace(/^\//, '');
opt.md5 = md5;
dests.push(opt);
opt.from = normilize(setting.from || '');
opt.to = normilize(opt.to);
} else {

@@ -51,11 +49,13 @@ fis.log.error('invalid deploy config [deploy.' + d + '.to]');

} else if(/^output\b/.test(d)){ //local
dests.push({
md5 : md5,
root : root,
from : '/',
to : '/' + d
});
opt.root = root;
opt.from = '/';
opt.to = normilize(d);
} else if(d === 'preview'){
opt.root = fis.project.getTempPath('www');
opt.from = '/';
opt.to = '/';
} else {
fis.log.error('invalid deploy destination options [' + d + ']');
}
dests.push(opt);
});

@@ -62,0 +62,0 @@ fis.util.map(collection, function(subpath, file){

{
"name" : "fis-command-release",
"description" : "fis release command.",
"version" : "0.0.5",
"version" : "0.1.0",
"author" : "FIS Team <fis@baidu.com>",

@@ -6,0 +6,0 @@ "homepage" : "http://fis.baidu.com/",

@@ -127,3 +127,3 @@ /*

domain : options.domain
});
});

@@ -130,0 +130,0 @@ if(options.watch){

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc