0.1.7 • Published 11 months ago

@m4rch/sv v0.1.7

Weekly downloads
-
License
Unlicense
Repository
github
Last release
11 months ago

@m4rch/sv

this is a package for file-serving with automatically added live-reload functionality

usage

cli

$ sv --help
  Description
    quickly serve and live-reload a folder for development.

  Usage
    $ sv [dir] [options]

  Options
    -p, --port        specify the port  (default 4000)
    -o, --open        open the website in a browser
    -s, --static      disable live-reloading and content updates
    -d, --list-dir    always list directories
    -v, --version     Displays current version
    -h, --help        Displays this message

  Examples
    $ sv dist
    $ sv -p 5000

api

you can import the serve function via

import serve from "@m4rch/sv"

the serve function takes an object as the only argument.

interface options {
	dir: string // the directory you want to serve
	port: number // the port of the wished service
	wsPort: number // the port of the live-reload socket
	static?: boolean // whether or not to live-reload,
	listDir?: boolean // whether or not to always list directories
}

credit

the ui is heavily inspired by the sirv-cli

0.1.7

11 months ago

0.1.6

12 months ago

0.1.5

1 year ago

0.1.4

3 years ago

0.1.2

3 years ago

0.1.3

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago