Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/steamerjs/steamer-plugin-alloystore
alloystore upload command
https://github.com/steamerjs/steamer-plugin-alloystore
Last synced: about 1 month ago
JSON representation
alloystore upload command
- Host: GitHub
- URL: https://github.com/steamerjs/steamer-plugin-alloystore
- Owner: steamerjs
- Created: 2017-04-16T16:24:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-03T02:20:50.000Z (over 6 years ago)
- Last Synced: 2024-04-14T23:05:52.115Z (9 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 1
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# steamer-plugin-alloystore
将组件上传或更新至alloystore(一个组件展示平台)
## 安装
```javascript
// tnpm是内部npm管理命令行工具
tnpm i -g steamerjstnpm i -g steamer-plugin-alloystore
```## 推荐脚手架
组件开发推荐使用以下脚手架:
* [steamer-react-component](https://github.com/SteamerTeam/steamer-react-component)
* [steamer-vue-component](https://github.com/SteamerTeam/steamer-vue-component)
* [steamer-simple-component](https://github.com/SteamerTeam/steamer-simple-component)组件的 `example` 需要符合以下规范,才能正确被读取,并上传到 `alloystore`
* `example` 源码写在 `example/src` 下
* `js` 代码仅且仅写在一个 `js` 文件中,此文件位置默认在 `example/src/page/index/container/index.js`
* `css` 或其它样式代码,仅写在一个文件中,此文件位置默认在 `example/src/page/index/container/` 下,与 `js` 文件同级,支持 `css|less|stylus|scss|sass` 5种后缀,名字为 `index.[ext]`,但在 `index.js` 中要引用,并以完整名称引用,如 `require('./index.css')` 或 `import './index.css`
* 如果你想自定 `example` 路径,可以在 `package.json` 中设置,如下:
```javascript
"alloystore": {
"demo": "example/src/index/container/"
}
````example` 的配置也可以是 `Object`,此时写文件的完整路径。此时也可以带上 `html`。
```javascript
"alloystore": {
"demo": {
"js": "example/src/index/container/index.js",
"style": "example/src/index/container/index.less",
"html": "example/src/index/main.html"
}
}
````html`文件默认路径是在 `example/src/page/index/main.html`。
`html`文件里的 `` 标签,请不要写在 `<body>`标签里,因为命令行只会解析被上传 `<body>` 标签里的内容。如
```html
// 原html
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="index">
<script src="index">