yiwenl / LibraryTemplate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Javascript Library template

A template for building javascript library using rollup.js

Installation

$ npm i

Start local environment

$ npm start

The starting point is the index.js file.

Build webpage

$ npm run build

This builds the webpage for uploading, files are located in the dist/ folder.

Build library

$ npm run lib

This builds the library for importing, file are located in the lib/ folder.

Configuration

Input class

Currently target src/WebGLAnimation.js.

Library output path

The built library path can be set in the package.json under module and browser field.

Alias

If using any alias, make sure update the alias setup in the rollup.config.js

Shaders

Includes *.vert, *.frag and *.glsl

About


Languages

Language:JavaScript 86.3%Language:GLSL 13.3%Language:HTML 0.4%Language:CSS 0.0%