For quickly create NodeJs module with svelte components using these commands (just copy/paste it to the console):
(Create new clear empty repository before)
Config:
(
SET TEMPLATE_BRANCH=sapper
SET TEMPLATE_REPO=https://github.com/NikolayMakhonin/nodejs-templates.git
SET /p DIR_NAME=Enter project directory name:
SET /p YOUR_REPO_URL=Enter your new clear repository url:
)
Install:
git clone --origin template --branch %TEMPLATE_BRANCH% %TEMPLATE_REPO% %DIR_NAME%
cd %DIR_NAME%
git branch -m %TEMPLATE_BRANCH% master
git tag -a -m "New project from template \"%TEMPLATE_BRANCH%\"" v0.0.0
git remote set-url --push template no_push
git remote add origin %YOUR_REPO_URL%
git checkout -b develop
git push --all origin
git push --tags origin
git branch -u origin/develop develop
git branch -u origin/master master
Or you can just clone repository without history using this command:
npx degit NikolayMakhonin/nodejs-templates#sapper <app name> && cd <app name> && npm i && npm run test
Module has been tested on Travis and BrowserStack
You can see your user name / access key here: https://www.browserstack.com/accounts/settings
For use BrowserStack locally you can set these environment variables:
For Windows users:
setx BROWSERSTACK_USERNAME "your user name"
setx BROWSERSTACK_ACCESS_KEY "your access key"
Attention! BrowserStack tests does not work in WebStorm (and this is an unsolvable problem). You should run tests from console.
And you should set your user name and encrypted access key to the .travis.yml
You shoud generate encrypted access key for each repository.
See: https://docs.travis-ci.com/user/encryption-keys
travis encrypt SOMEVAR="secretvalue" > key.txt
addons:
browserstack:
username: "your user name"
access_key:
secure: "your encrypted access key"