All Projects → gre → js1k-starter

gre / js1k-starter

Licence: WTFPL license
A convenient JS1K starter with livereload, jscrushing, multifiles support, shader minification, env code splitting

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects
GLSL
2045 projects

js1k starter template

  • Your source files in src/ (can use multiple files)
  • Live reload server
  • UglifyJS*
  • build with jscrush
  • build with regpack
  • ESLint ready – can save you from many headaches (with a proper editor integration).
  • support *.frag and *.vert shader files
    • shader minification with glslmin
  • support for *.dev.js and *.prod.js split based on the release mode so you can easily debug things (like shader compilation error only shown in dev mode).
  • current source code contains a WebGL example with webgl function helper. Feel free to fork and remove them ;)

screen shot 2016-02-14 at 12 55 57

Usage

Clone it

git clone [email protected]:gre/js1k-starter MYPROJ
cd MYPROJ
npm i

Run the livereload server

npm start

bundle with jscrush

npm run build-jscrush

(can be used in combination of the livereload server)

It will log:

1930 build/build.js
1197 build/build.min.js
 827 build/bundle.js

bundle with regpack

npm run build-regpack

# or

REGPACK="--crushGainFactor 1 --crushLengthFactor 0 --crushCopiesFactor 0" npm run regpack

It will log:

1930 build/build.js
1197 build/build.min.js
 805 build/bundle.js

Configure the concatenation

and configure how to concat in scripts/concat.sh

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].