{"id":19785795,"url":"https://github.com/dna-engine/webpack-to-do-app","last_synced_at":"2025-04-30T23:31:03.387Z","repository":{"id":68720690,"uuid":"83099257","full_name":"dna-engine/webpack-to-do-app","owner":"dna-engine","description":"Sample \"To Do\" application powered by dna.js and built with webpack","archived":false,"fork":false,"pushed_at":"2024-09-11T01:18:42.000Z","size":48,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-11T06:03:26.066Z","etag":null,"topics":["sample","starter","todo","webpack"],"latest_commit_sha":null,"homepage":"https://dna-engine.org/docs/#setup-webpack","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dna-engine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-25T02:11:08.000Z","updated_at":"2024-09-11T01:18:45.000Z","dependencies_parsed_at":"2024-05-07T10:53:01.296Z","dependency_job_id":null,"html_url":"https://github.com/dna-engine/webpack-to-do-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dna-engine%2Fwebpack-to-do-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dna-engine%2Fwebpack-to-do-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dna-engine%2Fwebpack-to-do-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dna-engine%2Fwebpack-to-do-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dna-engine","download_url":"https://codeload.github.com/dna-engine/webpack-to-do-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224225071,"owners_count":17276436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["sample","starter","todo","webpack"],"created_at":"2024-11-12T06:15:46.150Z","updated_at":"2024-11-12T06:15:46.518Z","avatar_url":"https://github.com/dna-engine.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webpack-to-do-app\n\u003cimg src=https://dna-engine.org/graphics/dna-logo.png align=right width=160 alt=logo\u003e\n\n_Sample \"To Do\" application powered by dna-engine and built with webpack_\n\n[![License:MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://dna-engine.org/license)\n[![Build](https://github.com/dna-engine/webpack-to-do-app/actions/workflows/run-spec-on-push.yaml/badge.svg)](https://github.com/dna-engine/webpack-to-do-app/actions/workflows/run-spec-on-push.yaml)\n\nBuild the project by running `build.sh.command` or by using the commands:\n```\n$ cd webpack-to-do-app\n$ npm install\n$ npm test\n$ open dist/index.html\n```\n\nThe build process creates a `dist` folder:\n```\nwebpack-to-do-app/\n   dist/\n      bundle.js\n      index.html\n```\n\n[webpack](https://webpack.js.org) treats the [dna-engine](https://dna-engine.org) library as a module.\u0026nbsp;\nUse `import` statements in your application to pull in the library's JavaScript and CSS:\n\n**app.js**\n```javascript\n// Imports\nimport { dna } from 'dna-engine';\nimport '../css/app.css';\n```\n**app.css**\n```css\n/* Imports */\n@import \"dna-engine/dna-engine.css\";\n```\n\nThen use `dna.registerContext(appName, appObject)` to expose your application so its functions can\nbe used as callbacks from web pages:\n```javascript\nconst myApp = {\n   doSomething(elem) {\n      console.log('myApp.doSomething() was called.');\n      },\n   };\n\ndna.registerContext('myApp', myApp);  //give dna-engine access to your code\n```\nNow in the HTML you can wire up a button to call the function:\n```html\n\u003cbutton data-on-click=myApp.doSomething\u003eDo Something\u003c/button\u003e\n```\n\nSee the example code in [app.js](src/js/app.js).\n\n---\n[MIT License](LICENSE.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdna-engine%2Fwebpack-to-do-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdna-engine%2Fwebpack-to-do-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdna-engine%2Fwebpack-to-do-app/lists"}