1.5.1 • Published 6 years ago

dsmcdn v1.5.1

Weekly downloads
291
License
MIT
Repository
-
Last release
6 years ago

DSMCDN Uploader

Installing

Global

Yarn yarn global add dsmcdn

Npm npm install -g dsmcdn

Library

Yarn npm install dsmcdn

Npm yarn add dsmcdn

Global Usage

Usage: dsmcdn -t [str] -e [str] -f [str[]] -u [str]
-p [pwd]

Options:
  --help     Show help                       [boolean]
  --version  Show version number             [boolean]
  -t         team directory                 [required]
  -e         environment directory          [required]
  -b         build version
  -d         Absolute directory
  -f         list of files          [array] [required]
  -u         sftp username                  [required]
  -p         sftp password                  [required]
  -h         sftp host
  -w         sftp port

Uploading files

Basic Usage

dsmcdn -u username -p password -t mobileweb -e develop -f library.js

Uploads library js to cdn with with /username/mobileweb/develop/library.js

With Build Number

dsmcdn -u username -p password -t mobileweb -e develop -b 123 -f library.js

Uploads library js to cdn with with /username/mobileweb/develop/123/library.js

Absolute Directory

dsmcdn -u username -p password -t mobileweb -e develop -d /absolute -f library.js

Uploads library js to cdn with with /username/absolute/library.js

Multiple Files

dsmcdn -u username -p password -t mobileweb -e develop -f library.js anotherlibrary.js

Uploads library js to cdn with with /username/mobileweb/develop/library.js Uploads library js to cdn with with /username/mobileweb/develop/anotherlibrary.js

Library Usage

Options

const dsmcdn = require('dsmcdn');
const options = {
  team: 'mobileweb',
  environment: 'dev,
  buildVersion: '123', //optional
  user: 'username',
  password: 'password',
}

Single file

dsmcdn.upload('~/acg/desktop/index.js', options);

Array of files

dsmcdn.upload(['~/acg/desktop/index.js', '~/acg/desktop/library.json'], options);

Object for custom configuration

dsmcdn.upload({
    source: '~/acg/desktop/index.js',
    remote: 'index.min.js'
}, options);
//File will be available with url: `/username/mobileweb/dev/index.min.js`

Multiple objects for custom configuration

dsmcdn.upload([
  {
    source: '~/acg/desktop/index.js',
    remote: 'index.min.js'
  },
  {
    source: '~/acg/desktop/library.json',
    remote: 'library.min.json'
  }
], options);
//File will be available with url: `/username/mobileweb/dev/index.min.js`
//File will be available with url: `/username/mobileweb/dev/library.min.json
1.5.1

6 years ago

1.5.0

6 years ago

1.4.4

6 years ago

1.4.3

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago