-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* scripts(tools-scripts): ๐ ๏ธ basic release script * release(nx): ๐ Release nx-plugin-vite@0.1.0 * scripts(tools-scripts): ๐ ๏ธ release scripts
- Loading branch information
1 parent
c72a7ea
commit e320fa6
Showing
12 changed files
with
300 additions
and
59 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 @@ | ||
workspaces-experimental true |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# nx-plugin-vite | ||
|
||
This library was generated with [Nx](https://nx.dev). | ||
Nx plugin integration with [Vite](https://vitejs.dev/). | ||
|
||
## Running unit tests | ||
|
||
Run `nx test nx-plugin-vite` to execute the unit tests via [Jest](https://jestjs.io). | ||
- [Documentation](https://nx-plugins.netlify.app/vite/) | ||
- [GitHub Repo](https://github.com/LinbuduLab/nx-plugins) | ||
- [Author](https://github.com/linbudu599) |
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
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 |
---|---|---|
@@ -1,37 +1,35 @@ | ||
import { CAC } from 'cac'; | ||
import consola from 'consola'; | ||
import { selectMultiProjects, selectScope } from '../utils/select-project'; | ||
import { availablePackages } from '../utils/packages'; | ||
import { selectMultiProjects } from '../utils/select-project'; | ||
import { allPackages, availablePackages } from '../utils/packages'; | ||
import { ALL_FLAG } from './constants'; | ||
import { handler } from './handler'; | ||
|
||
export default function useCollectPackageDeps(cli: CAC) { | ||
cli | ||
.command('collect', 'Collect package deps', { | ||
.command('collect [project]', 'Collect package deps', { | ||
allowUnknownOptions: true, | ||
}) | ||
.alias('c') | ||
.action(async () => { | ||
// const scope = await selectScope(); | ||
.action(async (project?: string) => { | ||
if (project && allPackages.includes(project)) { | ||
handler(project); | ||
return; | ||
} | ||
|
||
const projects = await selectMultiProjects( | ||
[ALL_FLAG], | ||
'Choose project you want to collect dependencies for' | ||
// scope | ||
); | ||
|
||
// single one | ||
if (projects.length === 1 && !projects.includes(ALL_FLAG)) { | ||
handler(projects[0]); | ||
// multi | ||
} else if (projects.length >= 1 && !projects.includes(ALL_FLAG)) { | ||
for (const projectItem of projects) { | ||
handler(projectItem); | ||
} | ||
// all | ||
} else if (projects.includes(ALL_FLAG)) { | ||
if (projects.includes(ALL_FLAG)) { | ||
for (const projectItem of availablePackages) { | ||
handler(projectItem); | ||
} | ||
return; | ||
} | ||
|
||
for (const projectItem of projects) { | ||
handler(projectItem); | ||
} | ||
}); | ||
} |
Oops, something went wrong.