-
Notifications
You must be signed in to change notification settings - Fork 0
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 #1 from savanesoff/initial-release
Initial release
- Loading branch information
Showing
17 changed files
with
492 additions
and
212 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
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,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
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,5 @@ | ||
--- | ||
"devtools-chopper": minor | ||
--- | ||
|
||
Initial NPM release |
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,51 @@ | ||
name: Publish NPM Package | ||
on: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "publish" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
cache: "pnpm" | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
|
||
- run: pnpm install --frozen-lockfile | ||
|
||
- name: NPM Release | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: pnpm run release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Deploy Github Page | ||
run: pnpm run deploy:demo | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: public |
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,44 @@ | ||
name: Unit Tests | ||
run-name: ${{ github.actor }} is running unit tests... 🚀 | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened, updated] | ||
|
||
jobs: | ||
cache-and-install: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
- name: run tests | ||
run: pnpm test |
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 |
---|---|---|
|
@@ -81,6 +81,7 @@ typings/ | |
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
dist-demo | ||
|
||
# Gatsby files | ||
.cache/ | ||
|
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,55 @@ | ||
# replaces tsconfig.json with custom tsconfig.json specified by the user | ||
# to build demo app with custom tsconfig.json using vite | ||
# Usage: demo-build.sh --path <path-to-custom-ts-config> | ||
# Example: demo-build.sh --path ./tsconfig.demo.json | ||
# Note: tsconfig.json is renamed to tsconfig.json.bak | ||
# Note: tsconfig.json.bak is renamed to tsconfig.json after the build | ||
# Don't forget to ensure "build.outDir" is set to "dist-demo" in vite.config.ts | ||
# "build": { | ||
# "outDir": "dist-demo", | ||
# } | ||
# Also, ensure it matches custom ts config "outDir" value | ||
|
||
if [ $# -eq 0 ] | ||
then | ||
echo "No arguments supplied" | ||
exit 1 | ||
fi | ||
|
||
if [ $1 != "--path" ] | ||
then | ||
echo "--path argument is required" | ||
echo "Usage: demo-build.sh --path <path-to-custom-ts-config>" | ||
echo $1 | ||
exit 1 | ||
fi | ||
|
||
if [ -z $2 ] | ||
then | ||
echo "--path value is required" | ||
echo "Usage: demo-build.sh --path <path-to-custom-ts-config>" | ||
exit 1 | ||
fi | ||
# extract the path to the custom ts config | ||
CUSTOM_TS_CONFIG=$2 | ||
echo "path to custom ts config: $CUSTOM_TS_CONFIG" | ||
|
||
# rename the tsconfig.json to tsconfig.json.bak | ||
mv ./tsconfig.json ./tsconfig.json.bak | ||
|
||
# copy the custom ts config to tsconfig.json | ||
cp $CUSTOM_TS_CONFIG ./tsconfig.json | ||
|
||
# searchString="/dist/" | ||
# replaceString="/dist-demo/" | ||
# filename="package.json" | ||
# sed -i s:$searchString:$replaceString:gi $filename | ||
# "types": "./dist/types/index.d.ts", | ||
# "main": "./dist/index.js", | ||
# build the library | ||
echo "building library" | ||
pnpm tsc && pnpm vite build --base=./ | ||
|
||
|
||
# rename the tsconfig.json.bak to tsconfig.json | ||
mv ./tsconfig.json.bak ./tsconfig.json |
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
Oops, something went wrong.