Code Monkey home page Code Monkey logo

html-skeleton's Introduction

html-skeleton

a minimal template for just makin a web page that does some stuff.

or at least, it was that. Then I got the idea in my head that I wanted to be able to have opulent modern contrivances like a module system and a half decent way to be able to test my code. And because Javascript is ... Javascript, that outlandish fantasy led me down having to set up Webpack, Babel, and a node package.json. And, since minimalism went out the door the second I wanted to put code in more than one file, I installed webpack-dev-server too.

Still, this is a reasonably small and understandable template for small sites and experiments. And it's extendable too.

Usage

Clone it, then probably rm -rf .git so you can start your own history.

yarn start will start the dev server, which you can hit at http://localhost:8080.

The public directory is where the files that will be served live. You write html and css directly in this dir, but Javascript you write in the src dir. Then Babel and Webpack do their thing and make it usable for the browser.

Tests

I chose Jest as the testing framework because that seems to be the current hotness, idk. This project has a test directory, and you can put test files in there if you like. That's a mild pain in the ass because you'll have to go up two directories in every import (e.g. import { myAdd } from ../../src/js/adder.js). You can also just dump the test files in the src directory. My understanding is that jest doesn't care where they are, they just have to have a .test.js extension.

html-skeleton's People

Contributors

epiccoleman 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.