Install global packages:
sudo npm install -g eslint
sudo npm install -g spasdk
sudo npm install -g stbsdk
sudo npm install -g magsdk
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 [email protected]: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 . /usr/lib/node_modules/sdk
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/sdk/bin/cli.js /usr/bin/sdk
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
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
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]
If you have any problems or suggestions please open an issue according to the contribution rules.
sdk
is released under the GPL-3.0 License.