{"id":14977026,"url":"https://github.com/ydj-fe/ts-react-vite_or_webpack","last_synced_at":"2025-04-05T15:09:21.970Z","repository":{"id":37324004,"uuid":"125148901","full_name":"YDJ-FE/ts-react-vite_or_webpack","owner":"YDJ-FE","description":"a starter-template with typescript, react, mobx and vite/webpack...","archived":false,"fork":false,"pushed_at":"2023-01-27T10:20:56.000Z","size":4557,"stargazers_count":364,"open_issues_count":4,"forks_count":118,"subscribers_count":13,"default_branch":"use-vite","last_synced_at":"2024-05-18T20:47:23.508Z","etag":null,"topics":["admin-dashboard","admin-template","mobx","react","starter-template","typescript","vite","vitejs","webpack5"],"latest_commit_sha":null,"homepage":"https://starter.jackple.com/","language":"TypeScript","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/YDJ-FE.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}},"created_at":"2018-03-14T03:18:57.000Z","updated_at":"2024-05-03T17:18:36.000Z","dependencies_parsed_at":"2023-02-15T08:01:23.982Z","dependency_job_id":null,"html_url":"https://github.com/YDJ-FE/ts-react-vite_or_webpack","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/YDJ-FE%2Fts-react-vite_or_webpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YDJ-FE%2Fts-react-vite_or_webpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YDJ-FE%2Fts-react-vite_or_webpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YDJ-FE%2Fts-react-vite_or_webpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YDJ-FE","download_url":"https://codeload.github.com/YDJ-FE/ts-react-vite_or_webpack/tar.gz/refs/heads/use-vite","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353749,"owners_count":20925329,"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":["admin-dashboard","admin-template","mobx","react","starter-template","typescript","vite","vitejs","webpack5"],"created_at":"2024-09-24T13:54:54.196Z","updated_at":"2025-04-05T15:09:21.950Z","avatar_url":"https://github.com/YDJ-FE.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"There is an example [use-webpack](https://github.com/YDJ-FE/ts-react-vite_or_webpack/tree/use-webpack)\n\nThis is a simple (admin) starter with typescript, react and vite.\n\nHave a quick view:\n\n\u003cimg src=\"./screenshot.png\" width=\"900\"\u003e\n\n## setup\n\n\u003e for husky\n\n```bash\n$ npm run prepare\n```\n\n\u003e If you do not need the taobao registry, you can change it in `.npmrc`\n\n```bash\n$ npm i\n```\n\n## test\n\n```bash\n$ npm test\n```\n\n## build for development\n\n```bash\n$ npm run dev\n```\n\n## build for production\n\n```bash\n$ npm run build:(qa/prod)\n```\n\n## characteristics\n\n-   use [ant design](https://ant.design/index-cn) as UI framework\n-   use ServiceWorker\n-   use husky{pre-commit/commit-msg} hooks\n-   use [react-intl-universal](https://github.com/alibaba/react-intl-universal) for i18n.\n-   use [react-virtualized](https://github.com/bvaughn/react-virtualized) for fat list.\n\n## pages\n\n-   The Index page became a [Socket Debugger](https://starter.jackple.com/#/)\n\n## TODO\n\n-   config menu by user with permission\n-   more functional pages like Socket Debugger\n\n## component example\n\n```jsx\nimport React from 'react'\nimport { observer } from 'mobx-react'\nimport { Button } from 'antd'\n\nimport history from '@shared/App/ht'\n\nfunction Test() {\n    function gotoHome() {\n        history.push('/')\n    }\n    return (\n        \u003cButton type=\"primary\" onClick={gotoHome}\u003e\n            go to page index directly\n        \u003c/Button\u003e\n    )\n}\n\nexport default observer(Test)\n```\n\n[live example](https://github.com/YDJ-FE/ts-react-webpack4/blob/master/src/containers/views/Login/index.tsx?1532570619900)\n\n## necessary extensions (on vscode)\n\n-   [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)\n\n-   [stylelint](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint)\n\n-   [Prettier - Code formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)\n\n## how to upload file to server\n\n```bash\n#!/bin/bash\n\nTIMESPAN=$(date '+%s')\nDEPLOYNAME=ts-react.qa.${TIMESPAN}\nDEPLOYFILES=${DEPLOYNAME}.tar.gz\nSERVER=0.0.0.0\n\n# make compression\ncd dist/qa\ntar -zcvf ${DEPLOYFILES} ./*\n\n# upload\nscp -P 22 -o StrictHostKeyChecking=no ${DEPLOYFILES} node@${SERVER}:/home/pages/ts-react/tarfiles\n\n# make decompression\nssh -p 22 -o StrictHostKeyChecking=no node@${SERVER} tar xzf /home/pages/ts-react/tarfiles/${DEPLOYFILES} -C /home/pages/ts-react\n\nif [ $? -ne 0 ]; then\n    echo \"success\"\nelse\n    echo \"fail\"\nfi\n```\n\n## how to deploy with nginx\n\n```nginx\nserver {\n       listen       9993;\n       server_name  localhost:9993;\n\n       location / {\n             root   ~/Documents/react/ts-react/dist/qa/;\n             index  index.html;\n       }\n }\n```\n\n## the scaffold\n\n[steamer-react-redux-ts](https://github.com/YDJ-FE/steamer-react-redux-ts)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fydj-fe%2Fts-react-vite_or_webpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fydj-fe%2Fts-react-vite_or_webpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fydj-fe%2Fts-react-vite_or_webpack/lists"}