Skip to content
forked from DarkPark/sdk

Meta-package to work with all sdk packages.

Notifications You must be signed in to change notification settings

WhereIsExit/sdk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

206 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SDK deployment management

Production deployment

Install global packages:

sudo npm install -g eslint
sudo npm install -g spasdk
sudo npm install -g stbsdk
sudo npm install -g magsdk

Development deployment

Install optional global dependencies:

sudo npm install -g eslint jsdoc

Get meta repo:

git clone https://github.com/DarkPark/sdk.git
# or for Github users with granted access
git clone git@github.com:DarkPark/sdk.git
cd sdk

Clone all repositories:

npm run-script clone

Update all repositories:

npm run-script pull

Push commits for all repositories:

npm run-script push

Install common dependencies:

npm install

Create symbolic links for all repositories:

npm run-script link

Remove symbolic links for all repositories:

npm run-script unlink

Update common dependencies:

# links have to be removed due to conflicts
npm run-script unlink
npm update
# now links can be restored
npm run-script link

Make main packages globally available (similar to npm link):

sudo ln -sr ./spasdk/spasdk /usr/lib/node_modules/spasdk
sudo ln -sr ./stbsdk/stbsdk /usr/lib/node_modules/stbsdk
sudo ln -sr ./magsdk/magsdk /usr/lib/node_modules/magsdk
sudo ln -s /usr/lib/node_modules/spasdk/bin/cli.js /usr/bin/spasdk
sudo ln -s /usr/lib/node_modules/stbsdk/bin/cli.js /usr/bin/stbsdk
sudo ln -s /usr/lib/node_modules/magsdk/bin/cli.js /usr/bin/magsdk

Project creation

Get a new project base (one of the following):

git clone https://github.com/spasdk/boilerplate.git my-project
git clone https://github.com/stbsdk/boilerplate.git my-project
git clone https://github.com/magsdk/boilerplate.git my-project

Move to the project dir and install all required dependencies:

cd my-project
npm install

Replace git repository link with your own if necessary:

git remote remove origin
git remote add origin [new repository address]

For a development deployment to omit dependencies installation and regular npm update checks it's possible to skip npm install and create symlinks:

node [path to this sdk repo index.js] link

Build and start services (one of the following):

spasdk
stbsdk
magsdk

Or for a development mode (one of the following):

DEBUG=* spasdk
DEBUG=* stbsdk
DEBUG=* magsdk

Outdated instructions

Install dependencies for all repositories:

npm run-script install

??? List all packages with versions:

./run.sh version

Bind the necessary packages to the target project:

sudo ./run.sh bind [path to the project]

Unbind all bind packages in the target project:

sudo ./run.sh unbind [path to the project]

Contribution

If you have any problem or suggestion please open an issue here. Pull requests are welcomed with respect to the JavaScript Code Style.

License

sdk is released under the GPL-3.0 License.

About

Meta-package to work with all sdk packages.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 66.4%
  • Shell 33.6%