{"id":22682035,"url":"https://github.com/vd39/typescript-webpack-boilerplate","last_synced_at":"2025-10-07T13:09:40.617Z","repository":{"id":36958322,"uuid":"87840643","full_name":"VD39/typescript-webpack-boilerplate","owner":"VD39","description":"A starter frontend boilerplate built with TypeScript/JavaScript, Webpack 5, PostCSS, Jest, ESLint, and Stylelint.","archived":false,"fork":false,"pushed_at":"2024-07-01T06:21:12.000Z","size":7200,"stargazers_count":48,"open_issues_count":23,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T17:11:22.643Z","etag":null,"topics":["babel","babel7","boilerplate-template","eslint","husky","javascript","jest","postcss","setup","stylelint","typescript","webpack","webpack-boilerplate"],"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/VD39.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,"zenodo":null}},"created_at":"2017-04-10T17:52:46.000Z","updated_at":"2024-12-11T09:31:38.000Z","dependencies_parsed_at":"2023-02-17T09:16:08.320Z","dependency_job_id":"9c4834ab-d1dd-41b7-9a88-5251c467c7bf","html_url":"https://github.com/VD39/typescript-webpack-boilerplate","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/VD39/typescript-webpack-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VD39%2Ftypescript-webpack-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VD39%2Ftypescript-webpack-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VD39%2Ftypescript-webpack-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VD39%2Ftypescript-webpack-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VD39","download_url":"https://codeload.github.com/VD39/typescript-webpack-boilerplate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VD39%2Ftypescript-webpack-boilerplate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278779193,"owners_count":26044306,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["babel","babel7","boilerplate-template","eslint","husky","javascript","jest","postcss","setup","stylelint","typescript","webpack","webpack-boilerplate"],"created_at":"2024-12-09T20:17:37.235Z","updated_at":"2025-10-07T13:09:40.579Z","avatar_url":"https://github.com/VD39.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Typescript Webpack Boilerplate\n\n[![License][license-image]][license-url]\n[![Version][version-image]][version-url]\n[![CI][ci-image]][ci-url]\n[![Test coverage][coverage-image]][coverage-url]\n[![GitHub last commit][commit-image]][commit-url]\n\nA starter frontend boilerplate built with:\n\n- [TypeScript](https://www.typescriptlang.org/)\n- [Babel](https://babeljs.io/)\n- [Webpack 5](https://webpack.js.org/)\n- [PostCSS](https://postcss.org/)\n- [Jest](https://jestjs.io/)\n- [ESLint](https://eslint.org/)\n- [Stylelint](https://stylelint.io/)\n\nThis also uses [lint-staged](https://github.com/okonet/lint-staged) for running pre-commit checks.\n\n## Features\n\n- Support for both TypeScript and JavaScript as needed.\n- Loads environment variables via `.env` file.\n- May be extended to be used with [React](https://reactjs.org/), [Vue.js](https://vuejs.org/), or [Angular](https://angular.io/).\n- Minification of TypeScript/JavaScript and CSS processed files.\n- Assets optimization.\n- Webpack Dev Server plugin for local development.\n- Webpack Bundle Analyzer for visualising script output and usage.\n- CI workflow.\n\n## Prerequisites\n\n- [NodeJS](https://nodejs.org/en/)\n- [Yarn](https://yarnpkg.com)\n\n## Folder structure\n\n```none\nsrc\n└── css\n│    ├── all\n│    └── styles.css\n├── index.ts\npublic\n├── assets\n├── favicon.ico\n└── index.html\n```\n\n- src\n  - The entry typescript file is [index.ts](src/index.ts).\n  - The [helpers/set-message](src/helpers/set-message) folder is a sample folder for how to test using Jest.\n  - Local files are imported using the `'@/'` alias. See [index.ts](src/index.ts) file for example.\n- scr/css\n  - Add your styles here and `@import` them to the entry [styles.css](src/css/styles.css) file.\n- public\n  - Edit the [index.html](public/index.html) in the public folder to suite your needs.\n  - Replace the [favicon.ico](public/favicon.ico) with your own icon.\n- public/assets.\n  - Add your assets, to the [assets](public/assets) folder.\n\n## Configuration\n\n### Webpack\n\nYou may change the configuration for Webpack within the [webpack](webpack) folder.\n\n### Environment Variables\n\nYou may set the following in your `.env` for setting up your project ([default values shown](configuration/config.js)).\n\n```sh\nPORT_NUMBER=9000\nHOST_NAME=localhost\nTITLE=TypeScript Webpack Boilerplate\n```\n\n## Setup\n\n### Install dependencies\n\nRun:\n\n```sh\n  yarn install\n```\n\n## Development\n\n### Server\n\nRun:\n\n```sh\n  yarn serve\n```\n\nThis will create a server at `http://localhost:9000/` or server data specified in your `.env` file.\n\nAutomatically reloads after each file change.\n\n### Production build\n\nRun:\n\n```sh\n  yarn build\n```\n\nWill output all build files into the `dist` folder.\n\n## Testing (Jest)\n\nRun:\n\n```sh\n  yarn test\n```\n\nor watch files\n\n```sh\n  yarn test:watch\n```\n\n## Linting\n\n### All files\n\nRun:\n\n```sh\n  yarn lint\n```\n\nTo fix all possible errors automatically run:\n\n```sh\n  yarn lint:fix\n```\n\n### TypeScript (tsc)\n\nRun:\n\n```sh\n  yarn lint:check-types\n```\n\nThere is no automatic fix option for TypeScript.\n\n### TypeScript and JavaScript (ESLint)\n\nRun:\n\n```sh\n  yarn lint:scripts\n```\n\nTo fix all possible errors automatically run:\n\n```sh\n  yarn lint:scripts:fix\n```\n\n### Styles (StyleLint)\n\nRun:\n\n```sh\n  yarn lint:styles\n```\n\nTo fix all possible errors automatically run:\n\n```sh\n  yarn lint:styles:fix\n```\n\n## Check bundle size\n\nRun:\n\n```sh\n  yarn check-size\n```\n\nThis will create a server at `http://localhost:8888/` or at the port number specified using the `-p or --port` option via the `cli`.\n\n## License\n\nReleased under [MIT](LICENSE) by [@VD39](https://github.com/VD39).\n\n\u003c!-- Image URls --\u003e\n\n[license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square\n[version-image]: https://img.shields.io/github/package-json/v/VD39/typescript-webpack-boilerplate/master?logo=github\u0026style=flat-square\n[ci-image]: https://img.shields.io/github/actions/workflow/status/VD39/typescript-webpack-boilerplate/ci.yml?logo=githubactions\u0026style=flat-square\n[coverage-image]: https://img.shields.io/badge/coverage-100%25-brightgreen.svg?\u0026logo=jest\u0026style=flat-square\n[commit-image]: https://img.shields.io/github/last-commit/VD39/typescript-webpack-boilerplate.svg?logo=git\u0026style=flat-square\n\n\u003c!-- Page URLs --\u003e\n\n[license-url]: LICENSE\n[version-url]: package.json\n[ci-url]: https://github.com/VD39/typescript-webpack-boilerplate/actions?query=branch%3Amaster\n[coverage-url]: https://github.com/VD39/typescript-webpack-boilerplate?branch=master\n[commit-url]: https://github.com/VD39/typescript-webpack-boilerplate/commits/master\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvd39%2Ftypescript-webpack-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvd39%2Ftypescript-webpack-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvd39%2Ftypescript-webpack-boilerplate/lists"}