{"id":13804352,"url":"https://github.com/andrewlevada/webpack-lit-template","last_synced_at":"2025-04-15T07:18:52.084Z","repository":{"id":39653023,"uuid":"329940755","full_name":"andrewlevada/webpack-lit-template","owner":"andrewlevada","description":"Starter template of multipage application on Lit build with Webpack","archived":false,"fork":false,"pushed_at":"2024-08-30T17:51:30.000Z","size":3044,"stargazers_count":10,"open_issues_count":6,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T07:18:46.689Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/andrewlevada.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-01-15T14:52:00.000Z","updated_at":"2024-06-05T07:42:51.000Z","dependencies_parsed_at":"2024-01-12T11:22:30.770Z","dependency_job_id":"4cd822c3-f49f-48b1-97ae-8df06427ece5","html_url":"https://github.com/andrewlevada/webpack-lit-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewlevada%2Fwebpack-lit-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewlevada%2Fwebpack-lit-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewlevada%2Fwebpack-lit-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewlevada%2Fwebpack-lit-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewlevada","download_url":"https://codeload.github.com/andrewlevada/webpack-lit-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249023745,"owners_count":21199961,"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":[],"created_at":"2024-08-04T01:00:46.333Z","updated_at":"2025-04-15T07:18:52.064Z","avatar_url":"https://github.com/andrewlevada.png","language":"JavaScript","funding_links":[],"categories":["Starter Templates"],"sub_categories":[],"readme":"# Lit Webpack Project Starter\n\nThis project can be used as starting point for creating a multipage application with Lit. It also uses Typescript, Webpack and SCSS.\n\nFell free to clone it and start your project with bundle build configuration what works like a charm out of the box.\n\n## Structure\n\nFolders and files in this project: \n1. `/src/pages` - all pages are stored here as top level components (it's recommended to add postfix `page` to every component's name in this folder). Webpack will generate html file for every mapped *(read later about this)* file from this folder and place page component in body.\n2. `/src/pages/base.html` - base html file used for page generation (add `\u003clink\u003e` and `\u003cscript\u003e` tags here)\n3. `/src/components` - all other components in the project (not pages)\n4. `/src/services` - place for logic (requests to api, algorithms, etc.)\n5. `/src/utils` - place for useful function that can be used anywhere in project\n6. `/src/assets/styles` - global styles (theming, layouts, mixins, etc.) - it's recommended to split global styles in different files here because tree-shaking will only remove entire files (not parts of files)\n7. `/src/assets/to-root` - on build contents from this folder are copied to the root of the build (useful for files like `robots.txt` and `favicon.ico`)\n8. `/src/global.ts` - contains global variables, styles for all components/pages and globally executed scripts, for example analytics\n9. `/router.js` - this file is used to map urls to top level components (pages). Don't forget to change it each time you add a page or remove one.\n\n## Setup\n\nInstall dependencies:\n\n```bash\nnpm i\n```\n\nDon't forget to change name of the project in `package.json`!\n\n## Dev Server\n\nTo start the dev server run (by default on _localhost:2797_):\n\n```bash\nnpm run dev\n```\n\n## Build\n\nIn this repo TypeScript compiler is used to produce JavaScript that runs in modern browsers. \nAlso, ESLint is used along with it - they are executed in fix mode before every build.\nSo, you might want to configure linting rules in `.eslintrc.js` to make them fit your code style.\n\nTo build full app bundle (output files will be in _build_ folder) run:\n\n```bash\nnpm run build\n```\n\nYou can also generate build and _stats.json_ file, that can later be used for bundle analysis ([this tool](https://alexkuz.github.io/webpack-chart/) is my favourite):\n\n```bash\nnpm run build:stats\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewlevada%2Fwebpack-lit-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewlevada%2Fwebpack-lit-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewlevada%2Fwebpack-lit-template/lists"}