Giter Site home page Giter Site logo

o-hooman / preact-typescript-webpack4-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lexey111/preact-typescript-webpack4-boilerplate

0.0 0.0 0.0 915 KB

Boileplate for Preact + Typescript + Webpack 5 + LESS

License: MIT License

Batchfile 0.92% TypeScript 43.06% HTML 13.39% JavaScript 30.01% Dockerfile 9.77% Shell 0.66% Less 2.18%

preact-typescript-webpack4-boilerplate's Introduction

Preact + Typescript + Webpack 5 + LESS + Docker / boilerplate

Preact v10.0 with hooks demo

Things under the hood:

Initial idea Dominic St-Pierre

I've tried to keep things as simple as possible.

Changelog

[16-March-2021]

  • Webpack and dependencies were upgraded to version 5
  • Typescript 4
  • LESS 4
  • TSLint replaced with ESLint
  • Syntax aligned with ESLint rules
  • Docker and docker-compose build modes were added

Installation

  1. Clone repository.
  2. Run 'npm install' in the local copy (I hope you have NodeJS and NPM installed =)
  3. Use one of:
    • npm run build for production build
    • npm run dev for development build (no minification)
    • npm run start for live server on http://localhost:3030/

Also, Windows shortcuts are here. See *.bat files.

Screenshot

screenshot

Docker

Quick start

You can just run docker_build.cmd script.

Before run please remove dist folder, if any.

Modes

Production mode (build dist folder and exit)

In root folder run docker-compose up to build the files. Result will be placed into dist folder. Stop the container afterwards.

Development + watch mode (build and watch changes)

In root folder run docker-compose -f docker-compose.watch.yml up to build the files. Result will be placed into dist folder and Webpack will start watching.

node_modules and dist folders will be mapped.

Development + devserver mode (build and run development server)

In root folder run docker-compose -f docker-compose.start.yml up to build the files. Result will be placed into dist folder and application will start watching. Webserver will be available on URL localhost:3030.

node_modules and dist folders will be mapped.

Credits

photo-camera-with-a-flash

preact-typescript-webpack4-boilerplate's People

Contributors

ajamesphillips avatar dependabot[bot] avatar lexey111 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.