Skip to content

pacificpelican/web-component-boilerplate

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

web-component-boilerplate


Licensed under ISC License copyright (c) 2020 Dan McKeown.

Table Of Contents

Baloo

features

This project provides the following features:

  • Starter for new component-powered web projects powered by Preact and htm
  • Bundles dependencies using Snowpack
  • To deploy this site, upload the index.html and the static, src, and web_modules directories to your server and serve it as static html

quickstart

=== download and build

  1. git clone git-url-here
  2. cd web-component-boilerplate
  3. npm install
  4. npm run build

=== serve the site

  1. npm run start (defaults to using the serve tool but you can serve the site with your preferred static site server)
  2. open [http://localhost:5000](http://localhost:5000) (to visit the server)

requirements

  • NodeJS
  • NPM

installation

  • Check NodeJS version: node --version
  • Check NPM version: npm --version
  • Clone the Git repo: git clone <repo-url>

usage

  • Use the code as a scaffold for creating a new site (for example edit app.js or create a new component to import into index.js)
  • Make sure to upload the index.html, /src directory, /static directory, and the /web_modules directory to your live site when you deploy
  • By convention, non-code assets like images can be stored in the /static directory and referenced directly

demo-app