{"id":16682576,"url":"https://github.com/jchip/create-my-card","last_synced_at":"2025-03-21T18:32:46.976Z","repository":{"id":66137285,"uuid":"162863987","full_name":"jchip/create-my-card","owner":"jchip","description":"create your personal npm card with npm init","archived":false,"fork":false,"pushed_at":"2019-01-03T23:58:27.000Z","size":2046,"stargazers_count":31,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T03:51:24.267Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jchip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-23T05:07:54.000Z","updated_at":"2021-07-01T20:29:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"ba2b3a58-3d79-4604-8af5-c77c74b4ba26","html_url":"https://github.com/jchip/create-my-card","commit_stats":{"total_commits":37,"total_committers":2,"mean_commits":18.5,"dds":"0.027027027027026973","last_synced_commit":"3bb18b4dbe64c0c324a3863e162e792de1f54ef1"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchip%2Fcreate-my-card","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchip%2Fcreate-my-card/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchip%2Fcreate-my-card/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchip%2Fcreate-my-card/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jchip","download_url":"https://codeload.github.com/jchip/create-my-card/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244849049,"owners_count":20520635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T14:07:58.589Z","updated_at":"2025-03-21T18:32:46.957Z","avatar_url":"https://github.com/jchip.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# create-my-card\n\nAllow you to create your personal [npm] card started by [Tierney (@bitandbang)] with `npm init my-card`.\n\nYour card's code is bundled into a single JS file with webpack so it has no dependencies.\n\nA static HTML version of your card is also generated in `index.html`. You can see it with [unpkg].\n\nie: \u003chttps://unpkg.com/jchip\u003e\n\n# Usage\n\n## Init\n\n```\nnpm init my-card\n```\n\nAfter answering the questions, it should create a new directory with the code to publish your [npm] card.\n\n\u003e If your current directory is already named the same as `\u003cmy-card-repo-name\u003e`, then no new directory is created.\n\n## Test\n\n```\ncd \u003cmy-card-repo-name\u003e\nnpm install\nnode src/card\n```\n\nIf you want to modify your card info and display, see [customizing](#customizing) for details.\n\n## GitHub Push\n\nTo push your repo to your github account:\n\n- First create an empty repo on github with the same repo name.\n- Then run the following commands:\n\n```\ngit init\ngit add .\ngit commit -m \"first commit\"\ngit remote add origin git@github.com:\u003cyour-github-id\u003e/\u003cyour-repo-name\u003e.git\ngit push --set-upstream origin master\n```\n\n## Publish\n\nYour [npm] card package is published with a single JS bundle that's created with webpack so there's no dependencies.\n\n### First Version\n\nThe very first time you publish your card, do a `npm version major` to bring your package version to `1.0.0`.\n\n```\nnpm version major\nnpm publish\n```\n\n### Update Versions\n\nTo publish patches to your card, do a `npm version patch`.\n\n```\nnpm version patch\nnpm publish\n```\n\n### Push version commit and tag\n\nAfter you update your package version and published to npm, you should push the version commit and tag.\n\nYou can do it with:\n\n```\ngit push origin --tags :\n```\n\nOr two separate git pushes:\n\n```\ngit push\ngit push --tags\n```\n\n## Customizing\n\nYour card info and data are saved to your `package.json` as `myCard`.\n\n- `myCard.info` contains the info you entered.\n- `myCard.data` is an array containing the lines for your card.\n\nEach line can be a string or an object.\n\n- If it's a string, then it's used directly to render the line.\n\n- If it's an object, then it should follow this format:\n\n```js\n      {\n        \"label\": \"GitHub\",\n        \"text\": \"https://github.com/\u003cgreen\u003e{{github}}\u003c/\u003e\",\n        \"when\": \"{{github}}\"\n      }\n```\n\nWhere:\n\n- `label` The label for the line.\n  - If this is missing, then only `text` is used to render the line.\n  - If it's an empty string, `\"\"`, then no label but `text` is aligned with `text` of other lines.\n- `text` The text for the line.\n- `when` Turn off displaying the line if it process to an empty string `\"\"`.\n\nOptionals:\n\n- `pad` The built-in renderer automatically add enough spaces to align all labels on the right. You can provide your own `pad` string override for each line.\n\n### String colors and tokens\n\nAny string in the data lines can contain color markers enabled by [chalker] or tokens.\n\n- Color markers has the `\u003cred\u003ered text\u003c/red\u003e` format. You can use any valid methods [chalk] supports.\n\n  - For example, `\u003cblue.bold\u003eblue bold text\u003c/blue.bold\u003e` will colorize `blue bold text` with `chalk.blue.bold`.\n  - Closing marker can be simply `\u003c/\u003e`\n  - See [chalker] for more info on color markers.\n\n- Tokens has the `{{github}}` format. The token string reference what's in `myCard.info`.\n\n### Roll your own renderer\n\nIf you prefer to implement your own JavaScript renderer, you can replace the code in the `src` directory. Put your code in the main file `card.js` and you can utilize the webpack bundling logic to publish your card without dependencies.\n\n# Demo\n\n## Initializing Card\n\n\u003e Demo is using [fyn] to install dependencies.\n\n![Initialize Card][init-your-card]\n\n## Pushing to GitHub\n\nCreate empty repo:\n\n![Create empty repo][create-empty-repo]\n\nPush repo:\n\n![Push repo][push-repo]\n\n## Publish to [npm]\n\nPublish first verion (using `npm version major`)\n\n![Publish first version][publish-1]\n\nScrolling down:\n\n![Publish scroll down][publish-2]\n\nAnd profit, also remember to push version tag \u0026 commit to github with `git push origin --tags :`\n\n![npx][npx]\n\n# License\n\nCopyright (c) 2018-present, Joel Chen\n\nLicensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).\n\n---\n\n[create-empty-repo]: ./images/new-repo.png\n[push-repo]: ./images/push-repo.png\n[init-your-card]: ./images/demo1.png\n[publish-1]: ./images/publish-1.png\n[publish-2]: ./images/publish-2.png\n[npx]: ./images/npx.png\n[npm]: https://www.npmjs.com/\n[fyn]: https://www.npmjs.com/package/fyn\n[tierney (@bitandbang)]: https://www.npmjs.com/package/bitandbang\n[chalk]: https://www.npmjs.com/package/chalk\n[chalk advanced colors]: https://github.com/chalk/chalk#256-and-truecolor-color-support\n[unpkg]: https://unpkg.com\n[chalker]: https://www.npmjs.com/package/chalker\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjchip%2Fcreate-my-card","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjchip%2Fcreate-my-card","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjchip%2Fcreate-my-card/lists"}