Welcome to Litespeed.js. A fast javascript framework to build simple web applications.

Download    Source Code

-- or --
npm install litespeed.js

Getting Started

index.html
<!DOCTYPE html>
<html>
    <body data-ls-init>
        <h1>Hello World!</h1>
        <main data-ls-scope="">
            <!-- This is where your view will print -->
        </main>


    </body>
</html>
app.js
(function (window) {
    "use strict";

    // Init app and set cache buster value
    window.Demo = app('v1.0.0');

    var state   = window.Demo.container.get('state');
    var view    = window.Demo.container.get('view');

    state
        .add('/', {
            template: '/pages/home.html'
        })
        .add('/index.html', {
            template: '/pages/index.html'
        })
        .add('/tasks/add.html', {
            template: '/pages/about.html'
        })
        .add('/about.html', {
            template: '/pages/about.html'
        })
    ;

    window.Demo.container
        .set('tasks', function () {
            return {
                title: 'Task Title',
                test: {
                    'new': 'title',
                    'nested': {
                        'value': 'empty'
                    }
                },
                list: [
                    'This is just my first task',
                    'This is just another test adding a second task',
                    'What do you think about this test'
                ],
                add: function (task) {
                    this.list.push(task);
                }
            }
        }, true)
    ;

    window.Demo.run(window);

}(window));