0.4.0-beta.0 • Published 5 years ago

svb v0.4.0-beta.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

This is a (mildly) opinionated and very lightweight Svelte compiler/bundler, which is meant to take some of the headaches out of setting up and configuring simple Svelte projects.

Differs from Sapper, which is more of a fully baked solution which includes SSR, routing and other goodies. This is more akin to the react-scripts used in create-react-app, where all of the config is hidden away so that you can just focus on building cool Svelte apps.

Very much a work in progress right now, so feel free to contribute! We'd love to get some feedback and ideas!

Installation

Note: Currently requires NodeJS >= 10 Support for older versions will be looked at in the future.

yarn add -D svb

npm i -D svb

You could also install this globally:

yarn global add svb

npm i -g svb

This provides you with the global svb binary (as well as a svelte-bundler alias, in case you like typing).

Usage

npx svb -i [input] -o [output]

# Example
npx svb -i src/index.js -o dist/

You could also add something like this to the "scripts" section of your package.json file:

{
  "build": "svb --input src/index.js --output dist/"
}

This allows you to simply run yarn run build to compile your project.

Roadmap

This is a work in progress/the project is still in beta. Here's some stuff that I want to add/take care of:

  • Handle generation of a root index.html file
  • Watch/dev mode
  • Flag to turn off minification (?)
  • Allow some more custom configuration of rollup