Skip to content

Commit b9ddc6d

Browse files
authored
releases: 7.1.0-rc.1 (#140)
1 parent ccd9dc1 commit b9ddc6d

File tree

6 files changed

+49
-16
lines changed

6 files changed

+49
-16
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ngx-weui
2121
## Version
2222

2323
- WeUI 1.x using `7.0.x`
24-
- WeUI 2.x using `7.1.x`
24+
- WeUI 2.x using `7.1.0-rc.x` (in next version)
2525

2626
## Table of Contents
2727

@@ -58,7 +58,9 @@ cd demo
5858
3. add `ngx-weui`
5959

6060
```bash
61-
ng add ngx-weui
61+
ng add ngx-weui@next
62+
# Using WeUI 1.x
63+
# ng add ngx-weui
6264
```
6365

6466
> please refer to more [details](https://github.com/cipchk/ngx-weui/blob/master/docs/how.md).

components/ngx-weui.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ export * from 'ngx-weui/mask';
5656
export * from 'ngx-weui/rating';
5757
export * from 'ngx-weui/stepper';
5858
export * from 'ngx-weui/pagination';
59-
export * from 'ngx-weui/version';
59+
60+
export * from './version';
6061

6162
@NgModule({
6263
exports: [

components/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ngx-weui",
33
"version": "0.0.0-PLACEHOLDER",
4-
"description": "weui for angular",
4+
"description": "WeUI for angular",
55
"repository": {
66
"type": "git",
77
"url": "git+https://github.com/cipchk/ngx-weui.git"
@@ -18,7 +18,8 @@
1818
"angular weui",
1919
"angular2 weui",
2020
"angular4 weui",
21-
"weui"
21+
"weui",
22+
"weui 2"
2223
],
2324
"author": "cipchk <cipchk>",
2425
"license": "MIT",

components/schematics/shell/index.ts

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export default function(options: Schema): Rule {
1313
addThemeToAppStyles(options),
1414
addWeUIRootConfig(options),
1515
addAnimationRootConfig(options),
16+
updateAppPage(options),
1617
]);
1718
}
1819

@@ -30,7 +31,7 @@ function addWeUIRootConfig(options: Schema) {
3031
const workspace = getWorkspace(host);
3132
const project = getProjectFromWorkspace(workspace, options.project);
3233

33-
addModuleImportToRootModule(host, 'WeUiModule.forRoot()', 'ngx-weui', project);
34+
addModuleImportToRootModule(host, 'WeUiModule', 'ngx-weui', project);
3435

3536
return host;
3637
};
@@ -47,3 +48,34 @@ function addAnimationRootConfig(options: Schema) {
4748
return host;
4849
};
4950
}
51+
52+
const appHTML = `<div style="text-align:center; padding: 8px;">
53+
<h1>
54+
ngx-weui
55+
</h1>
56+
<p>
57+
ngx-weui 是 WeUI 的 Angular 版本,
58+
WeUI
59+
是一套同微信原生视觉体验一致的基础样式库,由微信官方设计团队为微信内网页和微信小程序量身设计,令用户的使用感知更加统一。
60+
</p>
61+
<p>
62+
</p>
63+
<div style="margin-top: 16px;">
64+
<button weui-button>Button</button>
65+
</div>
66+
</div>
67+
`;
68+
69+
function updateAppPage(options: Schema) {
70+
return (host: Tree) => {
71+
const workspace = getWorkspace(host);
72+
const project = getProjectFromWorkspace(workspace, options.project) as any;
73+
74+
const appHTMLFile = `${project.sourceRoot}/app/app.component.html`;
75+
if (host.exists(appHTMLFile)) {
76+
host.overwrite(appHTMLFile, appHTML);
77+
}
78+
79+
return host;
80+
};
81+
}

components/schematics/shell/theming.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { SchematicsException, Tree } from '@angular-devkit/schematics';
22
import { getStylesPath } from '../utils/ast';
33
import { InsertChange } from '../utils/devkit-utils/change';
4-
import { getProjectFromWorkspace, getWorkspace, Project, Workspace } from '../utils/devkit-utils/config';
4+
import { getProjectFromWorkspace, getWorkspace, Project } from '../utils/devkit-utils/config';
55
import { createCustomTheme } from './custom-theme';
66
import { Schema } from './schema';
77

package.json

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
{
22
"name": "ngx-weui",
3-
"version": "7.0.0",
4-
"description": "weui for angular",
3+
"version": "7.1.0-rc.1",
4+
"description": "WeUI for angular",
55
"repository": {
66
"type": "git",
77
"url": "git+https://github.com/cipchk/ngx-weui.git"
88
},
99
"keywords": [
1010
"ngx-weui",
11-
"ng2-weui",
12-
"ngx weui",
13-
"ng2 weui",
1411
"angular weui",
15-
"angular2 weui",
16-
"angular4 weui",
17-
"weui"
12+
"weui",
13+
"weui 2"
1814
],
1915
"author": "cipchk <cipchk>",
2016
"license": "MIT",
@@ -31,7 +27,8 @@
3127
"site:build:netlify": "npm run site:init && ng build --prod --build-optimizer --base-href /",
3228
"site:gh": "npm run site:build && gh-pages -d ./dist",
3329
"build": "bash scripts/build/build.sh",
34-
"release": "npm run build && cd publish && npm publish --access public"
30+
"release": "npm run build && cd publish && npm publish --access public",
31+
"release:next": "npm run build && cd publish && npm publish --access public --tag next"
3532
},
3633
"dependencies": {
3734
"@angular/animations": "~7.2.0",

0 commit comments

Comments
 (0)