Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement react-feature generator #35

Merged
merged 2 commits into from
Feb 23, 2024
Merged

Conversation

beeman
Copy link
Collaborator

@beeman beeman commented Jan 26, 2024

This PR introduces the react-feature generator that can be used to generate new features that currently consist of an Anchor program and React UI.

nx g @solana-developers/preset-react:feature -d

>  NX  Generating @solana-developers/preset-react:react-feature

✔ What name would you like to use for the feature? · second-counter
✔ Which feature would you like to generate? · anchor-counter
✔ Which UI library would you like to use? · tailwind
UPDATE anchor/Anchor.toml
CREATE anchor/programs/second-counter/Cargo.toml
CREATE anchor/programs/second-counter/Xargo.toml
CREATE anchor/programs/second-counter/src/lib.rs
CREATE anchor/src/second-counter-exports.ts
CREATE anchor/target/idl/second_counter.json
CREATE anchor/target/types/second-counter.ts
CREATE anchor/tests/second-counter.spec.ts
UPDATE anchor/src/index.ts
CREATE web/src/app/second-counter/second-counter-data-access.tsx
CREATE web/src/app/second-counter/second-counter-feature.tsx
CREATE web/src/app/second-counter/second-counter-ui.tsx

Breaking this apart makes our generators more composable and we'll likely move more things into features down the line, for example, the account and clusters screens.

The main application generators have been adopted to now use this preset so the app we generate should be the same.

@beeman beeman force-pushed the beeman/feature-generators branch 3 times, most recently from bc246aa to 87dbd05 Compare January 26, 2024 12:57
@beeman beeman force-pushed the beeman/feature-generators branch 2 times, most recently from 243945f to 23f7bae Compare January 29, 2024 14:59
@beeman beeman marked this pull request as ready for review January 29, 2024 18:10
@beeman beeman requested a review from nickfrosty January 29, 2024 18:10
@beeman beeman force-pushed the beeman/feature-generators branch from 23f7bae to 615cc0e Compare February 23, 2024 18:19
@beeman beeman merged commit e31e290 into main Feb 23, 2024
5 checks passed
@beeman beeman deleted the beeman/feature-generators branch February 23, 2024 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant