Skip to content

Commit 6079dc2

Browse files
committed
refactor: migrate to lerna monorepo
1 parent 080f5d7 commit 6079dc2

File tree

618 files changed

+4412
-884
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

618 files changed

+4412
-884
lines changed

.eslintrc.js

-25
This file was deleted.

docs/4.0/api/CPopoverContent.api.mdx

-24
This file was deleted.

docs/4.0/api/CTableCaption.api.mdx

-9
This file was deleted.

docs/4.0/api/CTooltipContent.api.mdx

-22
This file was deleted.

gatsby-browse.js

-1
This file was deleted.

lerna.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"npmClient": "yarn",
3+
"packages": [
4+
"packages/*"
5+
],
6+
"useWorkspaces": true,
7+
"version": "4.0.0-rc.4"
8+
}

package.json

+13-92
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,20 @@
11
{
2-
"name": "@coreui/react",
3-
"version": "4.0.0-rc.4",
4-
"config": {
5-
"version_short": "4.0"
6-
},
7-
"description": "",
8-
"license": "MIT",
9-
"main": "dist/index.js",
10-
"module": "dist/index.es.js",
11-
"jsnext:main": "dist/index.es.js",
12-
"files": [
13-
"dist/",
14-
"src/components/",
15-
"src/utils/",
16-
"src/index.ts",
17-
"tsconfig.json",
18-
"package.json"
2+
"private": true,
3+
"workspaces": [
4+
"packages/*"
195
],
206
"scripts": {
21-
"build": "rollup -c",
22-
"docs:api": "rimraf \"content/docs/$npm_package_config_version_short/api/*\" & node build/api.js",
23-
"docs:build": "gatsby build --prefix-paths",
24-
"docs:dist": "run-s docs:api docs:build",
25-
"docs:dev": "gatsby develop",
26-
"docs:serve": "gatsby serve",
27-
"lint": "eslint \"src/components/**/*.{js,ts,tsx}\"",
28-
"test": "jest --coverage",
29-
"test:update": "jest --coverage --updateSnapshot"
30-
},
31-
"peerDependencies": {
32-
"@coreui/coreui": "^4.0.4",
33-
"react": "^17",
34-
"react-dom": "^17"
7+
"docs:api": "lerna run --scope \"@coreui/react-docs\" api --stream",
8+
"docs:dev": "lerna run --scope \"@coreui/react-docs\" develop --stream",
9+
"docs:build": "lerna run --scope \"@coreui/react-docs\" build --stream",
10+
"docs:clean": "lerna run --scope \"@coreui/react-docs\" clean",
11+
"docs:dist": "lerna run --scope \"@coreui/react-docs\" dist --stream",
12+
"lib:build": "lerna run --scope \"@coreui/react\" build --stream",
13+
"lib:lint": "lerna run --scope \"@coreui/react\" lint --stream",
14+
"lib:test": "lerna run --scope \"@coreui/react\" test --stream"
3515
},
3616
"devDependencies": {
37-
"@coreui/coreui": "^4.0.4",
38-
"@coreui/icons": "^2.0.1",
39-
"@coreui/icons-react": "^2.0.0-rc.5",
40-
"@coreui/react-chartjs": "^2.0.0-rc.1",
41-
"@mdx-js/mdx": "^1.6.22",
42-
"@mdx-js/react": "^1.6.22",
43-
"@popperjs/core": "^2.10.2",
44-
"@rollup/plugin-commonjs": "^21.0.0",
45-
"@rollup/plugin-node-resolve": "^13.0.5",
46-
"@rollup/plugin-typescript": "^8.2.5",
47-
"@testing-library/jest-dom": "^5.14.1",
48-
"@testing-library/react": "^12.1.2",
49-
"@types/react": "^17.0.27",
50-
"@types/react-dom": "^17.0.9",
51-
"@types/react-helmet": "^6.1.3",
52-
"@types/react-transition-group": "^4.4.3",
53-
"@typescript-eslint/eslint-plugin": "^4.33.0",
54-
"@typescript-eslint/parser": "^4.33.0",
55-
"classnames": "^2.3.1",
56-
"eslint": "^7.32.0",
57-
"eslint-config-prettier": "^8.3.0",
58-
"eslint-plugin-jsdoc": "^36.1.0",
59-
"eslint-plugin-prettier": "^4.0.0",
60-
"eslint-plugin-react": "^7.26.1",
61-
"eslint-plugin-react-hooks": "^4.2.0",
62-
"gatsby": "^3.14.2",
63-
"gatsby-plugin-google-gtag": "3",
64-
"gatsby-plugin-manifest": "^3.14.0",
65-
"gatsby-plugin-mdx": "^2.14.0",
66-
"gatsby-plugin-sass": "4",
67-
"gatsby-plugin-sitemap": "4",
68-
"gatsby-remark-autolink-headers": "^4.11.0",
69-
"gatsby-source-filesystem": "^3.14.0",
70-
"glob": "^7.2.0",
71-
"globby": "^11.0.4",
72-
"jest": "^27.2.5",
73-
"npm-run-all": "^4.1.5",
74-
"prettier": "^2.4.1",
75-
"prism-react-renderer": "^1.2.1",
76-
"prismjs": "^1.25.0",
77-
"react": "^17.0.1",
78-
"react-docgen-typescript": "^2.1.0",
79-
"react-dom": "^17.0.1",
80-
"react-github-btn": "^1.2.1",
81-
"react-helmet": "^6.1.0",
82-
"react-popper": "^2.2.5",
83-
"react-transition-group": "^4.4.2",
84-
"remark-html": "^13.0.2",
85-
"rimraf": "^3.0.2",
86-
"rollup": "^2.56.22.56.2",
87-
"rollup-plugin-peer-deps-external": "^2.2.4",
88-
"sass": "^1.42.1",
89-
"ts-jest": "^27.0.5",
90-
"typescript": "^4.4.3"
17+
"lerna": "^4.0.0"
9118
},
92-
"jest": {
93-
"preset": "ts-jest",
94-
"testEnvironment": "jsdom",
95-
"testPathIgnorePatterns": [
96-
"dist/"
97-
]
98-
}
19+
"name": "react"
9920
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
/.docz/**
21
/dist/**
32
.eslintrc.js

packages/coreui-react/.eslintrc.js

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/**
2+
* Copyright (c) 2013-present, creativeLabs Lukasz Holeczek.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
'use strict'
9+
10+
module.exports = {
11+
root: true, // So parent files don't get applied
12+
env: {
13+
es6: true,
14+
browser: true,
15+
node: true,
16+
},
17+
extends: [
18+
'plugin:react/recommended',
19+
'plugin:@typescript-eslint/recommended',
20+
'plugin:prettier/recommended',
21+
],
22+
parser: '@typescript-eslint/parser',
23+
parserOptions: {
24+
ecmaVersion: 2020,
25+
sourceType: 'module',
26+
ecmaFeatures: {
27+
jsx: true,
28+
},
29+
},
30+
plugins: ['@typescript-eslint', 'react', 'react-hooks'],
31+
settings: {
32+
react: {
33+
pragma: 'React',
34+
version: 'detect',
35+
},
36+
},
37+
}
File renamed without changes.
File renamed without changes.

packages/coreui-react/package.json

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"name": "@coreui/react",
3+
"version": "4.0.0-rc.4",
4+
"license": "MIT",
5+
"main": "dist/index.js",
6+
"module": "dist/index.es.js",
7+
"jsnext:main": "dist/index.es.js",
8+
"typings": "dist/index.d.ts",
9+
"files": [
10+
"dist/",
11+
"src/components/",
12+
"src/utils/",
13+
"src/index.ts",
14+
"tsconfig.json",
15+
"package.json"
16+
],
17+
"scripts": {
18+
"build": "rollup -c",
19+
"lint": "eslint \"src/components/**/*.{js,ts,tsx}\"",
20+
"test": "jest --coverage",
21+
"test:update": "jest --coverage --updateSnapshot"
22+
},
23+
"devDependencies": {
24+
"@popperjs/core": "^2.10.2",
25+
"@rollup/plugin-commonjs": "^21.0.0",
26+
"@rollup/plugin-node-resolve": "^13.0.5",
27+
"@rollup/plugin-typescript": "^8.2.5",
28+
"@testing-library/jest-dom": "^5.14.1",
29+
"@testing-library/react": "^12.1.2",
30+
"@types/react": "^17.0.30",
31+
"@types/react-dom": "^17.0.9",
32+
"@types/react-transition-group": "^4.4.3",
33+
"@typescript-eslint/eslint-plugin": "^5.0.0",
34+
"@typescript-eslint/parser": "^5.0.0",
35+
"classnames": "^2.3.1",
36+
"eslint": "^7.32.0",
37+
"eslint-config-prettier": "^8.3.0",
38+
"eslint-plugin-prettier": "^4.0.0",
39+
"eslint-plugin-react": "^7.26.1",
40+
"eslint-plugin-react-hooks": "^4.2.0",
41+
"jest": "^27.2.5",
42+
"prettier": "^2.4.1",
43+
"prop-types": "^15.7.2",
44+
"react": "^17.0.2",
45+
"react-dom": "^17.0.2",
46+
"react-popper": "^2.2.5",
47+
"react-transition-group": "^4.4.2",
48+
"rollup": "^2.58.0",
49+
"rollup-plugin-peer-deps-external": "^2.2.4",
50+
"ts-jest": "^27.0.5",
51+
"typescript": "^4.4.4"
52+
},
53+
"peerDependencies": {
54+
"react": "^17",
55+
"react-dom": "^17"
56+
},
57+
"jest": {
58+
"preset": "ts-jest",
59+
"testEnvironment": "jsdom",
60+
"testPathIgnorePatterns": [
61+
"dist/"
62+
]
63+
}
64+
}

rollup.config.js renamed to packages/coreui-react/rollup.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default {
2727
tsconfig: './tsconfig.json',
2828
}),
2929
commonjs({
30-
include: ['node_modules/**'],
30+
include: ['../../node_modules/**'],
3131
}),
3232
],
3333
}

0 commit comments

Comments
 (0)