-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from LuisEnMarroquin/develop
Changed project structure to a yarn and lerna monorepo
- Loading branch information
Showing
42 changed files
with
13,689 additions
and
18,820 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Production | ||
name: Prod deploy | ||
|
||
on: | ||
push: | ||
|
@@ -11,35 +11,32 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run unit tests | ||
run: npm run test | ||
- name: Build JavaScript file | ||
run: npm run build | ||
- run: yarn | ||
- run: yarn test | ||
- run: yarn build | ||
- name: Set environment variables | ||
run: | | ||
git fetch --all --tags | ||
echo "TAG_VERSION=$(git describe --abbrev=0)" >> $GITHUB_ENV | ||
echo "CURRENT_VERSION=$(node -e "console.log('v' + require('./package.json').version)")" >> $GITHUB_ENV | ||
echo Env TAG_VERSION ${{ env.TAG_VERSION }} and CURRENT_VERSION ${{ env.CURRENT_VERSION }} | ||
working-directory: packages/main-library/ | ||
- name: Publish package to NPM | ||
if: ${{ env.TAG_VERSION != env.CURRENT_VERSION }} | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > ~/.npmrc | ||
npm publish --access public | ||
env: | ||
NPM_AUTH_TOKEN: ${{ secrets.TOKEN_NPM }} | ||
working-directory: packages/main-library/ | ||
- name: Create GitHub release | ||
if: ${{ env.TAG_VERSION != env.CURRENT_VERSION }} | ||
run: | | ||
echo ${{ secrets.TOKEN_GITHUB }} > nothing.md | ||
gh auth login --with-token < nothing.md | ||
gh release create ${{ env.CURRENT_VERSION }} -F README.md -t "Released ${{ env.CURRENT_VERSION }}" | ||
- name: Build VueJS project | ||
run: | | ||
npm run build-client | ||
cp CNAME dist/CNAME | ||
- name: Prepare static files for deployment | ||
run: yarn run static | ||
- uses: JamesIves/[email protected] | ||
with: | ||
folder: dist | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
16.14.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,33 @@ | ||
# Dev environment | ||
## Requirements | ||
|
||
Here are the **node** and **npm** versions that we use to develop this project | ||
These are the software versions I personally use | ||
|
||
```shell | ||
$ node --version && npm --version | ||
v16.13.0 | ||
8.1.0 | ||
$ node --version | ||
v16.14.2 | ||
$ npm --version | ||
8.5.0 | ||
$ yarn --version | ||
1.22.19 | ||
``` | ||
|
||
After cloning the repository, run `npm install` to install the dependencies | ||
Other versions may work but I can not guarantee that | ||
|
||
## Run in dev mode | ||
## Develop locally | ||
|
||
You'll have to use 2 consoles to run the app, one for the actual package `index.ts` | ||
It will start the library and demo project in dev mode | ||
|
||
```shell | ||
$ npm run start | ||
$ yarn start | ||
``` | ||
|
||
Then if you want to test the package with `VueJS` you can execute the following | ||
- Express: localhost:5500 | ||
- ReactJS: localhost:6500 | ||
|
||
```shell | ||
$ npm run start-client | ||
``` | ||
|
||
Otherwise if you want to test with `express` use the following command | ||
|
||
```shell | ||
$ npm run start-server | ||
``` | ||
|
||
## Linting code | ||
## Code linting | ||
|
||
This project uses `prettier` for linting code | ||
|
||
## Deploy to NPM | ||
|
||
There is a pipeline for that, just do a PR and I'll merge it | ||
There is a pipeline for that, just do a PR and it will be merged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"packages": ["packages/*"], | ||
"version": "independent", | ||
"npmClient": "yarn", | ||
"useWorkspaces": true | ||
} |
Oops, something went wrong.