-
-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Create a new Module Federation project cli
- Loading branch information
Showing
90 changed files
with
3,053 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'create-module-federation': patch | ||
--- | ||
|
||
feat: add Create a new Module Federation project cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
node_modules/ | ||
vite.config.ts | ||
**/dist/** | ||
**/dist/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,5 @@ apps/website-new/docs | |
|
||
/.nx/workspace-data | ||
/.nx/cache | ||
|
||
**/*.handlebars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# create-module-federation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024-present hanric(2heal1) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# `create-module-federation` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// For a detailed explanation regarding each configuration property, visit: | ||
// https://jestjs.io/docs/en/configuration.html | ||
|
||
module.exports = { | ||
clearMocks: true, | ||
testEnvironment: 'jsdom', | ||
coveragePathIgnorePatterns: ['__tests__', '/node_modules/'], | ||
coverageProvider: 'v8', | ||
coverageReporters: ['cobertura', 'clover', 'json', 'lcov', 'text'], | ||
globals: { | ||
__DEV__: true, | ||
__TEST__: true, | ||
__BROWSER__: false, | ||
__VERSION__: '"unknown"', | ||
}, | ||
preset: 'ts-jest', | ||
transformIgnorePatterns: [ | ||
// Change MODULE_NAME_HERE to your module that isn't being compiled | ||
'/node_modules/(?!((@byted/garfish-)|(byted-tea-sdk))).+\\.js$', | ||
], | ||
transform: { | ||
'^.+\\.(t|j)sx?$': ['@swc/jest'], | ||
}, | ||
rootDir: __dirname, | ||
testMatch: ['<rootDir>__tests__/**/**.spec.[jt]s?(x)'], | ||
testPathIgnorePatterns: ['/node_modules/'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"name": "create-module-federation", | ||
"description": "Create a new Module Federation project", | ||
"public": true, | ||
"sideEffects": false, | ||
"version": "0.0.0", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/module-federation/core/", | ||
"directory": "packages/create-module-federation" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"type": "module", | ||
"scripts": { | ||
"build": "rslib build" | ||
}, | ||
"main": "./dist/index.js", | ||
"bin": { | ||
"create-module-federation": "./dist/index.js" | ||
}, | ||
"files": [ | ||
"template", | ||
"dist" | ||
], | ||
"dependencies": { | ||
"@clack/prompts": "^0.8.2", | ||
"execa": "5.1.1", | ||
"fs-extra": "9.1.0", | ||
"minimist": "^1.2.8", | ||
"rslog": "^1.2.3", | ||
"glob": "7.2.0", | ||
"handlebars": "4.7.7" | ||
}, | ||
"devDependencies": { | ||
"@types/glob": "7.2.0", | ||
"@types/minimist": "^1.2.5", | ||
"@types/fs-extra": "9.0.6", | ||
"@rslib/core": "^0.3.1", | ||
"rsbuild-plugin-publint": "^0.2.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ | ||
"name": "create-module-federation", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"sourceRoot": "packages/create-module-federation/src", | ||
"projectType": "library", | ||
"tags": ["type:pkg"], | ||
"targets": { | ||
"build": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"parallel": false, | ||
"dependsOn": [ | ||
{ | ||
"target": "build", | ||
"dependencies": true | ||
} | ||
], | ||
"commands": [ | ||
"cd packages/create-module-federation; pnpm run build", | ||
"cp packages/create-module-federation/LICENSE packages/create-module-federation/dist" | ||
] | ||
} | ||
}, | ||
"lint": { | ||
"executor": "@nx/eslint:lint", | ||
"outputs": ["{options.outputFile}"], | ||
"options": { | ||
"lintFilePatterns": [ | ||
"packages/create-module-federation/**/*.ts", | ||
"packages/create-module-federation/package.json" | ||
] | ||
} | ||
}, | ||
"test": { | ||
"executor": "@nx/jest:jest", | ||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"], | ||
"options": { | ||
"jestConfig": "packages/create-module-federation/jest.config.js", | ||
"passWithNoTests": true | ||
}, | ||
"configurations": { | ||
"ci": { | ||
"ci": true, | ||
"codeCoverage": true | ||
} | ||
} | ||
}, | ||
"pre-release": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"parallel": false, | ||
"commands": [ | ||
{ | ||
"command": "nx run create-module-federation:test", | ||
"forwardAllArgs": false | ||
}, | ||
{ | ||
"command": "nx run create-module-federation:build", | ||
"forwardAllArgs": false | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { pluginPublint } from 'rsbuild-plugin-publint'; | ||
import { defineConfig } from '@rslib/core'; | ||
|
||
export default defineConfig({ | ||
lib: [{ format: 'esm' }], | ||
plugins: [pluginPublint()], | ||
}); |
Oops, something went wrong.