Add to package.json
:
...
"scripts": {
"postinstall": "mkdir BotBuilder; cd BotBuilder; git init; git remote add -f origin https://github.com/Microsoft/BotBuilder.git; git config core.sparseCheckout true; echo "Node/core" >> .git/info/sparse-checkout; git pull --depth=1 origin master; cd ..; npm i ./BotBuilder/Node/core/"
...
},
...
postinstall
script is running after the package is installed.
And step by step:
- Make folder to clone repo:
mkdir BotBuilder
- enter to the folder:
cd BotBuilder
- init git repo:
git init
- set git origin to Microsoft/BotBuilder repo:
git remote add -f origin https://github.com/Microsoft/BotBuilder.git
- enable sparse checkout:
git config core.sparseCheckout true
- add
Node/core
to checkout list: echo "Node/core" >> .git/info/sparse-checkout
- pull part of repo:
git pull --depth=1 origin master
- enter to Your app folder:
cd ..
- install BotBuilder:
npm i ./BotBuilder/Node/core/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…