Git Product home page Git Product logo

js13k2021's Introduction

Purpose

The purpose of this project is to help make building JS13k projects easier for folks who are familiar with the JavaScript ecosystem but don't want to go through the hassle of setting up a JS13k-specific build environment. The bulk of this project is a Webpack config that does the following:

  • Minifies the resulting JavaScript
  • Inlines the JavaScript into an index.html file (in production)
  • Inlines the CSS into an index.html file (in production)
  • Zips the index.html file
  • Checks that the zip file is under 13k
  • Runs webpack-bundle-analyzer

Requirements

The commands assume Yarn is installed.

Commands

yarn install

Installs dependencies.

yarn start

Starts webpack-dev-server at http://0.0.0.0:8080. You should be able to access the server on your mobile device from your home network by going to your computer's IP address (e.g. http://192.168.0.2:8080).

yarn build

Builds, minifies, and inlines the game to ./dist/index.html. This command also runs webpack-bundle-analyzer, and places the report in ./dist/report.html. This report may be handy in figuring out which of your source files is putting you over the edge of 13k.

yarn party

Builds, minifies, inlines, and zips the game to ./zipped/game.zip. This command finishes with a log message letting you know if the zip file is under 13k.

Notes

  • Put your JS in src/index.tj
  • Put your css in src/index.html
  • Put your images or other assets in assets/
  • This starter pulls in this plugin from Facebook's create-react-app to inline the JS into the HTML file.

js13k2021's People

Contributors

madmarcel avatar

Watchers

James Cloos 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.