svelte-parser 0.1.0

Compile Svelte code into HTML, JS, CSS for expressrs
Documentation
svelte-parser-0.1.0 has been yanked.

Svelte Parser

a Svelte Parser for the expressrs crate.

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 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(),
        }),
    );
}