Skip to content

Commit

Permalink
Merge pull request #141 from IQSS/feature/116-publish-npm-package-for…
Browse files Browse the repository at this point in the history
…-the-design-system

116 - Publish npm package for the design system
  • Loading branch information
kcondon authored Jul 21, 2023
2 parents 6663e29 + fb0d3e7 commit c4184bc
Show file tree
Hide file tree
Showing 43 changed files with 19,147 additions and 11,847 deletions.
1 change: 0 additions & 1 deletion .env

This file was deleted.

2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VITE_DATAVERSE_BACKEND_URL=http://localhost:8080
VITE_DATAVERSE_BACKEND_URL=http://localhost:8080
3 changes: 2 additions & 1 deletion .github/workflows/chromatic-design-system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ jobs:
run: |
cp .npmrc.example .npmrc
sed -i -e 's/<YOUR_GITHUB_AUTH_TOKEN>/${{ secrets.GITHUB_TOKEN }}/g' .npmrc
sed -i -e 's/<YOUR_NPM_AUTH_TOKEN>/${{ secrets.NPM_AUTH_TOKEN }}/g' .npmrc
- name: Install dependencies
# 👇 Install dependencies with the same package manager used in the project (replace it as needed), e.g. yarn, npm, pnpm
run: rm package-lock.json && npm install
run: npm install
- name: Build Dataverse Design System
working-directory: packages/design-system
run: npm run build
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ jobs:
run: |
cp .npmrc.example .npmrc
sed -i -e 's/<YOUR_GITHUB_AUTH_TOKEN>/${{ secrets.GITHUB_TOKEN }}/g' .npmrc
sed -i -e 's/<YOUR_NPM_AUTH_TOKEN>/${{ secrets.NPM_AUTH_TOKEN }}/g' .npmrc
- name: Install dependencies
# 👇 Install dependencies with the same package manager used in the project (replace it as needed), e.g. yarn, npm, pnpm
run: rm package-lock.json && npm install
run: npm install
# 👇 Adds Chromatic as a step in the workflow
# Install design system dependencies
- name: Build Dataverse Design System
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
run: |
cp .npmrc.example .npmrc
sed -i -e 's/<YOUR_GITHUB_AUTH_TOKEN>/${{ secrets.GITHUB_TOKEN }}/g' .npmrc
sed -i -e 's/<YOUR_NPM_AUTH_TOKEN>/${{ secrets.NPM_AUTH_TOKEN }}/g' .npmrc
- name: Install Dependencies
run: npm install
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,27 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 19
node-version: 18
cache: 'npm'

- name: Create .npmrc
run: |
cp .npmrc.example .npmrc
sed -i -e 's/<YOUR_GITHUB_AUTH_TOKEN>/${{ secrets.GITHUB_TOKEN }}/g' .npmrc
sed -i -e 's/<YOUR_NPM_AUTH_TOKEN>/${{ secrets.NPM_AUTH_TOKEN }}/g' .npmrc
- name: Install Dependencies
run: rm package-lock.json && npm install
run: npm install

- name: Build Dataverse UI Library
working-directory: packages/design-system
run: npm run build

- name: Lint
run: npm run lint
- name: ESLint
run: npm run lint:eslint

- name: Stylelint
run: npm run lint:stylelint

- name: Prettier
run: npm run lint:prettier
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
# cache: 'npm'

# - name: Install Dependencies
# run: rm package-lock.json && npm install
# run: npm install

# - name: Build Dataverse Design System
# working-directory: packages/design-system
Expand Down Expand Up @@ -52,9 +52,10 @@ jobs:
run: |
cp .npmrc.example .npmrc
sed -i -e 's/<YOUR_GITHUB_AUTH_TOKEN>/${{ secrets.GITHUB_TOKEN }}/g' .npmrc
sed -i -e 's/<YOUR_NPM_AUTH_TOKEN>/${{ secrets.NPM_AUTH_TOKEN }}/g' .npmrc
- name: Install Dependencies
run: rm package-lock.json && npm install
run: npm install

- name: Build Dataverse Design System
working-directory: packages/design-system
Expand Down Expand Up @@ -106,9 +107,10 @@ jobs:
run: |
cp .npmrc.example .npmrc
sed -i -e 's/<YOUR_GITHUB_AUTH_TOKEN>/${{ secrets.GITHUB_TOKEN }}/g' .npmrc
sed -i -e 's/<YOUR_NPM_AUTH_TOKEN>/${{ secrets.NPM_AUTH_TOKEN }}/g' .npmrc
- name: Install Dependencies
run: rm package-lock.json && npm install
run: npm install

- name: Build Dataverse Design System
working-directory: packages/design-system
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

# misc
.DS_Store
./.env
.env
.env.local
.env.development.local
.env.test.local
Expand Down
8 changes: 7 additions & 1 deletion .npmrc.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
legacy-peer-deps=true
registry=https://npm.pkg.github.com/IQSS

# design-system registry
//registry.npmjs.org/:_authToken=YOUR_NPM_AUTH_TOKEN>
@iqss:registry=https://registry.npmjs.org/

# js-dataverse registry
//npm.pkg.github.com/:_authToken=<YOUR_GITHUB_AUTH_TOKEN>
@iqss:registry=https://npm.pkg.github.com/
2 changes: 1 addition & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Preview } from '@storybook/react'
import { ThemeProvider } from 'dataverse-design-system'
import { ThemeProvider } from '@iqss/dataverse-design-system'
import { initialize, mswDecorator } from 'msw-storybook-addon'

/*
Expand Down
6 changes: 6 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "independent",
"npmClient": "npm",
"packages": ["packages/*"]
}
Loading

0 comments on commit c4184bc

Please sign in to comment.