{"id":25689365,"url":"https://github.com/zcemycl/webpack-ts-mpa-example","last_synced_at":"2026-04-09T13:50:13.415Z","repository":{"id":59251642,"uuid":"535860032","full_name":"zcemycl/webpack-ts-mpa-example","owner":"zcemycl","description":"Looking for best practice in creating github pages with html css and vanilla typescript.","archived":false,"fork":false,"pushed_at":"2023-01-30T23:30:18.000Z","size":3109,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-17T10:53:21.449Z","etag":null,"topics":["abtesting","bootstrap","cypress","eslint","expressjs","github-pages","htmlwebpackplugin","husky","javascript","jest","minicssextractplugin","model-view-controller","node","prettier","puppeteer","typescript","vaniila-javascript","vanilla-typescript","webpack","webpack-merge"],"latest_commit_sha":null,"homepage":"https://zcemycl.github.io/webpack-ts-mpa-example/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zcemycl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-12T21:40:11.000Z","updated_at":"2023-07-10T09:09:11.000Z","dependencies_parsed_at":"2023-02-16T12:40:17.129Z","dependency_job_id":null,"html_url":"https://github.com/zcemycl/webpack-ts-mpa-example","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/zcemycl%2Fwebpack-ts-mpa-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcemycl%2Fwebpack-ts-mpa-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcemycl%2Fwebpack-ts-mpa-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcemycl%2Fwebpack-ts-mpa-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zcemycl","download_url":"https://codeload.github.com/zcemycl/webpack-ts-mpa-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240564604,"owners_count":19821421,"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":["abtesting","bootstrap","cypress","eslint","expressjs","github-pages","htmlwebpackplugin","husky","javascript","jest","minicssextractplugin","model-view-controller","node","prettier","puppeteer","typescript","vaniila-javascript","vanilla-typescript","webpack","webpack-merge"],"created_at":"2025-02-24T22:01:07.072Z","updated_at":"2025-12-30T19:04:21.429Z","avatar_url":"https://github.com/zcemycl.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Multipages Application with Typescript and Webpack\n\n![example workflow](https://github.com/zcemycl/webpack-ts-mpa-example/actions/workflows/main.yml/badge.svg) [![Coverage Status](https://coveralls.io/repos/github/zcemycl/webpack-ts-mpa-example/badge.svg?branch=main)](https://coveralls.io/github/zcemycl/webpack-ts-mpa-example?branch=main)\n\n#### Project Structure\n\n```\n├── assets # css\n│   ├── components\n│   └── pages # @import components\n│       ├── index.css\n│       └── page1\n│           ├── index-lg.css\n│           ├── index-sm.css\n│           ├── index-md.css\n│           └── index.css # all @imports\n├── dist # after build\n│   ├── index.html # link one 1 js and 1 css\n│   ├── index.bundle.js # group mvc\n│   ├── index.css # many css to 1 css\n│   └── page1\n│       ├── index.html\n│       ├── index.bundle.js\n│       └── index.css\n├── public # html\n│   ├── components\n│   └── pages # require partial/components\n│       ├── index.html # require partial\n│       ├── partial1.html\n│       ├── partial2.html\n│       └── page1\n│           └── index.html\n└── src # ts\n    ├── utils # reusable\n    └── pages\n        ├── index.ts # import mvc\n        ├── index.model.ts\n        ├── index.view.ts\n        ├── index.control.ts\n        └── page1\n            ├── index.ts\n            ├── index.model.ts\n            ├── index.view.ts\n            └── index.control.ts\n```\n\nFollow-ups: gif,jpg,jpeg,png?\n\n#### Techniques\n\n1. Model View Controller (MVC)\n2. Jest for unit and mock testings\n3. Puppeteer for e2e testing\n4. Webpack\n5. MultiPages Application\n6. Github action to deploy github pages\n7. Typescript\n8. ESLint\n9. Prettier\n10. Cypress for e2e testing\n\n#### Tools\n\n1. Bash script for creating new page.\n   ```\n   ./setup_newpage.sh  newpagename standard\n   ```\n\n### References\n\n1. [Define global variable with webpack](https://stackoverflow.com/questions/37656592/define-global-variable-with-webpack)\n2. [How to use ESLint with TypeScript](https://khalilstemmler.com/blogs/typescript/eslint-for-typescript/)\n3. [Linting in TypeScript using ESLint and Prettier](https://blog.logrocket.com/linting-typescript-eslint-prettier/)\n4. [Create a Pre-commit Git Hook to Check and Fix Your JavaScript/TypeScript Code Automatically](https://javascript.plainenglish.io/create-a-pre-commit-git-hook-to-check-and-fix-your-javascript-typescript-code-b04de61834bd)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzcemycl%2Fwebpack-ts-mpa-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzcemycl%2Fwebpack-ts-mpa-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzcemycl%2Fwebpack-ts-mpa-example/lists"}