Skip to content

Commit

Permalink
feat: setup with vite
Browse files Browse the repository at this point in the history
  • Loading branch information
thekayshawn committed Dec 29, 2024
1 parent 0ddd3e0 commit 61feebb
Show file tree
Hide file tree
Showing 34 changed files with 4,255 additions and 574 deletions.
8 changes: 0 additions & 8 deletions .changeset/README.md

This file was deleted.

15 changes: 0 additions & 15 deletions .changeset/config.json

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/eleven-bags-mate.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fresh-buttons-own.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/gorgeous-spies-smell.md

This file was deleted.

8 changes: 0 additions & 8 deletions .eslintrc.json

This file was deleted.

69 changes: 29 additions & 40 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,42 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Release

# In order to use this workflow, use the `npm run release:version` command to version your package and create a git tag.
# The workflow then runs whenever a new git tag is pushed to the repository and creates a release as well as publishes it to NPM.

# If you do not wish to use GitHub actions, use the `npm run release` command to create a new release locally as well as publish it to npm.
# In this case, you can remove the entire `jobs` section below or disable the workflow in the GitHub Actions UI.

name: CI
permissions:
contents: write
id-token: write

on:
push:
tags:
- "*"
workflow_dispatch:

jobs:
create-release:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
with:
tag_name: ${{ github.ref }}
release_name: Crust@v${{ github.ref }}
draft: false
prerelease: false
fetch-depth: 0

publish-to-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Git config
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Set node
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/
# Install deps
- run: npm i
node-version: lts/*
registry-url: "https://registry.npmjs.org"

# Prepare release
- run: npm run release.prepare
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
run_install: |
- args: [--frozen-lockfile]
# Publish to NPM
- run: npm run release.publish
- name: Release
run: npx release-it --verbose
env:
# This is the NPM token used to publish the package to NPM, you only need this if you've enabled publishing with access tokens. Read more about this [here](https://kashanahmad.me/blog/how-to-trigger-gh-actions-on-tag).
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
# Add following line if you are publishing to npm
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_CONFIG_PROVENANCE: true
# Add more env variables if needed
110 changes: 15 additions & 95 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,101 +4,21 @@ logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
node_modules
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore artifacts:
build
coverage
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"semi": true,
"singleQuote": false
}
4 changes: 0 additions & 4 deletions .prettierrc.json

This file was deleted.

12 changes: 12 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://unpkg.com/release-it/schema/release-it.json",
"plugins": {
"release-it-pnpm": {
"inFile": "CHANGELOG.md"
}
},
"git": {
"tagName": "v${version}",
"commitMessage": "chore: release v${version}"
}
}
8 changes: 0 additions & 8 deletions .scripts/commit.sh

This file was deleted.

7 changes: 0 additions & 7 deletions .scripts/release-prepare.sh

This file was deleted.

28 changes: 0 additions & 28 deletions .scripts/release-publish.sh

This file was deleted.

24 changes: 0 additions & 24 deletions .scripts/release-version.sh

This file was deleted.

10 changes: 0 additions & 10 deletions .scripts/release.sh

This file was deleted.

3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

22 changes: 0 additions & 22 deletions CHANGELOG.md

This file was deleted.

Loading

0 comments on commit 61feebb

Please sign in to comment.