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

md-loader-webpack

v2.0.6

Published

markdown-loader for webpack

Downloads

37

Readme

项目名称

这是一个使用 Webpack 配置的项目,支持 Markdown 文件和 CSS 文件的加载。

安装

首先,克隆仓库并安装依赖:

git clone https://github.com/lwwywang/Webpack-loader-plugins.git
cd your-repo
npm install

使用

Webpack 配置

项目的 Webpack 配置文件位于webpack.config.js中

自定义 Markdown Loader

项目中包含一个自定义的 Markdown Loader,配置位于markdown-loader.js中。

我们创建了一个自定义的 Markdown Loader,用于将 Markdown 文件转换为 HTML。这个 Loader 使用了 markdown-it 库来解析和渲染 Markdown 内容,并且通过 schema-utils 库来验证用户传递的参数是否正确。

主要功能

  1. 获取参数: 使用 loader-utils 的 getOptions 方法获取用户传递的参数。

  2. 校验参数: 使用 schema-utils 库来校验用户传递的参数是否符合预期的格式。参数的校验规则定义在 schema 对象中。

  3. Markdown-it 配置: 根据用户传递的参数配置 markdown-it 实例。

  4. 渲染 Markdown: 使用配置好的 markdown-it 实例将 Markdown 内容渲染为 HTML。

运行项目

使用以下命令来构建和运行项目:

npm run build
npm start

贡献

欢迎提交问题和请求功能。如果你想贡献代码,请 fork 这个仓库并提交 pull request。

许可证

此项目使用 MIT 许可证。