tree: 1096dc54afdda6f6d9b1052607559dac918267c2 [path history] [tgz]
  1. dist/
  2. scripts/
  3. src/
  4. index.html
  5. package-lock.json
  6. package.json
  7. README.md
experimental/todomvc-localstorage/README.md

Speedometer 3.0: TodoMVC: JavaScript Es5

Description

This application uses JavaScript with ES5 language features to implement a todo application.

JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it..

JavaScript - developer.mozilla.org

Implementation details

This implementation uses an explicit MVC pattern, with a clear file structure to reflect the architecture. The storage solution uses an in-memory data object that implements a simple array to hold the todos.

Built steps

A simple build script copies all necessary files to a dist folder. It does not rely on compilers or transpilers and serves raw html, css and js files to the user.

npm run build

Requirements

The only requirement is an installation of Node, to be able to install dependencies and run scripts to serve a local server.

* Node (min version: 18.13.0)
* NPM (min version: 8.19.3)

Local preview

terminal:
1. npm install
2. npm run dev

browser:
1. http://localhost:7001/