Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.

ContentGamer/svelte-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Svelte Parser

a Svelte Parser for the expressrs crate.

Source code

This is a source code to get you started into making your own expressrs plugin, If you want to start making a plugin, clone this source code and make sure you have rust installed, then navigate to src/constants.rs so you can change the Name, ID (should be lowercase), and Plugin-ID into your perspective choice.

Make sure to make another parser instead of svelte, you need to be creative.

How can i use this?

First you'll need to install the expressrs crate then in your code type this:

use expressrs::ExpressLib;
use svelte_parser::svelte;

fn main() {
	let express = ExpressLib::new();
	let mut app = express();

	app.plugins.push(svelte());
	// Serve a directory called 'public' that has .svelte files
	app.serve_directory(
          "public",
          Some(DirectoryOptions {
             plugin: "svelte".to_string(),
          }),
        );
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published