Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kazzkiq/svelte-brunch

Compile Svelte components inside Brunch projects
https://github.com/kazzkiq/svelte-brunch

brunch brunch-plugin svelte

Last synced: 26 days ago
JSON representation

Compile Svelte components inside Brunch projects

Awesome Lists containing this project

README

        

[![npm version](https://badge.fury.io/js/svelte-brunch.svg)](https://badge.fury.io/js/svelte-brunch)

# Installation

1. Inside your project, simply run: `npm install --save-dev svelte-brunch`
2. Thats it.

This plugin listen for any `.svelte` file in your project and compiles it with your JavaScript.

Here is an example of how to import a component to your page (using ES6):

```js
// initialize.js
// importing mycomponent.svelte file
import MyComponent from './path/to/mycomponent' // notice how we omit the '.svelte' extension

const mycomp = new MyComponent({
// Svelte opts, etc...
});
```