-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5b90de6
commit b655402
Showing
1 changed file
with
30 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,91 +1,84 @@ | ||
<!-- | ||
Get your module up and running quickly. | ||
Find and replace all on all files (CMD+SHIFT+F): | ||
- Name: My Module | ||
- Package name: my-module | ||
- Description: My new Nuxt module | ||
--> | ||
|
||
# My Module | ||
# Nuxt Single File | ||
|
||
[![npm version][npm-version-src]][npm-version-href] | ||
[![npm downloads][npm-downloads-src]][npm-downloads-href] | ||
[![License][license-src]][license-href] | ||
[![Nuxt][nuxt-src]][nuxt-href] | ||
|
||
My new Nuxt module for doing amazing things. | ||
Build your Nuxt app into a single HTML file by inlining all your CSS and JavaScript. | ||
|
||
- [✨ Release Notes](/CHANGELOG.md) | ||
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/my-module?file=playground%2Fapp.vue) --> | ||
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/nuxt-singlefile?file=playground%2Fapp.vue) --> | ||
<!-- - [📖 Documentation](https://example.com) --> | ||
|
||
## Features | ||
|
||
<!-- Highlight some of the features your module provide here --> | ||
<!-- ## Features | ||
- ⛰ Foo | ||
- 🚠 Bar | ||
- 🌲 Baz | ||
- 🌲 Baz --> | ||
|
||
## Motivation | ||
|
||
This module has been heavily inspired by [vite-plugin-singlefile](https://github.com/richardtallent/vite-plugin-singlefile), and aims to provide the same functionality for Nuxt. It is currently in a very early stage, and is not recommended for production use. | ||
|
||
## Quick Setup | ||
|
||
1. Add `my-module` dependency to your project | ||
1. Add `nuxt-singlefile` dependency to your project | ||
|
||
```bash | ||
# Using pnpm | ||
pnpm add -D my-module | ||
pnpm add -D nuxt-singlefile | ||
|
||
# Using yarn | ||
yarn add --dev my-module | ||
yarn add --dev nuxt-singlefile | ||
|
||
# Using npm | ||
npm install --save-dev my-module | ||
npm install --save-dev nuxt-singlefile | ||
``` | ||
|
||
2. Add `my-module` to the `modules` section of `nuxt.config.ts` | ||
2. Add `nuxt-singlefile` to the `modules` section of `nuxt.config.ts` | ||
|
||
```js | ||
export default defineNuxtConfig({ | ||
modules: ["my-module"], | ||
modules: ["nuxt-singlefile"], | ||
}); | ||
``` | ||
|
||
That's it! You can now use My Module in your Nuxt app ✨ | ||
That's it! You can now use Nuxt Single File in your Nuxt app ✨ | ||
|
||
## Development | ||
|
||
```bash | ||
# Install dependencies | ||
npm install | ||
pnpm install | ||
|
||
# Generate type stubs | ||
npm run dev:prepare | ||
pnpm run dev:prepare | ||
|
||
# Develop with the playground | ||
npm run dev | ||
pnpm run dev | ||
|
||
# Build the playground | ||
npm run dev:build | ||
pnpm run dev:build | ||
|
||
# Run ESLint | ||
npm run lint | ||
pnpm run lint | ||
|
||
# Run Vitest | ||
npm run test | ||
npm run test:watch | ||
pnpm run test | ||
pnpm run test:watch | ||
|
||
# Release new version | ||
npm run release | ||
pnpm run release | ||
``` | ||
|
||
<!-- Badges --> | ||
|
||
[npm-version-src]: https://img.shields.io/npm/v/my-module/latest.svg?style=flat&colorA=18181B&colorB=28CF8D | ||
[npm-version-href]: https://npmjs.com/package/my-module | ||
[npm-downloads-src]: https://img.shields.io/npm/dm/my-module.svg?style=flat&colorA=18181B&colorB=28CF8D | ||
[npm-downloads-href]: https://npmjs.com/package/my-module | ||
[license-src]: https://img.shields.io/npm/l/my-module.svg?style=flat&colorA=18181B&colorB=28CF8D | ||
[license-href]: https://npmjs.com/package/my-module | ||
[npm-version-src]: https://img.shields.io/npm/v/nuxt-singlefile/latest.svg?style=flat&colorA=18181B&colorB=28CF8D | ||
[npm-version-href]: https://npmjs.com/package/nuxt-singlefile | ||
[npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-singlefile.svg?style=flat&colorA=18181B&colorB=28CF8D | ||
[npm-downloads-href]: https://npmjs.com/package/nuxt-singlefile | ||
[license-src]: https://img.shields.io/npm/l/nuxt-singlefile.svg?style=flat&colorA=18181B&colorB=28CF8D | ||
[license-href]: https://npmjs.com/package/nuxt-singlefile | ||
[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js | ||
[nuxt-href]: https://nuxt.com |