mirror of
https://github.com/System-End/github-readme-stats.git
synced 2026-04-20 00:35:23 +00:00
build: create npm package (#2151)
* build: create npm package This commit makes sure that the common modules of the GRS package can be imported as an npm package. * feat: export card render functions * style: update formatting
This commit is contained in:
parent
6fdf73f39c
commit
dea583d426
5 changed files with 60 additions and 8 deletions
18
package.json
18
package.json
|
|
@ -1,9 +1,23 @@
|
|||
{
|
||||
"name": "github-readme-stats",
|
||||
"version": "1.0.0",
|
||||
"description": "Dynamically generate stats for your github readmes",
|
||||
"main": "index.js",
|
||||
"description": "Dynamically generate stats for your GitHub readme",
|
||||
"keywords": [
|
||||
"github-readme-stats",
|
||||
"readme-stats",
|
||||
"cards",
|
||||
"card-generator"
|
||||
],
|
||||
"main": "src/index.js",
|
||||
"type": "module",
|
||||
"homepage": "https://github.com/anuraghazra/github-readme-stats",
|
||||
"bugs": {
|
||||
"url": "https://github.com/anuraghazra/github-readme-stats/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/anuraghazra/github-readme-stats.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage",
|
||||
"test:watch": "node --experimental-vm-modules node_modules/jest/bin/jest.js --watch",
|
||||
|
|
|
|||
4
src/cards/index.js
Normal file
4
src/cards/index.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
export { renderRepoCard } from "./repo-card.js";
|
||||
export { renderStatsCard } from "./stats-card.js";
|
||||
export { renderTopLanguages } from "./top-languages-card.js";
|
||||
export { renderWakatimeCard } from "./wakatime-card.js";
|
||||
30
src/common/index.js
Normal file
30
src/common/index.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
export { blacklist } from "./blacklist.js";
|
||||
export { Card } from "./Card.js";
|
||||
export { createProgressNode } from "./createProgressNode.js";
|
||||
export { i18n } from "./i18n.js";
|
||||
export { icons } from "./icons.js";
|
||||
export { retryer } from "./retryer.js";
|
||||
export {
|
||||
ERROR_CARD_LENGTH,
|
||||
renderError,
|
||||
encodeHTML,
|
||||
kFormatter,
|
||||
isValidHexColor,
|
||||
parseBoolean,
|
||||
parseArray,
|
||||
clampValue,
|
||||
isValidGradient,
|
||||
fallbackColor,
|
||||
request,
|
||||
flexLayout,
|
||||
getCardColors,
|
||||
wrapTextMultiline,
|
||||
logger,
|
||||
CONSTANTS,
|
||||
CustomError,
|
||||
MissingParamError,
|
||||
measureText,
|
||||
lowercaseTrim,
|
||||
chunkArray,
|
||||
parseEmojis,
|
||||
} from "./utils.js";
|
||||
|
|
@ -414,25 +414,26 @@ function parseEmojis(str) {
|
|||
}
|
||||
|
||||
export {
|
||||
ERROR_CARD_LENGTH,
|
||||
renderError,
|
||||
kFormatter,
|
||||
encodeHTML,
|
||||
kFormatter,
|
||||
isValidHexColor,
|
||||
request,
|
||||
parseArray,
|
||||
parseBoolean,
|
||||
parseArray,
|
||||
clampValue,
|
||||
isValidGradient,
|
||||
fallbackColor,
|
||||
request,
|
||||
flexLayout,
|
||||
getCardColors,
|
||||
clampValue,
|
||||
wrapTextMultiline,
|
||||
measureText,
|
||||
logger,
|
||||
CONSTANTS,
|
||||
CustomError,
|
||||
MissingParamError,
|
||||
measureText,
|
||||
lowercaseTrim,
|
||||
chunkArray,
|
||||
parseEmojis,
|
||||
ERROR_CARD_LENGTH,
|
||||
};
|
||||
|
|
|
|||
3
src/index.js
Normal file
3
src/index.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export * from "./common/index.js";
|
||||
export * from "./cards/index.js";
|
||||
export { getStyles, getAnimations } from "./getStyles.js";
|
||||
Loading…
Add table
Reference in a new issue