Skip to content

Commit 2506e97

Browse files
authored
Merge pull request #3 from evert-arias/feature/typescript-implementation-update-deps
Feature update
2 parents ca65acf + 0c4e3c5 commit 2506e97

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+6106
-48536
lines changed

.editorconfig

Lines changed: 0 additions & 9 deletions
This file was deleted.

.eslintignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/npm-publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish to NPM
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Setup Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: 18
18+
registry-url: 'https://registry.npmjs.org'
19+
20+
- name: Install dependencies
21+
run: npm ci
22+
23+
- name: Build
24+
run: npm run build
25+
26+
- name: Publish to NPM
27+
run: npm publish
28+
env:
29+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Release and Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 18
19+
cache: 'npm'
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Build library
25+
run: npm run build
26+
27+
- name: Get package version
28+
id: package-version
29+
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
30+
31+
- name: Setup Demo Dependencies
32+
run: npm run demo:install
33+
34+
- name: Build Demo
35+
run: npm run demo:build
36+
37+
- name: Deploy to GitHub Pages
38+
uses: peaceiris/actions-gh-pages@v3
39+
with:
40+
github_token: ${{ secrets.GITHUB_TOKEN }}
41+
publish_dir: ./demo/dist
42+
43+
- name: Create Release
44+
id: create_release
45+
uses: softprops/action-gh-release@v1
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
with:
49+
tag_name: v${{ steps.package-version.outputs.version }}
50+
name: Release v${{ steps.package-version.outputs.version }}
51+
draft: false
52+
prerelease: false
53+
generate_release_notes: true

.prettier.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## Demo
88

9-
Live demo: https://evert-arias.github.io/react-contributors/
9+
Live demo: <https://evert-arias.github.io/react-contributors/>
1010

1111
![demo](demo.png)
1212

@@ -21,7 +21,8 @@ npm install --save react-contributors
2121
```jsx
2222
import React, { Component } from "react";
2323

24-
import Contributors from "react-contributors";
24+
// Import the component - styles are automatically included
25+
import { Contributors } from "react-contributors";
2526

2627
// Username of the repo(s) owner.
2728
const owner = "evert-arias";

demo/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>React Contributors Demo</title>
7+
<meta name="description" content="React Contributors component library">
8+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
9+
</head>
10+
<body>
11+
<div id="root"></div>
12+
<script type="module" src="/src/main.tsx"></script>
13+
</body>
14+
</html>

0 commit comments

Comments
 (0)