Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
  • Loading branch information
luhc228 committed Feb 23, 2024
1 parent f94d18e commit b40f5df
Show file tree
Hide file tree
Showing 53 changed files with 260 additions and 297 deletions.
4 changes: 4 additions & 0 deletions packages/template-pkg-monorepo-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.1.0

- [feat] use `@ali/pkg-plugin-dev` instead of `@ice/pkg-plugin-docusaurus` internal

## 1.0.11

- [fix] 修复生成文档目录时包含其他非 `docs` 目录下文档问题
Expand Down
5 changes: 2 additions & 3 deletions packages/template-pkg-monorepo-react/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"name": "@ice/template-pkg-monorepo-react",
"version": "1.0.11",
"version": "1.1.0",
"files": [
"template",
"!template/component/.docusaurus",
"!template/component/build",
"!template/component/pnpm-lock.yaml",
"!template/**/node_modules",
Expand All @@ -30,4 +29,4 @@
"materialConfig": {
"type": "react"
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
"version": "0.0.0",
"private": true,
"scripts": {
"start": "pnpm packages:start & pnpm docs:start",
"build": "pnpm packages:build && pnpm docs:build",
"packages:start": "pnpm --parallel -r run start",
"packages:build": "pnpm -r run build",
"docs:start": "ice-pkg start",
"docs:build": "ice-pkg build",
"start": "pnpm --parallel -r run start",
"build": "pnpm -r run build",
"eslint": "eslint --cache --ext .js,.jsx,.ts,.tsx ./",
"eslint:fix": "pnpm eslint --fix",
"stylelint": "stylelint \"**/*.{css,scss,less}\"",
Expand All @@ -17,16 +13,8 @@
"lint:fix": "pnpm eslint:fix && pnpm stylelint:fix"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^2.3.1",
"@docusaurus/theme-classic": "^2.3.1",
"@ice/pkg": "^1.5.0",
"@ice/pkg-plugin-docusaurus": "^1.4.3",
"@applint/spec": "^1.0.0",
"@tsconfig/docusaurus": "^1.0.6",
"clsx": "^1.2.1",
"component-a": "workspace:*",
"component-b": "workspace:*",
"component-c": "workspace:*",
"eslint": "^8.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# header

组件功能描述

## Install

```bash
$ npm i header --save
```

## Usage

```jsx
import Header from 'header';
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { defineConfig } from '@ice/pkg';

// https://pkg.ice.work/reference/config/
export default defineConfig({
});
export default defineConfig({});
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "component-c",
"name": "header",
"version": "0.1.0",
"description": "组件功能描述",
"files": [
Expand Down Expand Up @@ -45,6 +45,8 @@
"@swc/helpers": "^0.5.1"
},
"devDependencies": {
"@ali/pkg-plugin-dev": "^1.0.0",
"@ali/pkg-plugin-dev-client": "^1.0.0",
"@ice/pkg": "^1.0.0",
"@types/react": "^18.0.0",
"react": "^18.0.0",
Expand All @@ -54,4 +56,4 @@
"react": "^17 || ^18"
},
"license": "MIT"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Write your style here. */
.componentC {
.ComponentA {
display: block;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ import * as React from 'react';
import styles from './index.module.css';

interface ComponentProps {
/** Title for componentC. */
title: string;
title?: string;
}

export default function componentC(props: ComponentProps) {
export default function Header(props: ComponentProps) {
const { title = 'Hello World!' } = props;

return (
<div className={styles.componentC}>{title}</div>
<div className={styles.ComponentA}>Header {title}</div>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { defineConfig } from '@ice/pkg';

// https://pkg.ice.work/reference/config/
export default defineConfig({
<% if (locals.internal) { _%>
plugins: [
[
'@ali/pkg-plugin-dev',
{
clientArgs: {
port: 3001,
}
},
],
],
<% } _%>
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
import Mod from '../src';

export default () => {
return <Mod title={'Hi!'} />;
};

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@
],
"dependencies": {
"@ice/jsx-runtime": "^0.2.0",
"@swc/helpers": "^0.5.1"
"@swc/helpers": "^0.5.1",
"header": "workspace:^"
},
"devDependencies": {
"@ice/runtime": "^1.4.1",
"@ice/pkg": "^1.0.0",
"@types/react": "^18.0.0",
"react": "^18.0.0",
Expand All @@ -54,4 +56,4 @@
"react": "^17 || ^18"
},
"license": "MIT"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"name": "component-a",
"version": "0.1.0",
"description": "组件功能描述",
"files": [
"esm",
"cjs",
"es2017",
"dist"
],
"main": "esm/index.js",
"module": "esm/index.js",
"types": "esm/index.d.ts",
"exports": {
".": {
"es2017": {
"types": "./es2017/index.d.ts",
"default": "./es2017/index.js"
},
"default": {
"types": "./esm/index.d.ts",
"default": "./esm/index.js"
}
},
"./*": "./*"
},
"sideEffects": [
"dist/*",
"*.scss",
"*.less",
"*.css"
],
"scripts": {
"start": "ice-pkg start",
"build": "rimraf esm es2017 && ice-pkg build",
"prepublishOnly": "npm run build"
},
"keywords": [
"icepkg",
"react",
"component"
],
"dependencies": {
"@ice/jsx-runtime": "^0.2.0",
"@swc/helpers": "^0.5.1",
"header": "workspace:^"
},
"devDependencies": {
<% if (locals.internal) { _%>
"@ice/runtime": "^1.0.0",
"@ali/pkg-plugin-dev": "^1.0.0",
"@ali/pkg-plugin-dev-client": "^1.0.0",
<% } _%>
"@ice/pkg": "^1.0.0",
"@types/react": "^18.0.0",
"react": "^18.0.0",
"typescript": "^4.9.4"
},
"peerDependencies": {
"react": "^17 || ^18"
},
"license": "MIT"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react';
import Header from 'header';
import styles from './index.module.css';

interface ComponentProps {
Expand All @@ -10,6 +11,9 @@ export default function ComponentA(props: ComponentProps) {
const { title = 'Hello World!' } = props;

return (
<div className={styles.ComponentA}>{title}</div>
<div className={styles.ComponentA}>
<Header />
{title}
</div>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { defineConfig } from '@ice/pkg';

// https://pkg.ice.work/reference/config/
export default defineConfig({
<% if (locals.internal) { _%>
plugins: [
[
'@ali/pkg-plugin-dev',
{
clientArgs: {
port: 3002,
}
},
],
],
<% } _%>
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
import Mod from '../src';

export default () => {
return <Mod title={'Hi!'} />;
};

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit b40f5df

Please sign in to comment.