{"id":20738756,"url":"https://github.com/wyyxdgm/gulp-less-start-kit","last_synced_at":"2026-04-12T15:05:06.585Z","repository":{"id":47941170,"uuid":"221219522","full_name":"wyyxdgm/gulp-less-start-kit","owner":"wyyxdgm","description":"网站初始化集成","archived":false,"fork":false,"pushed_at":"2022-12-04T20:04:25.000Z","size":10307,"stargazers_count":0,"open_issues_count":14,"forks_count":0,"subscribers_count":3,"default_branch":"struct","last_synced_at":"2025-01-18T01:32:10.360Z","etag":null,"topics":["bootstrap","deploy","ejs","gulp","hash","i18n","less","postcss","responsive","uglify","website"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/wyyxdgm.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":"2019-11-12T13:04:14.000Z","updated_at":"2019-11-29T04:05:24.000Z","dependencies_parsed_at":"2023-01-23T21:47:28.186Z","dependency_job_id":null,"html_url":"https://github.com/wyyxdgm/gulp-less-start-kit","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/wyyxdgm%2Fgulp-less-start-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wyyxdgm%2Fgulp-less-start-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wyyxdgm%2Fgulp-less-start-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wyyxdgm%2Fgulp-less-start-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wyyxdgm","download_url":"https://codeload.github.com/wyyxdgm/gulp-less-start-kit/tar.gz/refs/heads/struct","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243025020,"owners_count":20223718,"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":["bootstrap","deploy","ejs","gulp","hash","i18n","less","postcss","responsive","uglify","website"],"created_at":"2024-11-17T06:20:27.113Z","updated_at":"2026-04-12T15:05:06.537Z","avatar_url":"https://github.com/wyyxdgm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 官网快速构建\n\n\n## Getting Started\n\n主要包括一些开发任务和自动编译\n\n### 开发基础\n\n1.需要node环境，参考[Installing Node.js via package manager](https://nodejs.org/en/download/package-manager/)  \n\n2.quick start\n\n```\nnpm install\nnpm run dev\nnpm run serve\n```\n\n### 开发指南\n\ngulp 任务\n\n```\n├─┬ default                 // 一次性编译链接资源文件到dist/\n│ ├── build:html\n│ ├── css\n│ └── copy\n├─┬ watch                   // 开发时watch任务，自动更新，包含很多细分任务\n│ ├── default\n│ ├── watchhtml\n│ ├── watchi18n\n│ ├── watchcss\n│ ├── watchcopy\n│ ├── watchdev\n│ └── serve\n├── watchi18n               // watch i18n/*.js\n├── watchdev                // 开发便利，lab/src/**下编辑代码片段能生成到lab/dist/**\n├── watchcss\n├── css                     // 编译src/css下的资源到dist/，支持less等\n├── serve                   // start a static server at 8888\n├── clean\n├── watchcopy\n├── copy                    // 拷贝相关资源到 dist/**\n├── watchhtml\n└── build:html              // src/index.html -\u003e dist/{{i18n}}/index.html\n\n```\n\n资源结构\n\n```\n├── dist           # gulp 生成目录\n│   ├── css\n│   ├── en\n│   ├── files\n│   ├── fonts\n│   ├── i18n\n│   ├── img\n│   ├── js\n│   ├── video\n│   └── zh\n├── i18n\n├── lab            # 开发便利目录\n│   ├── dist\n│   └── src\n├── lib\n├── config.js      # 配置语言部署信息等\n├── node_modules\n│   ├── ...\n│   └── ...\n└── src\n    ├── css\n    ├── files\n    ├── fonts\n    ├── i18n\n    ├── img\n    ├── pages  # ejs 页面\n    ├── js\n    └── video\n\n```\n\ndist目录由 `gulp` 可以生成\n\n开发时使用 `gulp watch`，保持页面实时更新\n\n## dev测试\n\nsrc/index.html 增加一段HTML\n\n* 片段生成例子\n\n1. 执行 `gulp watch`，进入开发状态。\n2. 新建lab/src/input.html（格式`/\\w+.html/`），代码如下。\n\n```html\n\u003cdiv class=\"col-12 col-lg-6 flex-center\"\u003e\n  \u003cdiv class=\"core-idea-item flex-center wow fadeInUp\" data-wow-delay=\"0.2s\"\u003e\n    \u003cdiv class=\"text-center mt-10\"\u003e\n      \u003ch3\u003e标题\u003c/h3\u003e\n      \u003cp\u003e内容 12333。\u003c/p\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n* 生成lab/dist/input.html\n\n```ejs\n\u003cdiv class=\"col-12 col-lg-6 flex-center\"\u003e\n  \u003cdiv class=\"core-idea-item flex-center wow fadeInUp\" data-wow-delay=\"0.2s\"\u003e\n    \u003cdiv class=\"text-center mt-10\"\u003e\n      \u003ch3\u003e\u003c%=__('标题')%\u003e\u003c/h3\u003e\n      \u003cp\u003e\u003c%=__('内容 12333。')%\u003e\u003c/p\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n* 生成lab/dist/input.{i18n}.js 并自动导入 i18n/{i18n}.js\n\n```js\n// file: lab/dist/input.zh.js\n{\n    \"标题\": \"标题\",\n    \"内容 12333。\": \"内容 12333。\"\n}\n// file: lab/dist/input.en.js\n{\n    \"标题\": \"Title\",\n    \"内容 12333。\": \"Content 12333.\"\n}\n```\n\n## Details\n\n* 同名文件引用\n\n* `src/files/` 下面的文件对外访问路径，统一为如下路径。\n\n```bash\n/files/public-en.file\n/files/public-zh.file\n```\n\n文件更新，使用:`ln -snf source_file open_link_name`\n\n```bash\n# ln -snf public-en-v{n}.file public-en.file\n# ln -snf public-zh-v{n}.file public-zh.file\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwyyxdgm%2Fgulp-less-start-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwyyxdgm%2Fgulp-less-start-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwyyxdgm%2Fgulp-less-start-kit/lists"}