{"id":13453660,"url":"https://github.com/hatashiro/pen","last_synced_at":"2025-04-08T03:13:37.451Z","repository":{"id":57321887,"uuid":"42352955","full_name":"hatashiro/pen","owner":"hatashiro","description":"We need a better Markdown previewer.","archived":false,"fork":false,"pushed_at":"2020-09-24T16:07:01.000Z","size":705,"stargazers_count":326,"open_issues_count":2,"forks_count":15,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-29T20:10:22.527Z","etag":null,"topics":["javascript","markdown","react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hatashiro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-12T10:18:00.000Z","updated_at":"2024-07-24T09:33:36.000Z","dependencies_parsed_at":"2022-08-25T21:01:14.596Z","dependency_job_id":null,"html_url":"https://github.com/hatashiro/pen","commit_stats":null,"previous_names":["noraesae/pen","utatti/pen"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatashiro%2Fpen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatashiro%2Fpen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatashiro%2Fpen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatashiro%2Fpen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hatashiro","download_url":"https://codeload.github.com/hatashiro/pen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767236,"owners_count":20992548,"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":["javascript","markdown","react"],"created_at":"2024-07-31T08:00:45.179Z","updated_at":"2025-04-08T03:13:37.432Z","avatar_url":"https://github.com/hatashiro.png","language":"JavaScript","readme":"\u003ch1\u003e\u003cimg src='media/logo.png' alt='logo' width='200'/\u003e\u003c/h1\u003e\n\n\u003e We need a better Markdown previewer.\n\n[![travis](https://travis-ci.org/utatti/pen.svg)](https://travis-ci.org/utatti/pen)\n\n`pen` is a Markdown previewer written in JavaScript, aiming to *just work*.\n\nThere are literally tons of Markdown previewers out there. I love some of them,\nI even made [one](https://github.com/utatti/orange-cat) of them. Nevertheless,\nwe always need a better one, don't we?\n\nUsing `pen` is super simple, we don't need to install any special editor or\nlaunch any GUI application. `pen` is just a tidy command-line tool. You can use\nyour favourite editor and browser. No manual refresh is even needed.\n\nAlso, the previewer renders the content using [React](https://facebook.github.io/react/).\nIt means that it will not re-render entire DOM when the document is updated.\nThis is a huge advantage because images or other media won't be reloaded for\nthe DOM update.\n\nI personally love to use `pen`, and I hope you love it too. :black_nib:\n\n## Demo\n\nHere is a short demo showing how awesome `pen` is.\n\n![demo](https://cloud.githubusercontent.com/assets/1013641/9977359/21b79f66-5f3f-11e5-860a-cf19b2287009.gif)\n\nThe following demo shows `pen` incrementally updates only modified part using\n[React](https://facebook.github.io/react/) and its [Reconciliation](https://reactjs.org/docs/reconciliation.html).\n\n![incremental update](https://cloud.githubusercontent.com/assets/1013641/11914823/896591ba-a6cd-11e5-94ee-05e3ab50413b.gif)\n\n## Requirement\n\n`pen` uses [Node.js \u003e= 4.0](https://nodejs.org/en/docs/es6/). It may not work\non earlier versions.\n\n## Install\n\nUsing [npm](http://npmjs.com):\n\n```shell\nnpm i -g pen\n```\n\nYou can try using `pen` with `npx`:\n\n```shell\nnpx pen\n```\n\n## Usage\n\nTo use `pen`, simply run the `pen` command.\n\n```shell\npen README.md\n```\n\nThe command above will launch a `pen` server and open the file in your default\nbrowser. The server will listen to a 6060 port by default. To be honest, you\ndon't even need to launch it with a filename. You can manually open\nhttp://localhost:6060/README.md, or any other files in the same directory.\n\nTo stop the server, enter `^C`.\n\nFor the further details of the `pen` command, please enter `pen -h` or `pen\n--help`.\n\n### Pandoc\n\nPen uses [markdown-it](https://github.com/markdown-it/markdown-it) as Markdown\nparser by default, but it also supports Pandoc. Please provide [a proper Pandoc\nformat](http://pandoc.org/MANUAL.html#general-options) for the value.\n\n```shell\npen --pandoc gfm README.md\n```\n\n## Contribution\n\nI welcome every contribution on `pen`. You may start from forking and cloning\nthis repo.\n\n```shell\ngit clone git@github.com:your_username/pen.git\ncd pen\n\n# Install dependencies\nnpm i\n\n# Lint, build, and test pen codes at once\nnpm test\n```\n\nTo build frontend scripts:\n\n```shell\nnpm run build\n```\n\nTo lint with [ESLint](http://eslint.org):\n\n```shell\nnpm run lint\n```\n\nTo test with [Mocha](http://mochajs.org)\n\n```shell\nnpm run mocha\n```\n\n## License\n\nPen is released under the [MIT License](LICENSE).\n","funding_links":[],"categories":["Packages","react","包"],"sub_categories":["Command-line apps","命令行程序"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhatashiro%2Fpen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhatashiro%2Fpen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhatashiro%2Fpen/lists"}