Git Product home page Git Product logo

js13k-boilerplate's Introduction

JS13kGames Boilerplate

Boilerplate for JS13kGames projects. Fork of js13k-starter.

This is what works for me; it might work for you, but it might not. Feel free to modify this to fit your needs.

Features

Installation

git clone https://github.com/shreyasminocha/js13k-boilerplate

mv js13k-boilerplate [NAME OF YOUR GAME]
cd [NAME OF YOUR GAME]

rm -rf .git
npm install # install devDependencies

rm readme.md
$EDITOR package.json # change package details

Usage

  • gulp build / npm run build
    • Concatenate CSS files (src/css/*.css)
    • Concatenate JS files (src/js/*.js)
    • Minify HTML, CSS and JS to dist/index.html, dist/style.min.css and dist/script.min.js respectively
    • Correct links to CSS and JS files in dist/index.html
    • Optimize images in src/images using gifsicle, jpegtran, optipng, svgo and place them in dist/images.
    • Compress dist to zip/game.zip
    • Warn if zip/game.zip is larger than 13kb
  • gulp test / npm test
    • Lint HTML, CSS, JS and fail on error.
  • gulp
    • Run gulp build
    • Watch src for changes and build on change.

Server

I prefer to run the game using hotel. I've set hotel to run the game from dist using http-server.

cd dist
hotel add --name "game" 'http-server -p "$PORT" -c-1'

Since I've set up .localhost domains for hotel apps, I would be able to access the game at game.localhost.

You might prefer running a server through gulp. Feel free to modify gulpfile.js in your clone to fit your needs.

License

Licensed under the MIT License.

js13k-boilerplate's People

Contributors

dependabot[bot] avatar udxs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

perseus98

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.