Skip to content

Commit

Permalink
Merge branch '2.0-TS'
Browse files Browse the repository at this point in the history
  • Loading branch information
thundernet8 committed Jan 29, 2018
2 parents b5cb32b + ac80109 commit 5420201
Show file tree
Hide file tree
Showing 267 changed files with 29,722 additions and 33,594 deletions.
19 changes: 13 additions & 6 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
{
"presets": ["es2015", "es2017", "stage-2"],
"plugins": ["transform-runtime", "transform-decorators-legacy", "transform-object-rest-spread", ["transform-async-to-module-method", {
"module": "bluebird",
"method": "coroutine"
}], ["import", {"libraryName": "antd", "style": true}]],
"comments": false
"presets": [
"react",
[
"env",
{
"targets": {
"browsers": ["chrome >= 58"]
}
}
]
],
"plugins": [["import", { "libraryName": "antd", "style": true }]],
"comments": false
}
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{js,jsx,css,less,scss}]
[*.{ts,tsx,js,jsx,css,less,scss}]
indent_size = 4

# Markdown files
Expand Down
36 changes: 0 additions & 36 deletions .eslintrc.js

This file was deleted.

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ dist/
release/
.idea/
.vscode/
debug.log
*.log
venders-config.json
manifest.json
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tabWidth": 4,
"printWidth": 100
}
30 changes: 30 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"extends": "stylelint-config-standard",
"rules": {
"at-rule-empty-line-before": null,
"at-rule-name-space-after": null,
"comment-empty-line-before": null,
"declaration-bang-space-before": null,
"declaration-empty-line-before": null,
"declaration-colon-newline-after": null,
"function-comma-newline-after": null,
"function-name-case": null,
"function-parentheses-newline-inside": null,
"function-max-empty-lines": null,
"function-whitespace-after": null,
"value-list-comma-newline-after": null,
"indentation": null,
"number-leading-zero": null,
"number-no-trailing-zeros": null,
"rule-empty-line-before": null,
"selector-combinator-space-after": null,
"selector-list-comma-newline-after": null,
"selector-pseudo-element-colon-notation": null,
"unit-no-unknown": null,
"value-list-max-empty-lines": null,
"no-empty-source": null,
"selector-combinator-space-before": null,
"selector-pseudo-class-no-unknown": null,
"no-descending-specificity": null
}
}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ before_install:
| tar -xz -C /tmp/git-lfs --strip-components 1 && /tmp/git-lfs/git-lfs pull
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install --no-install-recommends -y icnsutils graphicsmagick xz-utils; fi
install:
- nvm install 6
- nvm install 7
- npm install electron-builder@next
- npm install
- npm prune
Expand Down
111 changes: 111 additions & 0 deletions .tslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"extends": ["tslint-react", "tslint-eslint-rules", "custom-tslint-rules-collection"],
"rules": {
"align": [true, "parameters", "statements"],
"class-name": true,
"comment-format": [true, "check-space"],
"curly": true,
"object-curly-spacing": true,
"eofline": true,
"forin": true,
"indent": [true, "spaces"],
"jsdoc-format": false,
"label-position": true,
"max-line-length": [false, 120],
"member-ordering": [
false,
{
"order": "statics-first"
}
],
"new-parens": true,
"no-any": false,
"no-arg": true,
"no-bitwise": true,
"no-conditional-assignment": true,
"no-consecutive-blank-lines": true,
"no-console": [true, "debug", "info", "time", "timeEnd", "trace"],
"no-construct": true,
"no-constructor-vars": false,
"no-debugger": true,
"no-duplicate-variable": true,
"no-empty": false,
"no-eval": true,
"no-internal-module": true,
"no-namespace": true,
"no-reference": true,
"no-shadowed-variable": true,
"no-string-literal": true,
"no-switch-case-fall-through": false,
"no-trailing-whitespace": true,
"no-unused-expression": true,
"no-use-before-declare": false,
"no-var-keyword": true,
"no-var-requires": false,
"object-literal-sort-keys": false,
"one-line": [
true,
"check-catch",
"check-else",
"check-finally",
"check-open-brace",
"check-whitespace"
],
"one-variable-per-declaration": [true, "ignore-for-loop"],
"quotemark": [true, "double", "jsx-double"],
"radix": true,
"semicolon": [true, "always", "ignore-bound-class-methods"],
"switch-default": true,
"trailing-comma": [
true,
{
"singleline": "never",
"multiline": "never"
}
],
"triple-equals": [true, "allow-null-check"],
"typedef": false,
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
},
{
"call-signature": "onespace",
"index-signature": "onespace",
"parameter": "onespace",
"property-declaration": "onespace",
"variable-declaration": "onespace"
}
],
"use-isnan": true,
"variable-name": [
true,
"allow-leading-underscore",
"ban-keywords",
"check-format",
"allow-pascal-case"
],
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type",
"check-typecast"
],
"tsx-no-any-props": true,
"tsx-no-any-state": true,
"jsx-no-lambda": false,
"jsx-no-string-ref": false,
"jsx-boolean-value": [true, "never"],
"jsx-wrap-multiline": false,
"jsx-alignment": false,
"jsx-no-multiline-js": false
}
}
58 changes: 40 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,78 @@

## StarCabinet

基于React/Electron/Ant Design打造的开源Github Stars管理的跨平台工具
基于 React/Electron/Ant Design 打造的开源 Github Stars 管理的跨平台工具

## Update 2018.1

已经基于 TypeScript 重写了整个代码,使用 Mobx 替代 Redux 作为状态管理工具,并优化了开发编译 Webpack 脚本配置。

## Features

* 归类
* 按自带的语言分类📚
* 自定义添加分类💼

* 按自带的语言分类 📚
* 自定义添加分类 💼

* 标记
* 添加仓库的标签🏷
* 添加仓库的旗标🏁
* 添加仓库的阅读状态👀
* 添加仓库的备注✍️
* 添加仓库的评分💯

* 添加仓库的标签 🏷
* 添加仓库的旗标 🏁
* 添加仓库的阅读状态 👀
* 添加仓库的备注 ✍️
* 添加仓库的评分 💯

* 筛选
* 归类🎏->选择语言或者分类
* 搜索词🔍->全部字段|仓库名|仓库原始描述|仓库备注|仓库标签
* 排序〽️->默认(即star添加时间)|stars数量|forks数量|watchers数量|创建时间|更新时间|推送时间|评分|大小|open issues数量,均支持增序和降序
* 过滤器⏳->未读|有旗标|有备注 三种可多选

* 归类 🎏->选择语言或者分类
* 搜索词 🔍->全部字段|仓库名|仓库原始描述|仓库备注|仓库标签
* 排序〽️->默认(即 star 添加时间)|stars 数量|forks 数量|watchers 数量|创建时间|更新时间|推送时间|评分|大小|open issues 数量,均支持增序和降序
* 过滤器 ⏳->未读|有旗标|有备注 三种可多选

* 离线支持
💾利用rxdb库和浏览器的indexed db存储仓库的数据
💾 利用 rxdb 库和浏览器的 indexed db 存储仓库的数据

* 支持离线查看仓库并支持上述所有功能操作,包括readme文件的查看
* 支持离线查看仓库并支持上述所有功能操作,包括 readme 文件的查看
* 高效的数据条件化呈现(不用频繁请求服务器)

* 数据
支持Stars和自定义数据的导出备份和导入恢复
* 数据支持 Stars 和自定义数据的导出备份和导入恢复

## Screenshots

![Login](screenshots/StarCabinet-login.png)

![Main](screenshots/StarCabinet-main.png)

![Setting](screenshots/StarCabinet-setting.png)

## Demo

[StarCabinet Demo](http://7xrp00.com1.z0.glb.clouddn.com/starcabinet/StarCabinet.mp4)

## Debug

直接使用源码的用户,按如下操作:

```
npm install
npm run dev
npm start
npm run start:dev
```

如果在install packages出错,提示keytar错误等信息,特别是windows用户,你可能需要安装windows-build-tools的package之后在进行上述步骤
如果在 install packages 出错,提示 keytar 错误等信息,特别是 windows 用户,你可能需要安装 windows-build-tools 的 package 之后在进行上述步骤

或者尝试如下操作:

```
npm run rebuild
```

或者调试

```
npm install -g --verbose electron
```

## LICENSE

### MIT
53 changes: 0 additions & 53 deletions build/dev-server.js

This file was deleted.

Loading

0 comments on commit 5420201

Please sign in to comment.