Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

Latest commit

 

History

History
51 lines (34 loc) · 1.35 KB

README.md

File metadata and controls

51 lines (34 loc) · 1.35 KB

Marko Widgets with Lasso.js

This sample app demonstrates how to build a UI component using Marko Widgets that uses Lasso.js to bundle up the required JavaScript and CSS code.

Installation

git clone https://github.com/marko-js-samples/marko-widgets-lasso.git
cd marko-widgets-lasso
npm install

Running

You can choose to either run this application as a Express-based server or to simply build the static HTML, JS and CSS files.

Option 1) Starting a Server

node server.js

Then visit: http://localhost:8080/

You can also use the browser-refresh process launcher to automatically refresh pages any time a file changes as shown below:

npm install browser-refresh --global
browser-refresh server.js

To start in production mode (minification, bundling, fingerprinting, etc.) simply use the following command:

NODE_ENV=production node server.js

Option 2) Build files only

node build.js

The generated HTML, JS and CSS files will be placed in the build directory in the root of the project.

To build static files in production mode (minification, bundling, fingerprinting, etc.) simply use the following command:

NODE_ENV=production node build.js