Skip to content

Commit

Permalink
releases: 7.1.0-rc.1 (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed May 13, 2019
1 parent ccd9dc1 commit b9ddc6d
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 16 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ngx-weui
## Version

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

## Table of Contents

Expand Down Expand Up @@ -58,7 +58,9 @@ cd demo
3. add `ngx-weui`

```bash
ng add ngx-weui
ng add ngx-weui@next
# Using WeUI 1.x
# ng add ngx-weui
```

> please refer to more [details](https://github.com/cipchk/ngx-weui/blob/master/docs/how.md).
Expand Down
3 changes: 2 additions & 1 deletion components/ngx-weui.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ export * from 'ngx-weui/mask';
export * from 'ngx-weui/rating';
export * from 'ngx-weui/stepper';
export * from 'ngx-weui/pagination';
export * from 'ngx-weui/version';

export * from './version';

@NgModule({
exports: [
Expand Down
5 changes: 3 additions & 2 deletions components/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ngx-weui",
"version": "0.0.0-PLACEHOLDER",
"description": "weui for angular",
"description": "WeUI for angular",
"repository": {
"type": "git",
"url": "git+https://github.com/cipchk/ngx-weui.git"
Expand All @@ -18,7 +18,8 @@
"angular weui",
"angular2 weui",
"angular4 weui",
"weui"
"weui",
"weui 2"
],
"author": "cipchk <cipchk>",
"license": "MIT",
Expand Down
34 changes: 33 additions & 1 deletion components/schematics/shell/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default function(options: Schema): Rule {
addThemeToAppStyles(options),
addWeUIRootConfig(options),
addAnimationRootConfig(options),
updateAppPage(options),
]);
}

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

addModuleImportToRootModule(host, 'WeUiModule.forRoot()', 'ngx-weui', project);
addModuleImportToRootModule(host, 'WeUiModule', 'ngx-weui', project);

return host;
};
Expand All @@ -47,3 +48,34 @@ function addAnimationRootConfig(options: Schema) {
return host;
};
}

const appHTML = `<div style="text-align:center; padding: 8px;">
<h1>
ngx-weui
</h1>
<p>
ngx-weui 是 WeUI 的 Angular 版本,
WeUI
是一套同微信原生视觉体验一致的基础样式库,由微信官方设计团队为微信内网页和微信小程序量身设计,令用户的使用感知更加统一。
</p>
<p>
</p>
<div style="margin-top: 16px;">
<button weui-button>Button</button>
</div>
</div>
`;

function updateAppPage(options: Schema) {
return (host: Tree) => {
const workspace = getWorkspace(host);
const project = getProjectFromWorkspace(workspace, options.project) as any;

const appHTMLFile = `${project.sourceRoot}/app/app.component.html`;
if (host.exists(appHTMLFile)) {
host.overwrite(appHTMLFile, appHTML);
}

return host;
};
}
2 changes: 1 addition & 1 deletion components/schematics/shell/theming.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { SchematicsException, Tree } from '@angular-devkit/schematics';
import { getStylesPath } from '../utils/ast';
import { InsertChange } from '../utils/devkit-utils/change';
import { getProjectFromWorkspace, getWorkspace, Project, Workspace } from '../utils/devkit-utils/config';
import { getProjectFromWorkspace, getWorkspace, Project } from '../utils/devkit-utils/config';
import { createCustomTheme } from './custom-theme';
import { Schema } from './schema';

Expand Down
15 changes: 6 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
{
"name": "ngx-weui",
"version": "7.0.0",
"description": "weui for angular",
"version": "7.1.0-rc.1",
"description": "WeUI for angular",
"repository": {
"type": "git",
"url": "git+https://github.com/cipchk/ngx-weui.git"
},
"keywords": [
"ngx-weui",
"ng2-weui",
"ngx weui",
"ng2 weui",
"angular weui",
"angular2 weui",
"angular4 weui",
"weui"
"weui",
"weui 2"
],
"author": "cipchk <cipchk>",
"license": "MIT",
Expand All @@ -31,7 +27,8 @@
"site:build:netlify": "npm run site:init && ng build --prod --build-optimizer --base-href /",
"site:gh": "npm run site:build && gh-pages -d ./dist",
"build": "bash scripts/build/build.sh",
"release": "npm run build && cd publish && npm publish --access public"
"release": "npm run build && cd publish && npm publish --access public",
"release:next": "npm run build && cd publish && npm publish --access public --tag next"
},
"dependencies": {
"@angular/animations": "~7.2.0",
Expand Down

0 comments on commit b9ddc6d

Please sign in to comment.