Getting started with Poveste
Overview
poveste is the Romanian word for "story", pronounced
/poˈveste/(po-VES-teh). Coming from histoire? See the migration guide.
Poveste is a tool to generate stories applications (or "books").
Learn more about Poveste here »
Installation
Install the poveste and @poveste/plugin-vue packages into your project:
pnpm i -D poveste @poveste/plugin-vue
# OR
npm i -D poveste @poveste/plugin-vue
# OR
yarn add -D poveste @poveste/plugin-vueCreate a poveste.config.js or poveste.config.ts file in your project root to enable the Vue plugin:
import { HstVue } from '@poveste/plugin-vue'
import { defineConfig } from 'poveste'
export default defineConfig({
plugins: [
HstVue(),
],
})Command Line Interface
Poveste provides the following commands:
poveste dev: starts a development server with hot-reloadpoveste build: builds the app for productionpoveste preview: starts an HTTP server that serves the built app
You can add these to your package.json like this:
{
"scripts": {
"story:dev": "poveste dev",
"story:build": "poveste build",
"story:preview": "poveste preview"
}
}And then run them with npm run story:dev or npm run story:build.
You can specify additional CLI options like --port. For a full list of CLI options, run npx poveste --help in your project.
TypeScript
To enable the global components types in your project, create an env.d.ts file at the root of your project if it doesn't already exist.
/// <reference types="@poveste/plugin-vue/components" />And add it in the include field of your tsconfig.json.
Example:
{
"compilerOptions": {
"target": "es2017",
"module": "esnext",
"lib": ["esnext"],
"moduleResolution": "node",
"esModuleInterop": true,
"strict": true,
"strictNullChecks": true,
"resolveJsonModule": true,
"jsx": "preserve"
},
"include": [
"env.d.ts",
"src/**/*",
"src/**/*.vue"
]
}Nuxt
Poveste supports Nuxt 3 with the @poveste/plugin-nuxt package.
pnpm add -D @poveste/plugin-nuxtAdd the plugin in poveste config:
import { HstNuxt } from '@poveste/plugin-nuxt'
import { HstVue } from '@poveste/plugin-vue'
import { defineConfig } from 'poveste'
export default defineConfig({
plugins: [
HstVue(),
HstNuxt(),
],
})Configuration
Learn more about configuring Poveste here.
Community
If you have questions or need help, reach out to the community on GitHub Discussions.
Try it in a live editor