{"id":20226242,"url":"https://github.com/steamerjs/steamer-plugin-alloystore","last_synced_at":"2026-05-23T16:38:17.536Z","repository":{"id":57370587,"uuid":"88427456","full_name":"steamerjs/steamer-plugin-alloystore","owner":"steamerjs","description":"alloystore upload command","archived":false,"fork":false,"pushed_at":"2018-05-03T02:20:50.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-04-14T23:05:52.115Z","etag":null,"topics":[],"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/steamerjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-04-16T16:24:51.000Z","updated_at":"2018-05-03T02:19:38.000Z","dependencies_parsed_at":"2022-08-29T21:50:16.909Z","dependency_job_id":null,"html_url":"https://github.com/steamerjs/steamer-plugin-alloystore","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steamerjs%2Fsteamer-plugin-alloystore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steamerjs%2Fsteamer-plugin-alloystore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steamerjs%2Fsteamer-plugin-alloystore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steamerjs%2Fsteamer-plugin-alloystore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steamerjs","download_url":"https://codeload.github.com/steamerjs/steamer-plugin-alloystore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241670132,"owners_count":20000326,"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":[],"created_at":"2024-11-14T07:16:52.785Z","updated_at":"2026-05-23T16:38:12.509Z","avatar_url":"https://github.com/steamerjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# steamer-plugin-alloystore\n\n将组件上传或更新至alloystore(一个组件展示平台)\n\n\n## 安装\n\n```javascript\n// tnpm是内部npm管理命令行工具\ntnpm i -g steamerjs\n\ntnpm i -g steamer-plugin-alloystore\n```\n\n\n## 推荐脚手架\n\n组件开发推荐使用以下脚手架:\n* [steamer-react-component](https://github.com/SteamerTeam/steamer-react-component)\n* [steamer-vue-component](https://github.com/SteamerTeam/steamer-vue-component)\n* [steamer-simple-component](https://github.com/SteamerTeam/steamer-simple-component)\n\n组件的 `example` 需要符合以下规范，才能正确被读取，并上传到 `alloystore`\n\n* `example` 源码写在 `example/src` 下\n\n* `js` 代码仅且仅写在一个 `js` 文件中，此文件位置默认在 `example/src/page/index/container/index.js`\n\n* `css` 或其它样式代码，仅写在一个文件中，此文件位置默认在 `example/src/page/index/container/` 下，与 `js` 文件同级，支持 `css|less|stylus|scss|sass` 5种后缀，名字为 `index.[ext]`，但在 `index.js` 中要引用，并以完整名称引用，如 `require('./index.css')` 或 `import './index.css`\n\n* 如果你想自定 `example` 路径，可以在 `package.json` 中设置，如下:\n\n```javascript\n\"alloystore\": {\n    \"demo\": \"example/src/index/container/\"\n}\n```\n\n`example` 的配置也可以是 `Object`，此时写文件的完整路径。此时也可以带上 `html`。\n\n```javascript\n\"alloystore\": {\n    \"demo\": {\n    \t\"js\": \"example/src/index/container/index.js\",\n    \t\"style\": \"example/src/index/container/index.less\",\n    \t\"html\": \"example/src/index/main.html\"\n    }\n}\n```\n\n`html`文件默认路径是在 `example/src/page/index/main.html`。\n\n`html`文件里的 `\u003cscript\u003e` 标签，请不要写在 `\u003cbody\u003e`标签里，因为命令行只会解析被上传 `\u003cbody\u003e` 标签里的内容。如\n\n```html\n// 原html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n  \t\u003clink rel=\"stylesheet\" href=\"index\"\u003e\n  \t\u003cscript src=\"index\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\n\u003cbody\u003e\n\t\u003cdiv id=\"root\"\u003e\u003c/div\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n\n// 上传内容\n\u003cdiv id=\"root\"\u003e\u003c/div\u003e\n```\n\n* 开发demo的时候，你可能会将 `src` 里的入口文件进行引用，此时建议在 `webpack` 的 `alias` 中为组件设置别名，直接指向 `src` 中的入口文件，这样一来，你可以方便地这样引用：\n\n```javascript\nimport Index from 'react-list-scroll';\n```\n\n* 开发demo的时候，请将最终 `export` 的 `class`，名字改成 `Main`，这样才能被 `Alloystore` 识别。\n\n\n\n## 使用\n\n进入组件目录\n\n```javascript\ncd component\n```\n\n初次使用，进行登录，输入用户名和密码，正确后，会自动进行上传\n\n```javascript\nsteamer alloystore\n```\n\n如果已经上传过，命令会在 `package.json` 写入以下字段，记录组件的 `id`:\n\n```\n\"alloystore\": {\n\t\"id\": 35\n}\n```\n\n那么再次使用命令时，会帮你自动更新组件在线上的版本，以及 `example`。\n\n如果你只是想上传 `example`，而不更新组件的版本，可使用以下命令：\n\n```\nsteamer alloystore -u example\n// or\nsteamer alloystore --update example\n```\n\n\n### 开发\n\n```javascript\n// 将你的插件传至全局路径，那你就可以直接使用 `steamer example`\nnpm link\n\n// 当你完成开发，可以 `unlink` 你的插件\nnpm unlink\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteamerjs%2Fsteamer-plugin-alloystore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteamerjs%2Fsteamer-plugin-alloystore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteamerjs%2Fsteamer-plugin-alloystore/lists"}