{"id":22724263,"url":"https://github.com/niceue/spt","last_synced_at":"2025-09-11T01:09:45.345Z","repository":{"id":9762287,"uuid":"11730042","full_name":"niceue/spt","owner":"niceue","description":"前端资源（js、css、image）打包工具（压缩，合并，复制），支持 seajs, stylus","archived":false,"fork":false,"pushed_at":"2016-01-07T10:09:38.000Z","size":892,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T23:12:05.427Z","etag":null,"topics":[],"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/niceue.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":"2013-07-29T03:04:23.000Z","updated_at":"2020-06-05T05:08:08.000Z","dependencies_parsed_at":"2022-09-24T05:51:49.471Z","dependency_job_id":null,"html_url":"https://github.com/niceue/spt","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/niceue/spt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niceue%2Fspt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niceue%2Fspt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niceue%2Fspt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niceue%2Fspt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niceue","download_url":"https://codeload.github.com/niceue/spt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niceue%2Fspt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274557583,"owners_count":25307516,"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-09-10T02:00:12.551Z","response_time":83,"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":[],"created_at":"2024-12-10T14:15:32.756Z","updated_at":"2025-09-11T01:09:45.323Z","avatar_url":"https://github.com/niceue.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## spt\n[Sea.js](http://seajs.org) 和 [Stylus](http://learnboost.github.io/stylus/) 的项目打包工具（压缩，合并），只需要配置下“package.json”文件。\n\n\n## 使用方法\n##### 1. 准备：  \n    在项目中新建一个名为`build`的文件夹，把spt的文件放进去  \n    运行“npm_install.bat”，安装依赖\n    \n##### 2. 配置“package.json”，参见下面的配置说明\n\n##### 3. 运行“build.bat”，执行打包\n\n\n## 配置说明\n\"package.json\" 中使用了两个节点（`base` 和 `build`）    \n`base` 指定模块的相对目录（默认是“../”）；  \n`build` 定义打包规则（对于每一项规则：键为目标文件，值为源文件）；\n\n如果源文件为某个目录中所有的js文件，那么可以使用`*.js`，或者`*.styl`。  \n将一组源文件配置成一个数组，目标文件配置成一个单独的文件，则压缩这组文件并合并到目标文件  \n源文件名末尾加上`#!` 则该文件不会被压缩，只是copy到目标文件\n\n例子：  \n```js\n\"base\": \"../\",\n\"build\": {\n    \"../scripts/dist/*.js\": \"../scripts/*.js\",\n\n    \"../scripts/dist/plugins.js\": [\n        \"plugins/slider/slider.js\",  \n        \"plugins/placeholder/placeholder.js\",  \n        \"plugins/validator/validator.js\",\n        \"plugins/validator/local/zh-CN.js#!\"\n    ],\n    \n    \"../styles/dist/*.css\": \"../styles/styl/*.styl\",\n    \"../styles/dist/*.css\": \"../styles/css/*.css\"\n}\n```\n\n  \n## License\nspt is available under the terms of the [MIT License](http://niceue.com/licenses/MIT-LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniceue%2Fspt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniceue%2Fspt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniceue%2Fspt/lists"}