mirror of
https://github.com/aleleba/create-react-component-library.git
synced 2026-07-21 06:27:43 -06:00
Compare commits
11 Commits
364409dbed
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| ce33af9093 | |||
| d264fccaad | |||
|
62dd7186c1
|
|||
|
df367639b9
|
|||
|
9223b1e144
|
|||
|
a246c190ce
|
|||
|
d5891e8e09
|
|||
|
134b9e04f6
|
|||
|
116d8a5667
|
|||
|
e9fb6ca556
|
|||
|
6c3dd344e6
|
14
.github/workflows/main-workflow.yml
vendored
14
.github/workflows/main-workflow.yml
vendored
@@ -16,14 +16,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [22.x]
|
||||
node-version: [24.x]
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js 22
|
||||
- name: Use Node.js 24
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
node-version: 24
|
||||
cache: 'npm'
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- run: npm ci
|
||||
@@ -34,10 +34,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js 22
|
||||
- name: Use Node.js 24
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
node-version: 24
|
||||
cache: 'npm'
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- name: Cypress install
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
node-version: 24
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
@@ -71,7 +71,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
node-version: 24
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- run: npm ci
|
||||
- run: npm publish --access=public
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
#nodemodules
|
||||
node_modules
|
||||
.env
|
||||
dist
|
||||
dist
|
||||
.worktrees
|
||||
@@ -77,5 +77,30 @@ module.exports = {
|
||||
docs: {
|
||||
autodocs: 'tag',
|
||||
defaultName: 'Docs',
|
||||
}
|
||||
},
|
||||
|
||||
// Babel 8 removed the `bugfixes` option from @babel/preset-env (it's now always on).
|
||||
// Storybook injects bugfixes:true in its internal overrides AFTER babelDefault, so we
|
||||
// strip it here in the `babel` hook which runs after all presets have composed the config.
|
||||
async babel(config) {
|
||||
const stripBugfixes = preset => {
|
||||
if (!Array.isArray(preset)) return preset;
|
||||
const [name, options] = preset;
|
||||
if (typeof name === 'string' && name.includes('@babel/preset-env') && options?.bugfixes !== undefined) {
|
||||
const { bugfixes: _removed, ...rest } = options;
|
||||
return [name, rest];
|
||||
}
|
||||
return preset;
|
||||
};
|
||||
if (config.presets) {
|
||||
config.presets = config.presets.map(stripBugfixes);
|
||||
}
|
||||
if (config.overrides) {
|
||||
config.overrides = config.overrides.map(override => {
|
||||
if (!override.presets) return override;
|
||||
return { ...override, presets: override.presets.map(stripBugfixes) };
|
||||
});
|
||||
}
|
||||
return config;
|
||||
},
|
||||
};
|
||||
|
||||
9244
package-lock.json
generated
9244
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
49
package.json
49
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@aleleba/create-react-component-library",
|
||||
"version": "1.4.0",
|
||||
"version": "1.4.2",
|
||||
"description": "A starter kit for create a React component Library with storybook",
|
||||
"bin": "./bin/cli.js",
|
||||
"main": "dist/index.js",
|
||||
@@ -44,26 +44,26 @@
|
||||
},
|
||||
"homepage": "https://github.com/aleleba/create-react-component-library#readme",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.29.7",
|
||||
"@babel/preset-env": "^7.29.7",
|
||||
"@babel/preset-react": "^7.29.7",
|
||||
"@babel/preset-typescript": "^7.29.7",
|
||||
"@babel/register": "^7.29.7",
|
||||
"@babel/core": "^8.0.1",
|
||||
"@babel/preset-env": "^8.0.2",
|
||||
"@babel/preset-react": "^8.0.1",
|
||||
"@babel/preset-typescript": "^8.0.1",
|
||||
"@babel/register": "^8.0.1",
|
||||
"@eslint/js": "^9.39.4",
|
||||
"@mdx-js/react": "^3.1.1",
|
||||
"@storybook/addon-docs": "^10.4.3",
|
||||
"@storybook/addon-links": "^10.4.3",
|
||||
"@storybook/addon-docs": "^10.5.0",
|
||||
"@storybook/addon-links": "^10.5.0",
|
||||
"@storybook/addon-styling-webpack": "^3.0.2",
|
||||
"@storybook/addon-webpack5-compiler-babel": "^4.0.1",
|
||||
"@storybook/cli": "^10.4.3",
|
||||
"@storybook/cli": "^10.5.0",
|
||||
"@storybook/preset-scss": "^1.0.3",
|
||||
"@storybook/react-webpack5": "^10.4.3",
|
||||
"@storybook/react-webpack5": "^10.5.0",
|
||||
"@testing-library/dom": "^10.4.1",
|
||||
"@testing-library/jest-dom": "^6.9.1",
|
||||
"@testing-library/react": "^16.3.2",
|
||||
"@testing-library/user-event": "^14.6.1",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/node": "^25.9.2",
|
||||
"@types/node": "^26.1.1",
|
||||
"@types/react": "^19.2.17",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@types/webpack": "^5.28.5",
|
||||
@@ -71,37 +71,44 @@
|
||||
"clean-webpack-plugin": "^4.0.0",
|
||||
"css-loader": "^7.1.4",
|
||||
"css-minimizer-webpack-plugin": "^8.0.0",
|
||||
"cypress": "^15.17.0",
|
||||
"cypress": "^15.18.1",
|
||||
"dotenv": "^17.4.2",
|
||||
"eslint": "^9.39.4",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-storybook": "^10.4.3",
|
||||
"eslint-plugin-storybook": "^10.4.6",
|
||||
"eslint-webpack-plugin": "^6.0.0",
|
||||
"globals": "^16.5.0",
|
||||
"globals": "^17.7.0",
|
||||
"html-webpack-plugin": "^5.6.7",
|
||||
"identity-obj-proxy": "^3.0.0",
|
||||
"jest": "^30.4.2",
|
||||
"jest-environment-jsdom": "^30.4.1",
|
||||
"jest-fetch-mock": "^3.0.3",
|
||||
"jest-fetch-mock": "^4.2.0",
|
||||
"mini-css-extract-plugin": "^2.10.2",
|
||||
"react": "^19.2.7",
|
||||
"react-dom": "^19.2.7",
|
||||
"resolve-ts-aliases": "^1.0.1",
|
||||
"sass": "^1.100.0",
|
||||
"sass": "^1.101.0",
|
||||
"sass-loader": "^17.0.0",
|
||||
"storybook": "^10.4.3",
|
||||
"storybook": "^10.5.0",
|
||||
"style-loader": "^4.0.0",
|
||||
"terser-webpack-plugin": "^5.6.1",
|
||||
"ts-jest": "^29.4.11",
|
||||
"ts-loader": "^9.6.0",
|
||||
"ts-loader": "^9.6.2",
|
||||
"ts-node": "^10.9.2",
|
||||
"tsconfig-paths-webpack-plugin": "^4.2.0",
|
||||
"typescript": "^6.0.3",
|
||||
"typescript-eslint": "^8.61.0",
|
||||
"typescript-eslint": "^8.61.1",
|
||||
"url-loader": "^4.1.1",
|
||||
"webpack": "^5.107.2",
|
||||
"webpack-cli": "^7.0.3",
|
||||
"webpack": "^5.108.4",
|
||||
"webpack-cli": "^7.2.1",
|
||||
"webpack-node-externals": "^3.0.0"
|
||||
},
|
||||
"overrides": {
|
||||
"ts-jest": {
|
||||
"@babel/core": "^8.0.1"
|
||||
},
|
||||
"js-yaml": "^4.2.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0"
|
||||
|
||||
18
tsconfig.cy.json
Normal file
18
tsconfig.cy.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "."
|
||||
},
|
||||
"include": [
|
||||
"src",
|
||||
"cypress",
|
||||
"src/@types"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"dist",
|
||||
"**/*.stories.*",
|
||||
"**/*.test.ts",
|
||||
"**/*.test.tsx"
|
||||
]
|
||||
}
|
||||
@@ -25,7 +25,7 @@ export default {
|
||||
mode: 'production',
|
||||
output: {
|
||||
filename: 'index.js',
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
path: path.resolve('dist'),
|
||||
library: libraryName,
|
||||
libraryTarget: 'umd',
|
||||
globalObject: 'this',
|
||||
|
||||
@@ -22,7 +22,7 @@ export default {
|
||||
},
|
||||
mode: 'development',
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
path: path.resolve('dist'),
|
||||
},
|
||||
target: 'web',
|
||||
plugins: [
|
||||
@@ -37,7 +37,7 @@ export default {
|
||||
}),
|
||||
new ESLintPlugin(),
|
||||
new HtmlWebpackPlugin({
|
||||
template: path.join(__dirname, 'public', 'index.html'),
|
||||
template: path.join('public', 'index.html'),
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
React: 'react',
|
||||
@@ -48,7 +48,10 @@ export default {
|
||||
{
|
||||
test: /\.(ts|tsx)$/,
|
||||
exclude: /node_modules/,
|
||||
use: 'ts-loader',
|
||||
use: {
|
||||
loader: 'ts-loader',
|
||||
options: { configFile: 'tsconfig.cy.json' },
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.(js|jsx)$/,
|
||||
|
||||
Reference in New Issue
Block a user