Skip to content

Commit

Permalink
feat: build as a package
Browse files Browse the repository at this point in the history
  • Loading branch information
matstyler committed Aug 19, 2024
1 parent f1fecb7 commit bc5b4d1
Show file tree
Hide file tree
Showing 8 changed files with 1,190 additions and 349 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Package update
on:
push:
branches:
- 'main'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@spectra-tokens'

- name: Automated Version Bump
uses: 'phips28/gh-action-bump-version@master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
version-type: 'minor'

- name: Build
run: yarn build

- name: Publish
run: npm ci && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.idea
/node_modules
/node_modules
/dist
22 changes: 22 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"tabWidth": 4,
"semi": false,
"singleQuote": false,
"bracketSpacing": true,
"useTabs": false,
"importOrder": [
"^@*/(.*)$",
"^styles/(.*)$",
"^state/(.*)$",
"^hooks/(.*)$",
"^(data|web3|contracts|utils)/(.*)$",
"^(components|routes)/(.*)$",
"^assets/(.*)$",
"^[./]"
],
"importOrderSeparation": true,
"plugins": [
"@trivago/prettier-plugin-sort-imports",
"prettier-plugin-tailwindcss"
]
}
19 changes: 18 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "token-list",
"version": "1.0.0",
"description": "",
"main": "index.js",
"main": "./dist/index.js",
"keywords": [
"spectral",
"token",
Expand All @@ -12,8 +12,25 @@
],
"author": "",
"license": "ISC",
"exports": {
".": {
"protocolList": "./protocols/protocolList.json",
"protocolCustomContent": "./protocols/protocolCustomContent.tsx",
"spectraTokens": "./tokens/spectraTokens.json",
"erc4626Wrappers": "./tokens/erc4626Wrappers.json",
"*": "./images/*"
}
},
"scripts": {
"build": "tsup src/index.ts"
},
"dependencies": {
"react": "^18.3.1",
"wagmi": "1.4.7"
},
"devDependencies": {
"prettier": "3.3.3",
"tsup": "^8.2.4",
"typescript": "^5.5.4"
}
}
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default as protocolCustomContent } from "./protocols/protocolCustomContent"
export type { default as ProtocolText } from "./types/ProtocolText"
Loading

0 comments on commit bc5b4d1

Please sign in to comment.