Skip to content

Commit

Permalink
🎉 chore: init 初始化 JournalMap 组件
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Mar 31, 2021
1 parent bfe5320 commit 5902e91
Show file tree
Hide file tree
Showing 14 changed files with 148 additions and 1 deletion.
17 changes: 17 additions & 0 deletions docs/components/biz/examples/JournalMap/Demo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react';
import JournalMap from '@arvinxu/journal-map';

const Demo = () => {
return (
<div
style={{
background: '#fafafa',
padding: 24,
}}
>
<JournalMap />
</div>
);
};

export default Demo;
Empty file.
21 changes: 21 additions & 0 deletions docs/components/biz/journal-map.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: JournalMap
order: 3
---

# JournalMap 用户旅程地图

[![NPM version][version-image]][version-url] [![NPM downloads][download-image]][download-url]

[version-image]: http://img.shields.io/npm/v/@arvinxu/journal-map.svg?color=deepgreen&label=latest
[version-url]: http://npmjs.org/package/@arvinxu/journal-map
[download-image]: https://img.shields.io/npm/dm/@arvinxu/journal-map.svg
[download-url]: https://github.com/arvinxx/components/tree/master/packages/journal-map

展示用户旅程地图的组件

## 演示

<code src='./examples/JournalMap/Demo.tsx' />

<API src='../../../packages/journal-map/src/index.tsx'></API>
1 change: 1 addition & 0 deletions jest.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports = {
'@arvinxu/preloader': '<rootDir>/packages/preloader/src',
'@arvinxu/macos-traffic-light':
'<rootDir>/packages/macos-traffic-light/src',
'@arvinxu/journal-map': '<rootDir>/packages/journal-map/src',
'@arvinxu/float-label-input': '<rootDir>/packages/float-label-input/src',
'@arvinxu/page-loading': '<rootDir>/packages/page-loading/src',
'@arvinxu/mindflow': '<rootDir>/packages/mindflow/src',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"start": "yarn docs:dev",
"build": "father-build && yarn build:webpack",
"build:webpack": "lerna run webpack",
"create-pkg": "ts-node scripts/create-package",
"c": "ts-node scripts/create-package",
"---------": "",
"release": "multi-semantic-release",
"--------- ": "",
Expand Down
5 changes: 5 additions & 0 deletions packages/journal-map/.fatherrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const base = require('../../.fatherrc');

module.exports = {
...base,
};
16 changes: 16 additions & 0 deletions packages/journal-map/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# @arvinxu/journal-map

[![NPM version][version-image]][version-url] [![NPM downloads][download-image]][download-url]

用户旅程地图

## License

[MIT](../../LICENSE) ® Arvin Xu

<!-- npm url -->

[version-image]: http://img.shields.io/npm/v/@arvinxu/journal-map.svg?color=deepgreen&label=latest
[version-url]: http://npmjs.org/package/@arvinxu/journal-map
[download-image]: https://img.shields.io/npm/dm/@arvinxu/journal-map.svg
[download-url]: https://npmjs.org/package/@arvinxu/journal-map
14 changes: 14 additions & 0 deletions packages/journal-map/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const base = require('../../jest.config.base');

const packageName = '@arvinxu/journal-map';

const root = '<rootDir>/packages/journal-map';

module.exports = {
...base,
rootDir: '../..',
roots: [root],
name: packageName,
displayName: packageName,
collectCoverageFrom: [`${root}/src/**/*.tsx`, `${root}/src/**/*.ts`],
};
25 changes: 25 additions & 0 deletions packages/journal-map/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "@arvinxu/journal-map",
"version": "1.0.0",
"files": [
"lib",
"es"
],
"main": "lib/index.js",
"module": "es/index.js",
"homepage": "https://github.com/arvinxx/components/tree/master/packages/journal-map#readme",
"repository": "git+https://github.com/arvinxx/components.git",
"publishConfig": {
"registry": "https://registry.npmjs.org",
"access": "public"
},
"scripts": {
"build": "father-build && yarn webpack",
"webpack": "webpack",
"test": "jest",
"test:update": "jest -u",
"prepublishOnly": "yarn build",
"cov": "jest --coverage",
"clean": "rm -rf es lib dist build coverage .umi"
}
}
9 changes: 9 additions & 0 deletions packages/journal-map/src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { FC } from 'react';

export interface JournalMapProps {}

const JournalMap: FC<JournalMapProps> = () => {
return <div>JournalMap</div>;
};

export default JournalMap;
11 changes: 11 additions & 0 deletions packages/journal-map/tests/index.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';
import { render } from '@testing-library/react';

import JournalMap from '@arvinxu/journal-map';

describe('JournalMap', () => {
it('默认状态', () => {
const { container } = render(<JournalMap />);
expect(container).toMatchSnapshot();
});
});
15 changes: 15 additions & 0 deletions packages/journal-map/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"declaration": true,
"jsx": "react-jsx",
"skipLibCheck": true,
/* babel 输出类型 */
"moduleResolution": "Node",
"target": "ESNext",
"module": "ESNext",
/* 模块导入配置项 */
"esModuleInterop": true,
"types": ["../../types", "@types/jest"]
}
}
11 changes: 11 additions & 0 deletions packages/journal-map/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const path = require('path');
const config = require('../../webpack.config');

module.exports = {
...config,
output: {
...config.output,
library: 'JournalMap',
path: path.resolve(__dirname, 'dist'),
},
};
2 changes: 2 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
"@arvinxu/macos-traffic-light/*": [
"./packages/macos-traffic-light/src/*"
],
"@arvinxu/journal-map": ["./packages/journal-map/src"],
"@arvinxu/journal-map/*": ["./packages/journal-map/src/*"],
"@arvinxu/float-label-input": ["./packages/float-label-input/src"],
"@arvinxu/page-loading": ["./packages/page-loading/src"],
"@arvinxu/mindflow": ["./packages/mindflow/src"],
Expand Down

0 comments on commit 5902e91

Please sign in to comment.