npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

chatgpt-markdow-to-code

v1.0.5

Published

A tool to convert code blocks in markdown files to separate coding files.

Downloads

2

Readme

Markdown to Code Converter

A Node.js tool to convert code blocks in a markdown file to separate coding files. This tool extracts code blocks from a markdown file, saves them to specified file paths, and supports multiple programming languages.

Features

  • Extracts code blocks from markdown files.
  • Saves code blocks to specified file paths.
  • Supports multiple programming languages.
  • Automatically fixes linting issues and runs tests before committing using Husky and Lint-Staged.
  • Publishes the package to npm when a new release is created.

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/your-repo.git
    cd your-repo
  2. Install dependencies:

    npm install

Usage

Command Line

Run the tool using the following command:

node dist/main.js --file <markdown-file> --output <output-directory>

Example:

node dist/main.js --file example.md --output output

Example Markdown File

# Example Markdown

Here is some JavaScript code:

**scripts/hello.js**:
```javascript
console.log('Hello, world!');

Here is some Python code:

scripts/hello.py:

print('Hello, world!')

## Development

### Build

To compile the TypeScript code to JavaScript:

```bash
npm run build

Lint

To run ESLint:

npm run lint

To automatically fix linting issues:

npm run lint:fix

Test

To run the test suite:

npm test

Contributing

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix (git checkout -b my-new-feature).
  3. Commit your changes (git commit -am 'Add new feature').
  4. Push to the branch (git push origin my-new-feature).
  5. Create a new Pull Request.

Publishing

This project uses GitHub Actions to automatically publish the package to npm when a new release is created. Ensure you have the NPM_TOKEN secret set up in your GitHub repository settings.

  1. Create a new release on GitHub.
  2. The GitHub Action will run tests, lint the code, and publish the package to npm.

License

This project is licensed under the MIT License - see the LICENSE file for details.