{"id":18917181,"url":"https://github.com/lincenying/gulp-startup","last_synced_at":"2025-04-15T09:31:51.104Z","repository":{"id":137757018,"uuid":"66514247","full_name":"lincenying/gulp-startup","owner":"lincenying","description":"切图及活动页必备, 支持tailwindcss, 自动编译less/scss, 自动添加css3前缀, 支持自动将px转成rem, 自动刷新浏览器, 支持将es6变成es5, 支持将pug编译成html","archived":false,"fork":false,"pushed_at":"2021-04-06T15:56:59.000Z","size":1496,"stargazers_count":10,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T19:38:51.374Z","etag":null,"topics":["css","gulp","less","postcss","sass"],"latest_commit_sha":null,"homepage":"","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/lincenying.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-25T01:48:24.000Z","updated_at":"2022-08-03T03:14:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"81f5c320-64c9-4c7d-89fe-4defddc8849c","html_url":"https://github.com/lincenying/gulp-startup","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/lincenying%2Fgulp-startup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lincenying%2Fgulp-startup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lincenying%2Fgulp-startup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lincenying%2Fgulp-startup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lincenying","download_url":"https://codeload.github.com/lincenying/gulp-startup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249042945,"owners_count":21203383,"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":["css","gulp","less","postcss","sass"],"created_at":"2024-11-08T10:24:21.172Z","updated_at":"2025-04-15T09:31:51.064Z","avatar_url":"https://github.com/lincenying.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-startup\n\n切图及活动页必备, 支持tailwindcss, 自动编译less/scss, 自动添加css3前缀, 支持自动将px转成rem, 自动刷新浏览器, 支持将es6变成es5, 支持将pug编译成html\n\n在`src/scss|less`文件夹中, 入口文件正常命名, 其他被`import`的文件, 放在子文件夹里, 如:\nsrc\n    scss\n        main.scss\n        _plugin.scss\n        _module.scss\n        module/plugin.scss\n        module/module.scss\n那么编译后, dist/css文件夹里只有main.css文件, 即入口文件放在scss文件夹下, 而被import的放在scss的子文件夹里(或以下划线开头命名)\n\n在`src/js`文件夹中, 入口文件正常命名, 其他被`require`的文件, 放在子文件夹里, 如:\nsrc\n    js\n        main.js\n        _plugin.js\n        _module.js\n        module/plugin.js\n        module/module.js\n那么编译后, dist/js文件夹里只有main.js文件, 即入口文件放在js文件夹下, 而被import的放在js的子文件夹里(或以下划线开头命名)\n\nsrc/assets 文件夹为静态资源文件夹, 如第三方插件, 字体文件, 和图片这类不需要经常改动的文件, 该文件夹会全部复制到dist文件夹下\n\n```bash\n# 安装依赖\nnpm install  or  yarn\n\n# less 模式\n# 开发模式\nnpm run less  or  yarn less\n# 生成模式\nnpm run build_less  or  yarn build_less\n\n# scss 模式\n# 开发模式\nnpm run scss  or  yarn scss\n# 生成模式\nnpm run build_scss  or  yarn build_scss\n\n```\n\n打开 http://localhost:9091\n\n自己建立切图文件夹后, 记得修改`gulpfile.js`的`basedir` 和 `px2rem`\n\nbasedir: 相对当前项目根目录的相对地址\n\npx2rem = true 时:\n会将px单位自动转成rem, 默认比例100(可以自行根据需求修改`rootValue`的值), 即设计稿宽度为750px, 书写时, css只需要写成设计稿的真实尺寸即可\n\nopenTailwind = true 时:\n将会开启Tailwind功能, 如果开启, 需要在`src`文件夹下创建`tailwind/tailwind.css`文件, 用于存储生成的文件\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flincenying%2Fgulp-startup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flincenying%2Fgulp-startup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flincenying%2Fgulp-startup/lists"}