Skip to content

Commit

Permalink
merge next branch
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Sep 9, 2018
1 parent 157023d commit 56366ca
Show file tree
Hide file tree
Showing 987 changed files with 21,616 additions and 37,067 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## PR Checklist
Please check if your PR fulfills the following requirements:

- [ ] The commit message follows our guidelines: https://github.com/cipchk/delon/blob/master/CONTRIBUTING.md#commit
- [ ] The commit message follows our guidelines: https://github.com/ng-alain/delon/blob/master/CONTRIBUTING.md#commit
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)

Expand Down
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
node_modules
npm-debug.log
# package-lock.json
yarn.lock
# yarn-error.log

.tmp
.ng_build
.lib
*.iml
dist
coverage
site/app/routes/gen
src/app/routes/gen
publish
.idea
*.iml
debug.log
yarn-error.log
/yarn.lock
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

12 changes: 5 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sudo: required
language: node_js
node_js:
- "8.11"
- '8.11'

addons:
apt:
Expand All @@ -15,28 +15,26 @@ git:
depth: 1

cache:
npm: true
yarn: true
directories:
- ./node_modules
- ./node_modules

before_install:
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start

env:
- TASK=release
- TASK=release:ci
- TASK=test
- TASK=test:schematics
- TASK=lint
- TASK=site:release
- TASK=scaffold:release

matrix:
fast_finish: true
allow_failures:
- env: "TASK=site:release"
- env: "TASK=scaffold:release"
- env: 'TASK=site:release'

script:
- npm run $TASK
Expand Down
10 changes: 8 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@
{
"type": "node",
"request": "launch",
"name": "generate-color-less",
"name": "generate-site-color-less",
"program": "${workspaceFolder}/scripts/site/generate-color-less.js"
},
{
"type": "node",
"request": "launch",
"name": "generate-scaffold-color-less",
"program": "${workspaceFolder}/scripts/scaffold/generate-color-less.js"
},
{
"type": "node",
"request": "launch",
Expand All @@ -20,7 +26,7 @@
"internalConsoleOptions": "openOnSessionStart",
"args": [
"${workspaceFolder}/scripts/site/generate.ts",
"architecture"
"table"
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ We will be insisting on a minimal reproduce scenario in order to save maintainer

Unfortunately we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that don't have enough info to be reproduced.

You can file new issues by filling out our [new issue form](https://github.com/cipchk/delon/issues/new).
You can file new issues by filling out our [new issue form](https://github.com/ng-alain/delon/issues/new).


### <a name="submit-pr"></a> Submitting a Pull Request (PR)
Before you submit your Pull Request (PR) consider the following guidelines:

* Search [GitHub](https://github.com/cipchk/delon/pulls) for an open or closed PR
* Search [GitHub](https://github.com/ng-alain/delon/pulls) for an open or closed PR
that relates to your submission. You don't want to duplicate effort.
* Make your changes in a new git branch:

Expand Down Expand Up @@ -148,7 +148,7 @@ to read on GitHub as well as in various git tools.
Footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
Samples: (even more [samples](https://github.com/cipchk/delon/commits/master))
Samples: (even more [samples](https://github.com/ng-alain/delon/commits/master))
```
docs(changelog): update change log to beta.5
Expand Down Expand Up @@ -196,5 +196,5 @@ A detailed explanation can be found in this [document][commit-message-format].


[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
[github]: https://github.com/cipchk/delon
[github]: https://github.com/ng-alain/delon
[plunker]: http://plnkr.co/edit
4 changes: 2 additions & 2 deletions Dockerfile.package
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM nginx
FROM nginx:stable-alpine

COPY /usr/src/app/_nginx/default.conf /etc/nginx/conf.d/

RUN rm -rf /usr/share/nginx/html/*

COPY /usr/src/app/site/dist /usr/share/nginx/html
COPY /usr/src/app/src/dist /usr/share/nginx/html

CMD ["nginx", "-g", "daemon off;"]
45 changes: 23 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,51 @@

delon is a production-ready solution for admin business components packages, Built on the design principles developed by Ant Design.

[![Build Status](https://travis-ci.org/cipchk/delon.svg?branch=master)](https://travis-ci.org/cipchk/delon)
[![Dependency Status](https://david-dm.org/cipchk/delon/status.svg)](https://david-dm.org/cipchk/delon)
[![DevDependency Status](https://david-dm.org/cipchk/delon/dev-status.svg)](https://david-dm.org/cipchk/delon?type=dev)
[![codecov](https://codecov.io/gh/cipchk/delon/branch/master/graph/badge.svg)](https://codecov.io/gh/cipchk/delon)
[![Build Status](https://travis-ci.org/ng-alain/delon.svg?branch=master)](https://travis-ci.org/ng-alain/delon)
[![Dependency Status](https://david-dm.org/ng-alain/delon/status.svg)](https://david-dm.org/ng-alain/delon)
[![DevDependency Status](https://david-dm.org/ng-alain/delon/dev-status.svg)](https://david-dm.org/ng-alain/delon?type=dev)
[![codecov](https://codecov.io/gh/ng-alain/delon/branch/master/graph/badge.svg)](https://codecov.io/gh/ng-alain/delon)
[![npm](https://img.shields.io/npm/l/@delon/theme.svg)](https://www.npmjs.com/package/@delon/theme)
[![npm](https://img.shields.io/npm/dm/@delon/theme.svg)](https://www.npmjs.com/package/@delon/theme)

| package name | npm version | npm next version | taobao version |
| ------------ |:-----:|:----------:|:----------:|
| ng-alain [Document](/cli) | [![NPM version](https://img.shields.io/npm/v/ng-alain.svg)](https://www.npmjs.com/package/ng-alain) | [![NPM version](https://img.shields.io/npm/v/ng-alain/next.svg)](https://www.npmjs.com/package/ng-alain) | [![Taobao version](https://npm.taobao.org/badge/v/ng-alain.svg?style=flat-square)](https://npm.taobao.org/package/ng-alain)
| @delon/theme [Document](/theme) | [![NPM version](https://img.shields.io/npm/v/@delon/theme.svg)](https://www.npmjs.com/package/@delon/theme) | [![NPM version](https://img.shields.io/npm/v/@delon/theme/next.svg)](https://www.npmjs.com/package/@delon/theme) | [![Taobao version](https://npm.taobao.org/badge/v/@delon/theme.svg?style=flat-square)](https://npm.taobao.org/package/@delon/theme)
| @delon/abc [Document](/components) | [![NPM version](https://img.shields.io/npm/v/@delon/abc.svg)](https://www.npmjs.com/package/@delon/abc) | [![NPM version](https://img.shields.io/npm/v/@delon/abc/next.svg)](https://www.npmjs.com/package/@delon/abc) | [![Taobao version](https://npm.taobao.org/badge/v/@delon/abc.svg?style=flat-square)](https://npm.taobao.org/package/@delon/abc)
| @delon/form [Document](/form) | [![NPM version](https://img.shields.io/npm/v/@delon/form.svg)](https://www.npmjs.com/package/@delon/form) | [![NPM version](https://img.shields.io/npm/v/@delon/form/next.svg)](https://www.npmjs.com/package/@delon/form) | [![Taobao version](https://npm.taobao.org/badge/v/@delon/form.svg?style=flat-square)](https://npm.taobao.org/package/@delon/form)
| @delon/acl [Document](/acl) | [![NPM version](https://img.shields.io/npm/v/@delon/acl.svg)](https://www.npmjs.com/package/@delon/acl) | [![NPM version](https://img.shields.io/npm/v/@delon/acl/next.svg)](https://www.npmjs.com/package/@delon/acl) | [![Taobao version](https://npm.taobao.org/badge/v/@delon/acl.svg?style=flat-square)](https://npm.taobao.org/package/@delon/acl)
| @delon/auth [Document](/auch) | [![NPM version](https://img.shields.io/npm/v/@delon/auth.svg)](https://www.npmjs.com/package/@delon/auth) | [![NPM version](https://img.shields.io/npm/v/@delon/auth/next.svg)](https://www.npmjs.com/package/@delon/auth) | [![Taobao version](https://npm.taobao.org/badge/v/@delon/auth.svg?style=flat-square)](https://npm.taobao.org/package/@delon/auth)
| @delon/mock [Document](/mock) | [![NPM version](https://img.shields.io/npm/v/@delon/mock.svg)](https://www.npmjs.com/package/@delon/mock) | [![NPM version](https://img.shields.io/npm/v/@delon/mock/next.svg)](https://www.npmjs.com/package/@delon/mock) | [![Taobao version](https://npm.taobao.org/badge/v/@delon/mock.svg?style=flat-square)](https://npm.taobao.org/package/@delon/mock)
| @delon/cache [Document](/cache) | [![NPM version](https://img.shields.io/npm/v/@delon/cache.svg)](https://www.npmjs.com/package/@delon/cache) | [![NPM version](https://img.shields.io/npm/v/@delon/cache/next.svg)](https://www.npmjs.com/package/@delon/cache) | [![Taobao version](https://npm.taobao.org/badge/v/@delon/cache.svg?style=flat-square)](https://npm.taobao.org/package/@delon/cache)
| @delon/util [Document](/util) | [![NPM version](https://img.shields.io/npm/v/@delon/util.svg)](https://www.npmjs.com/package/@delon/util) | [![NPM version](https://img.shields.io/npm/v/@delon/util/next.svg)](https://www.npmjs.com/package/@delon/util) | [![Taobao version](https://npm.taobao.org/badge/v/@delon/util.svg?style=flat-square)](https://npm.taobao.org/package/@delon/util)
| ng-alain [Document](https://ng-alain.com/cli) | [![NPM version](https://img.shields.io/npm/v/ng-alain.svg)](https://www.npmjs.com/package/ng-alain) | [![NPM version](https://img.shields.io/npm/v/ng-alain/next.svg)](https://www.npmjs.com/package/ng-alain) | [![Taobao version](https://npm.taobao.org/badge/v/ng-alain.svg?style=flat-square)](https://npm.taobao.org/package/ng-alain)
| @delon/theme [Document](https://ng-alain.com/theme) | [![NPM version](https://img.shields.io/npm/v/@delon/theme.svg)](https://www.npmjs.com/package/@delon/theme) | [![NPM version](https://img.shields.io/npm/v/@delon/theme/next.svg)](https://www.npmjs.com/package/@delon/theme) | [![Taobao version](https://npm.taobao.org/badge/v/@delon/theme.svg?style=flat-square)](https://npm.taobao.org/package/@delon/theme)
| @delon/abc [Document](https://ng-alain.com/components) | [![NPM version](https://img.shields.io/npm/v/@delon/abc.svg)](https://www.npmjs.com/package/@delon/abc) | [![NPM version](https://img.shields.io/npm/v/@delon/abc/next.svg)](https://www.npmjs.com/package/@delon/abc) | [![Taobao version](https://npm.taobao.org/badge/v/@delon/abc.svg?style=flat-square)](https://npm.taobao.org/package/@delon/abc)
| @delon/form [Document](https://ng-alain.com/form) | [![NPM version](https://img.shields.io/npm/v/@delon/form.svg)](https://www.npmjs.com/package/@delon/form) | [![NPM version](https://img.shields.io/npm/v/@delon/form/next.svg)](https://www.npmjs.com/package/@delon/form) | [![Taobao version](https://npm.taobao.org/badge/v/@delon/form.svg?style=flat-square)](https://npm.taobao.org/package/@delon/form)
| @delon/acl [Document](https://ng-alain.com/acl) | [![NPM version](https://img.shields.io/npm/v/@delon/acl.svg)](https://www.npmjs.com/package/@delon/acl) | [![NPM version](https://img.shields.io/npm/v/@delon/acl/next.svg)](https://www.npmjs.com/package/@delon/acl) | [![Taobao version](https://npm.taobao.org/badge/v/@delon/acl.svg?style=flat-square)](https://npm.taobao.org/package/@delon/acl)
| @delon/auth [Document](https://ng-alain.com/auch) | [![NPM version](https://img.shields.io/npm/v/@delon/auth.svg)](https://www.npmjs.com/package/@delon/auth) | [![NPM version](https://img.shields.io/npm/v/@delon/auth/next.svg)](https://www.npmjs.com/package/@delon/auth) | [![Taobao version](https://npm.taobao.org/badge/v/@delon/auth.svg?style=flat-square)](https://npm.taobao.org/package/@delon/auth)
| @delon/mock [Document](https://ng-alain.com/mock) | [![NPM version](https://img.shields.io/npm/v/@delon/mock.svg)](https://www.npmjs.com/package/@delon/mock) | [![NPM version](https://img.shields.io/npm/v/@delon/mock/next.svg)](https://www.npmjs.com/package/@delon/mock) | [![Taobao version](https://npm.taobao.org/badge/v/@delon/mock.svg?style=flat-square)](https://npm.taobao.org/package/@delon/mock)
| @delon/cache [Document](https://ng-alain.com/cache) | [![NPM version](https://img.shields.io/npm/v/@delon/cache.svg)](https://www.npmjs.com/package/@delon/cache) | [![NPM version](https://img.shields.io/npm/v/@delon/cache/next.svg)](https://www.npmjs.com/package/@delon/cache) | [![Taobao version](https://npm.taobao.org/badge/v/@delon/cache.svg?style=flat-square)](https://npm.taobao.org/package/@delon/cache)
| @delon/chart [Document](https://ng-alain.com/chart) | [![NPM version](https://img.shields.io/npm/v/@delon/chart.svg)](https://www.npmjs.com/package/@delon/chart) | [![NPM version](https://img.shields.io/npm/v/@delon/chart/next.svg)](https://www.npmjs.com/package/@delon/chart) | [![Taobao version](https://npm.taobao.org/badge/v/@delon/chart.svg?style=flat-square)](https://npm.taobao.org/package/@delon/chart)
| @delon/util [Document](https://ng-alain.com/util) | [![NPM version](https://img.shields.io/npm/v/@delon/util.svg)](https://www.npmjs.com/package/@delon/util) | [![NPM version](https://img.shields.io/npm/v/@delon/util/next.svg)](https://www.npmjs.com/package/@delon/util) | [![Taobao version](https://npm.taobao.org/badge/v/@delon/util.svg?style=flat-square)](https://npm.taobao.org/package/@delon/util)

## Links

+ [Home Page](http://ng-alain.com)
+ [@delon](https://github.com/cipchk/delon)
+ [DEMO](https://cipchk.github.io/ng-alain/)
+ [Home Page](https://ng-alain.com)
+ [@delon](https://github.com/ng-alain/delon)
+ [DEMO](//ng-alain.github.io/ng-alain/)

## Architecture

![Architecture](https://raw.githubusercontent.com/cipchk/delon/master/_screenshot/architecture.png)
![Architecture](https://raw.githubusercontent.com/ng-alain/delon/master/_screenshot/architecture.png)

## App Shots

![desktop](https://raw.githubusercontent.com/cipchk/delon/master/_screenshot/desktop.png)
![ipad](https://raw.githubusercontent.com/cipchk/delon/master/_screenshot/ipad.png)
![iphone](https://raw.githubusercontent.com/cipchk/delon/master/_screenshot/iphone.png)
![desktop](https://raw.githubusercontent.com/ng-alain/delon/master/_screenshot/desktop.png)
![ipad](https://raw.githubusercontent.com/ng-alain/delon/master/_screenshot/ipad.png)
![iphone](https://raw.githubusercontent.com/ng-alain/delon/master/_screenshot/iphone.png)

## Troubleshooting

Please follow this guidelines when reporting bugs and feature requests:

1. Use [GitHub Issues](https://github.com/cipchk/delon/issues) board to report bugs and feature requests (not our email address)
1. Use [GitHub Issues](https://github.com/ng-alain/delon/issues) board to report bugs and feature requests (not our email address)
2. Please **always** write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.

Thanks for understanding!

### License

The MIT License (see the [LICENSE](https://github.com/cipchk/delon/blob/master/LICENSE) file for the full text)
The MIT License (see the [LICENSE](https://github.com/ng-alain/delon/blob/master/LICENSE) file for the full text)
29 changes: 28 additions & 1 deletion _mock/user.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
import { MockStatusError, MockRequest } from '@delon/mock';
// import * as Mock from 'mockjs';

const r = (min: number, max: number) => Math.floor(Math.random() * (max - min + 1) + min);

export const USERS = {
// 支持值为 Object 和 Array
'GET /users': { users: [1, 2] },
'GET /users': (req: MockRequest) => {
const total = req.queryString.total || 100;
const res = {
list: [],
total,
};
for (let i = 0; i < +req.queryString.ps; i++) {
res.list.push({
id: i + 1,
picture: {
thumbnail: `https://randomuser.me/api/portraits/thumb/${r(0, 1) === 0 ? 'men' : 'women'}/${r(1, 50)}.jpg`,
},
name: {
last: `last-${r(1, 10)}`,
first: `first-${r(10, 20)}`,
},
nat: [ 'CH', 'US', 'DE' ][i % 3],
gender: [ 'male', 'female' ][i % 2],
email: `aaa${r(1, 10)}@qq.com`,
phone: `phone-${r(1000, 100000)}`,
price: r(10, 10000000),
registered: new Date()
});
}
return res;
},
'GET /user/check/': () => false,
'GET /user/check/:name': (req: MockRequest) => req.params.name === 'cipchk',
// GET POST 可省略
Expand Down
Loading

0 comments on commit 56366ca

Please sign in to comment.