Skip to content

Commit

Permalink
🚀 gh-pages, pkg files, npm provenance (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottnath authored Sep 14, 2023
1 parent d7e127f commit c438ea7
Show file tree
Hide file tree
Showing 14 changed files with 82 additions and 70 deletions.
9 changes: 5 additions & 4 deletions .storybook/primer-preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const globalTypesPrimer = {
defaultValue: 'light',
toolbar: {
icon: 'contrast',
items: [...primerThemes, {value: 'all', left: '', title: 'All'}],
items: [{value: '', left: '', title: 'None'}, ...primerThemes],
showName: true,
dynamicTitle: true,
},
Expand All @@ -32,14 +32,15 @@ export const globalTypesPrimer = {

export const decoratorsPrimer = [
(Story, context) => {
document.body.setAttribute('data-color-mode', context.globals.theme.startsWith('light') ? 'light' : 'dark')
const theme = context.globals.theme;
document.body.setAttribute('data-color-mode', !theme ? '' : theme.startsWith('light') ? 'light' : 'dark')
document.body.setAttribute(
'data-light-theme',
context.globals.theme.startsWith('light') ? context.globals.theme : undefined,
context.globals.theme.startsWith('light') ? theme : undefined,
)
document.body.setAttribute(
'data-dark-theme',
context.globals.theme.startsWith('dark') ? context.globals.theme : undefined,
context.globals.theme.startsWith('dark') ? theme : undefined,
)
return Story();
},
Expand Down
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,5 @@ Web components which display profile information from various websites

## @todo

- [ ] get releases to npm working
- [ ] how to unpkg?
- [ ] deploy to chromatic
- [ ] chromatic VRT
- [ ] get esbuild making separate bundles for each component
- [ ] stackblitz? webcomponents.dev?
- [ ] put docs in storybook

- [ ] docs for unpkg usage
- [ ] add stackblitz demo
16 changes: 8 additions & 8 deletions package-lock.json

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

20 changes: 17 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "profile-components",
"author": "scottnath",
"description": "A collection of web components for displaying profile information from various websites.",
"homepage": "https://scottnath.github.io/profile-components",
"scripts": {
"cem": "custom-elements-manifest analyze --config 'lib/custom-elements-manifest.config.js'",
"storybook": "storybook dev -p 6006",
Expand All @@ -9,7 +11,10 @@
"predist": "npm run cem && npm run build-storybook",
"dist": "node lib/esbuild.config.js",
"prerelease": "npm run dist",
"release": "semantic-release --debug=true"
"release": "semantic-release --debug=true",
"generate:primer": "node lib/cli.js generate-vars-primer",
"generate:fixtures": "node lib/cli.js generate-fixtures-github",
"generate": "npm run generate:primer && npm run generate:fixtures && npm run cem"
},
"type": "module",
"version": "0.0.0",
Expand All @@ -23,17 +28,26 @@
"files": [
"dist",
"lib",
"src",
"custom-elements.json",
"README.md",
"LICENSE"
],
"exports": {
"./*.js": {
"import": "./dist/*.js"
},
"./utils/github/*.js" : {
"import": "./src/github/utils/*.js"
}
},
"license": "MIT",
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.8.4",
"@custom-elements-manifest/to-markdown": "^0.1.0",
"@primer/css": "^21.0.8",
"@primer/css": "^21.0.9",
"@primer/octicons": "^19.7.0",
"@primer/primitives": "^7.12.0",
"@primer/primitives": "^7.13.0",
"commander": "^11.0.0",
"esbuild": "^0.19.2",
"esbuild-plugin-inline-import": "^1.0.1",
Expand Down
7 changes: 4 additions & 3 deletions src/github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ Includes two web components:

## User

### @todo
### Usage

- [ ] container queries
```html
<github-user username="scottnath" fetch="true"></github-user>
```

## Repository

### @todo

- [ ] container queries
- [ ] repo language colors
- need to expand on the `getCircle` function to include the top X languages on GH
- need a way to expand the available colors
Expand Down
24 changes: 12 additions & 12 deletions src/github/fixtures/generated/repo--freeCodeCamp-freeCodeCamp.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,28 @@
"releases_url": "https://api.github.com/repos/freeCodeCamp/freeCodeCamp/releases{/id}",
"deployments_url": "https://api.github.com/repos/freeCodeCamp/freeCodeCamp/deployments",
"created_at": "2014-12-24T17:49:19Z",
"updated_at": "2023-09-05T17:40:45Z",
"pushed_at": "2023-09-05T16:21:09Z",
"updated_at": "2023-09-13T23:27:20Z",
"pushed_at": "2023-09-13T16:20:11Z",
"git_url": "git://github.com/freeCodeCamp/freeCodeCamp.git",
"ssh_url": "[email protected]:freeCodeCamp/freeCodeCamp.git",
"clone_url": "https://github.com/freeCodeCamp/freeCodeCamp.git",
"svn_url": "https://github.com/freeCodeCamp/freeCodeCamp",
"homepage": "http://contribute.freecodecamp.org/",
"size": 387341,
"stargazers_count": 372799,
"watchers_count": 372799,
"size": 387674,
"stargazers_count": 373581,
"watchers_count": 373581,
"language": "TypeScript",
"has_issues": true,
"has_projects": true,
"has_downloads": true,
"has_wiki": false,
"has_pages": true,
"has_discussions": false,
"forks_count": 33412,
"forks_count": 33500,
"mirror_url": null,
"archived": false,
"disabled": false,
"open_issues_count": 262,
"open_issues_count": 251,
"license": {
"key": "bsd-3-clause",
"name": "BSD 3-Clause \"New\" or \"Revised\" License",
Expand Down Expand Up @@ -116,9 +116,9 @@
"teachers"
],
"visibility": "public",
"forks": 33412,
"open_issues": 262,
"watchers": 372799,
"forks": 33500,
"open_issues": 251,
"watchers": 373581,
"default_branch": "main",
"temp_clone_token": null,
"organization": {
Expand All @@ -141,6 +141,6 @@
"type": "Organization",
"site_admin": false
},
"network_count": 33412,
"subscribers_count": 8459
"network_count": 33500,
"subscribers_count": 8467
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,22 @@
"releases_url": "https://api.github.com/repos/scottnath/profile-components/releases{/id}",
"deployments_url": "https://api.github.com/repos/scottnath/profile-components/deployments",
"created_at": "2023-08-16T13:36:29Z",
"updated_at": "2023-08-16T13:36:29Z",
"pushed_at": "2023-08-16T13:36:29Z",
"updated_at": "2023-09-13T20:08:49Z",
"pushed_at": "2023-09-13T20:23:53Z",
"git_url": "git://github.com/scottnath/profile-components.git",
"ssh_url": "[email protected]:scottnath/profile-components.git",
"clone_url": "https://github.com/scottnath/profile-components.git",
"svn_url": "https://github.com/scottnath/profile-components",
"homepage": null,
"size": 2,
"stargazers_count": 0,
"watchers_count": 0,
"language": null,
"size": 4329,
"stargazers_count": 1,
"watchers_count": 1,
"language": "JavaScript",
"has_issues": true,
"has_projects": true,
"has_projects": false,
"has_downloads": true,
"has_wiki": true,
"has_pages": false,
"has_wiki": false,
"has_pages": true,
"has_discussions": false,
"forks_count": 0,
"mirror_url": null,
Expand All @@ -101,7 +101,7 @@
"visibility": "public",
"forks": 0,
"open_issues": 0,
"watchers": 0,
"watchers": 1,
"default_branch": "main",
"temp_clone_token": null,
"network_count": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@
"deployments_url": "https://api.github.com/repos/scottnath/scottnath.com/deployments",
"created_at": "2023-07-03T16:45:49Z",
"updated_at": "2023-08-16T20:18:19Z",
"pushed_at": "2023-09-04T20:12:01Z",
"pushed_at": "2023-09-12T19:33:37Z",
"git_url": "git://github.com/scottnath/scottnath.com.git",
"ssh_url": "[email protected]:scottnath/scottnath.com.git",
"clone_url": "https://github.com/scottnath/scottnath.com.git",
"svn_url": "https://github.com/scottnath/scottnath.com",
"homepage": "https://scottnath.com",
"size": 3052,
"size": 3093,
"stargazers_count": 0,
"watchers_count": 0,
"language": "HTML",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@
"deployments_url": "https://api.github.com/repos/storydocker/storydocker/deployments",
"created_at": "2023-04-03T12:11:02Z",
"updated_at": "2023-08-16T20:18:32Z",
"pushed_at": "2023-09-05T16:44:30Z",
"pushed_at": "2023-09-12T10:26:37Z",
"git_url": "git://github.com/storydocker/storydocker.git",
"ssh_url": "[email protected]:storydocker/storydocker.git",
"clone_url": "https://github.com/storydocker/storydocker.git",
"svn_url": "https://github.com/storydocker/storydocker",
"homepage": "",
"size": 2233,
"size": 1599,
"stargazers_count": 1,
"watchers_count": 1,
"language": "JavaScript",
Expand Down
6 changes: 3 additions & 3 deletions src/github/fixtures/generated/user--scottnath.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
"location": "New York",
"email": null,
"hireable": true,
"bio": "Front-end UI DevOps architect. Efficiency in all things and productivity will follow.",
"bio": "Front-end UI DevOps architect. Efficiency in all things and productivity will follow. former IBM, NBCUniversal",
"twitter_username": null,
"public_repos": 126,
"public_repos": 130,
"public_gists": 24,
"followers": 10,
"following": 12,
"created_at": "2010-03-06T01:59:25Z",
"updated_at": "2023-08-16T17:52:26Z"
"updated_at": "2023-09-05T23:33:42Z"
}
4 changes: 2 additions & 2 deletions src/github/fixtures/generated/user--sindresorhus.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"twitter_username": "sindresorhus",
"public_repos": 1071,
"public_gists": 96,
"followers": 57872,
"followers": 58014,
"following": 53,
"created_at": "2009-12-20T22:57:02Z",
"updated_at": "2023-09-03T12:15:39Z"
"updated_at": "2023-09-12T05:57:55Z"
}
19 changes: 10 additions & 9 deletions src/github/styles/vars-primer.css

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

Loading

0 comments on commit c438ea7

Please sign in to comment.