Welcome on Ts.ED modules template.
Use this template to bootstrap a repository configured with GithubAction to deploy NPM modules on Github packages and/or NPM registry.
This template use Ts.ED MonoRepoUtils to package modules inside the packages
directory.
Replace the follow tsed-preview
text by your repository name.
You have a simple package example in packages/preview
. Rename it or copy this package example.
Then edit the package.json
and replace the package name by your desired package name.
Inside the root package.json
change the registries:
{
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"monorepo": {
"productionBranch": "production",
"developBranch": "production",
"registries": [
"https://registry.npmjs.org/"
]
}
}
To deploy on NPM, configure the NPM_TOKEN
env variable in your Github secret:
See GitHub Action configuration here:
- name: Release packages
env:
CI: true
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Ask Ts.ED team on slack to get an uniq personal GH_TOKEN.
Then add on your project (or on profile level) a .npmrc
file with the following content:
@tsedio:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=GH_TOKEN
Replace the GH_TOKEN
by your token or by ${GH_TOKEN}
if you want to use env variable.
If you use yarn (v1), you can also add a .yarnrc
with the following content:
"@tsedio:registry" "https://npm.pkg.github.com/tsedio"
Then add the package to you package.json:
{
"name": "@project/server",
"version": "1.0.0",
"description": "A Server based on Ts.ED",
"main": "index.js",
"author": "",
"license": "MIT",
"dependencies": {
"@tsedio/preview": "1.0.4"
}
}
Please read contributing guidelines here.
Thank you to all our backers! 🙏 [Become a backer]
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]
The MIT License (MIT)
Copyright (c) 2016 - 2021 Romain Lenzotti
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.