GithubHelp home page GithubHelp logo

awebsite's Introduction

awebsite

So you want a website...

Features

  • just HTML, CSS, and JS, no weird template or preprocessor languages
  • transpiles ES6, ES2016, and ES2017 with babel
  • autoprefixes CSS rules
  • @import statements cause separate CSS files to get concatenated into one file
  • use any npm packages you want simply using require('some-module')
  • .html files get wrapped in a layout
  • in dev mode files get watched for changes

Getting Started

Development

  • run npm start
  • open a browser to localhost:8080
  • edit the .html, .css, .js in the /src dir

Deploying

  • open package.json and change "awebsite.surge.sh"
  • run npm run deploy
  • login to surge or create an account

Under the hood

Metalsmith is running the show. There are two configurations dev.json and prod.json. The dev one watches files for changes. The prod one will minimize stuff (not yet though).

HTML

HTML files are handled by metalsmith-layout which just sticks the contents of the file into the layouts/default.html file. You can add frontmatter to these files, and the values will wind up in the layout. You can create new layouts if you want.

CSS

CSS is handled by PostCSS. Two plugins are currently being used, one that inlines @imports, and one that autoprefixes. There's a lot of other PostCSS plugins that can be added.

JS

JS is handled by Browserify. One transform is currently being used; 'babelify' which passes the bundled JS through babel to transpile ESlatest to ES5.

awebsite's People

Contributors

jessehattabaugh avatar jessesb 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.