jaspr create command initializes a new Jaspr project with your chosen configuration.
Basic Usage
Project Presets
Configure your project’s rendering mode, routing, and features during creation.Rendering Mode
Choose the rendering mode for your project.Options:
static- Build a statically pre-rendered siteserver- Build a server-rendered siteclient- Build a purely client-rendered site
- Static
- Server
- Client
Pre-renders all routes at build time. Best for:
- Marketing sites
- Blogs and documentation
- Sites with known routes
Routing Strategy
Choose how routing is handled in your application.Options:
none- No preconfigured routingmulti-page- Server-side routing (recommended for server/static modes)single-page- Client-side routing (for SPAs)
Multi-page routing is only available in
server and static modes. Client mode can use single-page or none.Flutter Support
Configure Flutter integration for your project.Options:
none- No Flutter supportembedded- Embed a Flutter app within your siteplugins-only- Enable Flutter web plugins without embedding
Embedded Flutter
Embedded Flutter
Embeds a complete Flutter application within your Jaspr site.Use cases:
- Mixing Jaspr pages with Flutter widgets
- Gradual migration from Flutter Web
- Rich interactive components
Plugins Only
Plugins Only
Enables use of Flutter web plugins without embedding the full Flutter runtime.Use cases:
- Using Flutter packages (e.g., url_launcher, shared_preferences)
- Lighter weight than full embedding
Backend Framework
Choose a custom backend framework (only valid in server mode).Options:
none- Use Jaspr’s built-in servershelf- Integrate with the Shelf package
The
--backend option is only available when --mode is set to server.Templates
Use a predefined template instead of the default scaffold.Available templates:
docs- A template for creating documentation sites with jaspr_content
Documentation Template
Create a documentation site withjaspr_content:
- Pre-configured
jaspr_contentpackage - Documentation-optimized layout
- Navigation and search
- Markdown content support
Additional Options
Run
dart pub get after creating the project.Enable verbose logging during project creation.
Output Example
Project Structure
The generated project structure varies based on your configuration:- Server Mode
- Static Mode
- Client Mode
Complete Examples
Validation Rules
Next Steps
After creating your project:Start the development server
Build for production
Quick Start Guide
Learn more about building your first Jaspr application