Skip to content

Commit

Permalink
NPM (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
kishannareshpal authored Feb 6, 2024
1 parent f44d312 commit f2f4365
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 29 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: CI
on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- run: npm ci
- run: npm run build
30 changes: 30 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish
on:
release:
types: [published]
workflow_run:
branches: [main]
types: [completed]

jobs:
publish:
name: "Publish NPM package to GitHub Packages"
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: 'https://npm.pkg.github.com'
scope: '@the-curve-consulting'
- run: npm ci
- run: npm build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 0 additions & 13 deletions .github/workflows/release-please.yml

This file was deleted.

1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@the-curve-consulting:registry=https://npm.pkg.github.com
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 8 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,30 @@
{
"name": "texmo-react-components",
"name": "@the-curve-consulting/texmo-react-components",
"repository": {
"type": "git",
"url": "https://github.com/the-curve-consulting/texmo-react-components.git"
},
"version": "0.1.0",
"keywords": [],
"description": "",
"main": "dist/index.min.js",
"module": "dist/index.es.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"repository": {
"url": "",
"type": "git"
},
"homepage": "",
"homepage": "https://github.com/the-curve-consulting/texmo-react-components",
"license": "MIT",
"private": true,
"private": false,
"scripts": {
"start": "rollup -c rollup.config.js -w",
"build": "tsc && rollup -c rollup.config.js",
"coverage": "codecov -e TRAVIS_NODE_VERSION -f coverage/*.json",
"test": "jest --coverage",
"test:watch": "jest --coverage --watch",
"test:ci": "cross-env CI=1 jest",
"predeploy": "cd example && npm install && npm run build",
"deploy": "gh-pages -d example/build",
"prepare": "husky install"
},
"engines": {
"node": ">=16"
"node": ">=18"
},
"peerDependencies": {
"react": ">=18",
Expand Down
2 changes: 1 addition & 1 deletion scss/texmo-react-components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
@import '../src/components/button/Button.scss';
@import '../src/components/title/Title.scss';
@import '../src/components/card/Card.scss';
@import '../src/components/form/components/FormRichText.scss';
@import '../src/components/form/components/FormRichText.scss';

0 comments on commit f2f4365

Please sign in to comment.