Git Product home page Git Product logo

stencil-dev-server's Introduction

npm Build Status

Stencil Dev Server

This is a very simple http-server with a filewatcher and livereload built in. This server was built with the purpose of making it easy to develop stencil apps and components, but it will work with about any dev workflow.

Just provide a directory.

stencil-dev-server --root public

There are a number of options available, but all have sane defaults.

  • --root
    • The directory that should be watched and served
    • It defaults to the current directory that the command was executed from.
  • --watchGlob
    • The pattern of files to watch in the root directory for changes.
    • The glob defaults to **/**.
  • --address
    • The ip address that the server should listen to.
    • Defaults to 0.0.0.0. Point your browser to localhost.
  • --httpPort
    • The port that the http server should use. If the number provided is in use it will choose another.
    • Defaults to 3333.
  • --liveReloadPort
    • The port that the live-reload server should use. If the number provided is in use it will choose another.
    • Defaults to 35729.
  • --additionalJsScripts
    • A comma separated list of javascript files that you would like appended to all html page body tags. This allows you to expand the dev server to do additional behaviors.
  • --config
    • The path to a config file for the dev server. This allows you to keep a specific set of default parameters in a configuration file.
    • Defaults to ./stencil.config.js
  • --no-open
    • Disables automatically opening a browser.

Config File Structure

exports.devServer = {
  root: './',
  additionalJSScripts: [
    'http://localhost:3529/debug.js',
    './scripts/additionalDebug.js'
  ],
  watchGlob: '**/*'
};

stencil-dev-server's People

Contributors

jthoms1 avatar adamdbradley avatar mlynch avatar kensodemann avatar manucorporat avatar jgw96 avatar

Watchers

James Cloos avatar Joshua Skrzypek avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.