Git Product home page Git Product logo

ui-starter's Introduction

ui-starter

Micro UI project starter, built on top of my micro JS project starter. Quickly get up and running with a decent browser app setup -- a scratchpad of sorts -- with pre-wired unit testing, a JS module system, linting, ES6, SCSS compilation, and autoprefixer.

Assumes npm for package management; uses webpack to bundle and serve, mocha for tests, eslint to lint, and babel to compile to JS anything you can throw at babel (e.g. ES6, JSX). Swapping out parts is easy too.

Note: to facilitate easy/rapid development this leverages webpack's CSS bundling -- the CSS is inlined in the JS bundle, then injected as a stylesheet into the DOM -- IDK about you but I wouldn't use that in a real project! #tradeoffs

Do it live

git clone https://github.com/stuartsan/ui-starter $WHATEVER
cd $WHATEVER

Optionally wipe out this starter project's history and initialize a new repo:

rm -rf .git/ && git init

Then grab stuff:

npm install

And do stuff:

npm test: run unit tests once

npm run test-watch: run unit tests once, watches files, runs on change

npm run lint: run eslint

npm run bundle: bundle JS/CSS for browser, output goes to public/bundle.js.

npm run serve: (best command)
Fire up a webpack-dev-server that serves the HTML index page, watches source files, recompiles everything on change in memory, not on disk, FYI, and hot reloads the updated assets into the browser.
Run this then navigate your browser to localhost:8080. Now make some changes to either the JS or styles (say, add an alert('derp'); to src/index.js and notice the automatic rebuilding and reloading. Cool.

Run npm run serve along with npm run test-watch and you're TDDing, stuff is interactive, stuff is agile.

ui-starter's People

Contributors

stuartsan avatar

Watchers

 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.