This repository has been archived by the owner on Feb 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
symlink the entire node_modules for npm and yarn (#77)
- Loading branch information
Showing
8 changed files
with
127 additions
and
17 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
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 |
---|---|---|
|
@@ -42,4 +42,4 @@ | |
"migrations": "./migrations.json" | ||
}, | ||
"schematics": "./collection.json" | ||
} | ||
} |
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 @@ | ||
import { convertNxExecutor } from '@nrwl/devkit'; | ||
|
||
import ensureSymlinkExecutor from './ensure-symlink.impl'; | ||
|
||
export default convertNxExecutor(ensureSymlinkExecutor); |
17 changes: 17 additions & 0 deletions
17
packages/react-native/src/executors/ensure-symlink/ensure-symlink.impl.ts
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,17 @@ | ||
import { ExecutorContext } from '@nrwl/devkit'; | ||
import { ensureNodeModulesSymlink } from '../../utils/ensure-node-modules-symlink'; | ||
|
||
export interface ReactNativeEnsureSymlinkOutput { | ||
success: boolean; | ||
} | ||
|
||
export default async function* ensureSymlinkExecutor( | ||
_, | ||
context: ExecutorContext | ||
): AsyncGenerator<ReactNativeEnsureSymlinkOutput> { | ||
const projectRoot = context.workspace.projects[context.projectName].root; | ||
|
||
ensureNodeModulesSymlink(context.root, projectRoot); | ||
|
||
yield { success: true }; | ||
} |
6 changes: 6 additions & 0 deletions
6
packages/react-native/src/executors/ensure-symlink/schema.json
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,6 @@ | ||
{ | ||
"title": "Ensure Symlink for React Native", | ||
"description": "Ensure workspace node_modules is symlink under app's node_modules folder.", | ||
"type": "object", | ||
"properties": {} | ||
} |
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