Giter Site home page Giter Site logo

build-scripts-web's Introduction

Build Scripts for Web

This package is a work in progress, not all advertised functionality is present.

An opinionated set of build scripts created to decrease maintenance burden and project boilerplate. Can be used via CLI and Gulp.

As an opinionated project the following is assumed and required;

  • Standards First
    Strictly adheres to web standards where possible. Derivations from the standards that run currently may break.
  • TypeScript
    JavaScript files are always ignored. TSX (JSX) syntax transforms are unsupported as it is an unofficial syntactic sugar.
  • ES2020 Syntax

In exchange for the above limitations the following capabilities are offered;

  • Optimised Bundles
    Multiple bundle configurations are generated and then picked based on feature detection results. Bundle selection logic is designed to have minimal impact on newer browsers.
  • ...

TypeScript

A TypeScript configuration is provided that cannot be overridden. For the purposes of allowing proper IDE integrations however a stub tsconfig.json file may be created that extends the package provided configuration.

The TypeScript version is determined by this package.

Working with TSX (JSX)

While this syntax is unsupported the same outcome can be achieved with relative ease.

import { h, render } from "preact";
const app = h(
    // Component type
    "h1",
    // Props
    null,
    // Children (a rest param)
    "Hello World!"
);
render(app, document.body);

Some changes may occur here as React attempting to optimise the JSX transformation, which will likely in time ripple out to the rest of the ecosystem.

Notes

  1. TypeScript: From source to TypeScript output folder
  2. Rollup: From TypeScipt output to destination folder

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.