Saltar al contenido
Plantilla de proyecto·Pro

Lista de tareas en JavaScript puro

Una lista de tareas con módulos de JavaScript puro: añade, edita en el sitio, marca, filtra y borra lo hecho; se guarda en localStorage. La lógica tiene tests para el ejecutor de tests de Node. Funciona en el DevBrowser y con el Node.js de la app, sin Linux.

Para instalarlo necesitas PocketCode Pro.

Si tienes PocketCode instalado en tu Android, esto abre la página en la app.

Vista previa

Ficheros

README.md
index.html
package.json
src/app.js
src/storage.js
src/todos.js
styles.css
test/todos.test.js

README.md

# To-do list in plain JavaScript A to-do list that runs in the browser with no framework and no build step: add, edit in place, tick off, filter and clear done items. The list is saved in the browser (localStorage). The logic lives in its own module with tests that run on Node's built-in test runner. ## Run it in PocketCode 1. Open `index.html` in the editor. 2. Tap the globe icon (DevBrowser) at the top of the editor. The app opens from the local preview server. 3. Add a few items and reload: they are still there. You don't need the Linux environment for this project. ## Run the tests - Open `test/todos.test.js` and tap Run. The app's own Node.js runs the file and prints each test with ok or not ok. - Or, in the terminal with the Linux environment and Node.js: `npm test`. ## Where things are | Path | What it does | |---|---| | `index.html` | The page and its form | | `styles.css` | Styles, with light and dark colours | | `src/todos.js` | The logic: plain functions, no DOM, easy to test | | `src/storage.js` | Saving and loading from localStorage | | `src/app.js` | Connects the page to the logic and draws the list | | `test/todos.test.js` | Tests for `src/todos.js` | ## Ideas to extend it - Add a due date: a new field in `addTodo`, a date input in the form and a test for it. - Drag to reorder: keep an `order` number on each item and sort by it in `visibleTodos`.

Cambios en la 1.0.0

Primera versión.

Relacionados

API JSON en Node.js sin dependenciasProPlantilla de proyectoUna API de notas sobre node:http: crear, listar, editar y borrar, con validación de entrada y errores en JSON, guardada en un fichero. No hay nada que instalar: toca Run en server.js y el Node.js de la app la arranca en localhost:3000. Incluye tests.Sitio estático en MarkdownProPlantilla de proyectoEscribe páginas en Markdown y conviértelas en un sitio HTML estático con un mismo diseño y un menú. El build son unas 110 líneas de Node.js que puedes cambiar, y el único paquete es marked. Abre el resultado en el DevBrowser. El primer npm install necesita el entorno Linux.API de tareas con Express y SQLiteProPlantilla de proyectoUna API de tareas en Express 5 con filtros, paginación y tests. Los datos van a node:sqlite, así que no hay nada nativo que compilar. Necesita el entorno Linux con Node.js 22.13 o posterior, y npm install descarga unos 3,5 MB.Vite + React + TypeScriptProPlantilla de proyectoUn registro de hábitos en React y TypeScript, hecho con Vite 8: rejilla semanal, rachas, un hook propio y un test. Necesita el entorno Linux con Node.js; el primer npm install descarga unos 25 paquetes (unos 80 MB).Next.js + Tailwind + i18nProPlantilla de proyectoProyecto de Next.js 15 con next-intl y Tailwind CSS, y una página en inglés y español en /en y /es. El modo oscuro sigue al sistema. Necesita el entorno Linux con Node.js; el primer npm install descarga unos 400 MB.Página de aterrizaje estáticaProPlantilla de proyectoUn sitio de una página en HTML y CSS sin más: cabecera con menú plegable, portada, rejilla de funciones, preguntas frecuentes y pie. Los colores siguen el modo claro u oscuro del sistema. No hay que compilar ni hace falta Linux: abre index.html y toca el icono del globo.