Package Exports
- gladejs
Readme
GladeJS
Description
GladeJS is a simple Rollup setup for bundling static Web Sites built with Marko components.
This project requires NodeJS v10.16 or superior and the included "npm" CLI v6.9.0 or superior.
It is tested on the latest versions of NodeJS v10 / v12 / v14 on MacOS, Ubuntu and Windows.
While still in early development, you are welcome to consult & comment on the ROADMAP.md
Installation
Automatic (not ready yet)
An automated & interactive "@gladejs/create" package is planned for the v0.4 release.
It will allow for a simple "npm init @gladejs MyWebSite
" installation, but not yet.
Manual (in 4 easy steps)
- Create a new NodeJS project and install GladeJS as a "devDependency" :
$ mkdir MyWebSite && cd MyWebSite
$ npm init -y && npm i -D gladejs
- Paste the following scripts configuration into your new "
package.json
" :
"scripts": {
"start": "rollup -c --watch",
"clean": "rimraf build rollup_stats.html",
"build": "rollup -c --environment NODE_ENV:production"
},
- Copy the GladeJS Rollup configuration file itself into your project directory :
$ npx shx cp node_modules/gladejs/rollup.config.js .
- Copy the GladeJS documentation Marko pages to start building right away :
$ npx shx cp -R node_modules/gladejs/pages .
Documentation
Command Scripts
GladeJS is directly controlled via NPM scripts, use the following commands :
- "
npm start
" to run Rollup in 'watch' mode for live development - "
npm run build
" to bundle your project for production delivery - "
npm run clean
" to remove the build folder & 'rollup_stats.html'
Rollup Configuration
A single "rollup.config.js
" file is used to configure your build process.
If you are not a NodeJS and/or Rollup guru, fret not, the defaults are just fine.
Nevertheless, give it a quick glance, it's relatively organised and documented.
Pages & Components
The GladeJS website is under construction and its source code will have comments to serve as guide.
In the meantime, have a look at the minimal Index page and the sample Marko component.
And finally, as always RTFMD (Read The Fabulous Marko Documentation).