-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
33,890 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export default { | ||
extends: 'storydocker-utilities/releases', | ||
branches: [ | ||
{ name: 'main', channel: 'latest', prerelease: false }, | ||
{ name: 'setup-module', channel: 'next', prerelease: true }, | ||
], | ||
debug: true, | ||
tagFormat: 'profile-components@${version}', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,17 @@ | ||
# profile-components | ||
|
||
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 | ||
|
||
## Expanding @todo | ||
|
||
- [ ] graph contrib: https://github.com/enpitsuLin/wc-github-graph/blob/master/src/github-graph.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import path from 'path' | ||
import { fileURLToPath } from 'url' | ||
|
||
/** | ||
* Helper to replace losing `__dirname` in ES Modules | ||
* @param {string} moduleUrl - the import.meta.url of file which needs the dirname | ||
* @returns | ||
*/ | ||
export const getDirName = function (moduleUrl) { | ||
const filename = fileURLToPath(moduleUrl) | ||
return path.dirname(filename) | ||
} | ||
|
||
/** | ||
* Helper to get commonly used directory paths | ||
* @returns object of directory paths | ||
*/ | ||
export const getModulePaths = function () { | ||
const __dirname = getDirName(import.meta.url); | ||
const root = path.join(__dirname, '..'); | ||
return { | ||
root, | ||
dist: path.join(root, 'dist'), | ||
lib: path.join(root, 'lib'), | ||
src: path.join(root, 'src'), | ||
} | ||
} | ||
|
||
/** | ||
* Guickie to combine a path to root | ||
* @param {string} relPath - relative path from root | ||
* @returns absolute path from root | ||
*/ | ||
export const pathFromRoot = (relPath = '') => path.join(getModulePaths().root, relPath); |
Oops, something went wrong.