diff --git a/README.md b/README.md index c51b6b0..fc6d193 100644 --- a/README.md +++ b/README.md @@ -1,94 +1,131 @@ - +
-# My Module +

+ + Nuxt Excalidraw is released under the MIT license. + + + Nuxt Excalidraw is released under the MIT license. + + + npm downloads/month + + PRs welcome! +

-[![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] +
+
+ + Product showcase + +
+

+ Add the amazing Excalidraw on your Nuxt 3 project. +

+
+
+
-My new Nuxt module for doing amazing things. +

â–ķïļ See Excalidraw demo

-- [âœĻ  Release Notes](/CHANGELOG.md) - - +
-## Features +## 📌 Features - -- ⛰  Foo -- 🚠  Bar -- ðŸŒē  Baz +You can use following APIs: -## Quick Setup +- ✅ [Props](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/props/) +- 🚧 [Children Components](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/children-components) +- 🚧 [Utils](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/utils) +- 🚧 [Constants](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/constants) +- 🚧 [Creating Elements programmatically](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/excalidraw-element-skeleton) -1. Add `my-module` dependency to your project +Feel free to contribute and get in touch. + +## ⚡ Quick Setup + +Add `nuxt-excalidraw` dependency to your project ```bash # Using pnpm -pnpm add -D my-module +pnpm add -D nuxt-excalidraw # Using yarn -yarn add --dev my-module +yarn add --dev nuxt-excalidraw # Using npm -npm install --save-dev my-module +npm install --save-dev nuxt-excalidraw ``` -2. Add `my-module` to the `modules` section of `nuxt.config.ts` +Add `nuxt-excalidraw` to the `modules` section of `nuxt.config.ts` ```js export default defineNuxtConfig({ modules: [ - 'my-module' + 'nuxt-excalidraw', + // other modules ] }) ``` -That's it! You can now use My Module in your Nuxt app âœĻ - -## Development - -```bash -# Install dependencies -npm install - -# Generate type stubs -npm run dev:prepare +ðŸŠķ No configuration is necessary -# Develop with the playground -npm run dev +## ðŸ‘Ģ Usage -# Build the playground -npm run dev:build +The module injects a component called `ExcalidrawBoard` in your NuxtApp. -# Run ESLint -npm run lint +The basicest use of it is: -# Run Vitest -npm run test -npm run test:watch +```vue + -# Release new version -npm run release + ``` - -[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 +It is important that you load the component once browser APIs are available. + +### Using Props + +If you want to use, for example, Excalidraw props [`initialData`](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/props/initialdata) and [`onChange`](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/props/#onchange), you can do it as following: + +```vue + + + +``` -[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 +
-[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js -[nuxt-href]: https://nuxt.com +- [âœĻ Release Notes](/CHANGELOG.md) +- [ðŸĪ Contributing](/CONTRIBUTING.md)