Coder Social home page Coder Social logo

dimkk / preact-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lukeed/preact-starter

0.0 1.0 0.0 670 KB

Webpack3 boilerplate for building SPA / PWA / offline front-end apps with Preact

Home Page: https://preact-starter.now.sh/

License: MIT License

JavaScript 69.35% HTML 6.99% CSS 23.66%

preact-starter's Introduction

preact-starter

Webpack3 boilerplate for building SPA / PWA / offline front-end apps with โš›๏ธ Preact

Using preact-starter will kickstart your next application! ๐Ÿ’ฏ It is designed to fit the "90% use-case" for those who want to build offline-first web apps (see features below).

๐Ÿšฉ Important: This is meant for client-side apps only; there is no support included for universal / server-side rendering. I plan to release my own SSR kit shortly!

Please note: Boilerplate does not incorporate the latest "css-in-js" or "css modules" technique. Instead, the more traditional approach is taken, wherein styles and scripts are kept separate. That said, you may certainly and easily take that route if desired. โœ…


โš ๏ธ Boilerplate & commands will evolve as my own development process does. โš ๏ธ


Install

git clone https://github.com/lukeed/preact-starter
cd preact-starter
npm install
npm run build
npm start

โ— Pro Tip: Use Yarn to install dependencies 3x faster than NPM!

Features

  • Offline Caching (via serviceWorker)

  • SASS & Autoprefixer

  • Asset Versioning (aka "cache-busting")

  • ES2015 (ES6) and ES2016 (ES7) support

  • Hot Module Replacement (HMR) for all files

  • Preact's Developer Tools

  • Lighthouse certified

    lightouse

Development

Commands

Any of the following commands can (and should ๐Ÿ˜‰) be run from the command line.

If using Yarn, all instances of npm can be replaced with yarn. ๐Ÿ‘Œ

build

$ npm run build

Compiles all files. Output is sent to the dist directory.

start

$ npm start

Runs your application (from the dist directory) in the browser.

watch

$ npm run watch

Like start, but will auto-compile & auto-reload the server after any file changes within the src directory.

Preact Developer Tools

You can inspect and modify the state of your Preact UI components at runtime using the React Developer Tools browser extension.

  1. Install the React Developer Tools extension
  2. Import the preact/devtools module in your app
  3. Reload and go to the 'React' tab in the browser's development tools

License

MIT ยฉ Luke Edwards

preact-starter's People

Contributors

jdanford avatar lukeed avatar shidhincr avatar tomwayson avatar

Watchers

 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.