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

Next version of create-solana-dapp #4

Merged
merged 95 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
4e9276a
chore: remove old codebase
beeman Oct 23, 2023
9f82f45
chore: initial commit of Nx workspace
beeman Oct 23, 2023
7148790
chore: setup basic package structure
beeman Oct 23, 2023
3890a8e
feat: add check to make sure we don't ship a yarn.lock with localhost…
beeman Oct 23, 2023
cfb811d
feat: add preset-anchor and preset-react packages
beeman Oct 24, 2023
ac7c59e
chore: add GitHub Workflow
beeman Oct 24, 2023
3eb3e00
feat: support generating multiple react apps in a workspace
beeman Oct 24, 2023
4c480d9
feat: move e2e-utils into separate library
beeman Oct 24, 2023
cf1b374
feat: implement preset-next
beeman Oct 24, 2023
7320889
fix: add .nx/cache to .prettierignore
beeman Oct 26, 2023
a363621
refactor: move e2e tests to 'src' folder
beeman Oct 26, 2023
a8df293
feat: implement interactive create-solana-dapp cli
beeman Nov 6, 2023
2ea2490
feat: clean-up structure of the generated anchor and web apps
beeman Nov 7, 2023
546d77a
feat: add CONTRIBUTION.md
beeman Nov 7, 2023
6245b17
feat: add e2e test for create-solana-dapp cli
beeman Nov 7, 2023
6f8f9b5
feat: implement basic solana-dev cli
beeman Nov 8, 2023
3698bb6
fix: correctly apply Tailwind setup in Next app
beeman Nov 8, 2023
f07e045
fix: include Keypair in Anchor test
beeman Nov 8, 2023
2b9c481
docs: added local development guidance
nickfrosty Nov 8, 2023
343fa94
docs: local tag
nickfrosty Nov 8, 2023
c54c5fe
feat: added default port 3000 to preset-next
nickfrosty Nov 8, 2023
82936ec
feat: added local publish command
nickfrosty Nov 8, 2023
7dc8bad
refactor: one less spread
nickfrosty Nov 8, 2023
65376d4
feat: add sync-schema script to sync generator schema.json to d.ts
beeman Nov 8, 2023
e7f9921
fix: updated licensee
nickfrosty Nov 9, 2023
3464afa
feat: make jest snapshots easier to read/compare
beeman Nov 8, 2023
45ea0f8
fix: added cargo.lock file for anchor preset
nickfrosty Nov 9, 2023
eeb5652
fix: missing updated snapshots
nickfrosty Nov 9, 2023
f1d88e7
fix: complete lock file
nickfrosty Nov 9, 2023
c3b0d21
refactor: typo in file name
nickfrosty Nov 10, 2023
6c6f5ef
feat: added a generic substitution function
nickfrosty Nov 10, 2023
a1ee308
refactor: use generic substitutions
nickfrosty Nov 10, 2023
3a358ba
refactor: removed comment
nickfrosty Nov 10, 2023
f3a6fa6
feat: improve create-solana-dapp args handling
beeman Nov 9, 2023
a48769b
feat: improve create-solana-dapp args handling
beeman Nov 10, 2023
3a3099e
feat: improve create-solana-dapp args handling
beeman Nov 10, 2023
b1f3352
feat: detect invoked package manager and use it as default
beeman Nov 10, 2023
e46555f
feat: add custom workspace scripts with anchor-build option
beeman Nov 10, 2023
89a210c
feat: add --yarn and --pnpm shortcuts
beeman Nov 10, 2023
fecd77c
feat: add --yarn and --pnpm shortcuts
beeman Nov 10, 2023
594f482
refactor: rename app-name property to web-name
beeman Nov 10, 2023
4ba88ad
fix: add dependencies to preset-react
beeman Nov 10, 2023
1ebb686
fix: improve .gitignore entries for anchor target directory
beeman Nov 10, 2023
e8815dd
feat: update Nx to latest
beeman Nov 10, 2023
a05c44d
feat: skip IDL imports in web app when anchor === 'none'
beeman Nov 11, 2023
72a9932
feat: block local-publish if local-registry is not running
beeman Nov 11, 2023
ff7e49e
chore: update Nx
beeman Nov 21, 2023
2746bb7
refactor: split up anchor templates into separate generator
beeman Nov 21, 2023
bf9944a
refactor: split up react templates into separate generator
beeman Nov 21, 2023
984d524
refactor: split up next templates into separate generator
beeman Nov 22, 2023
67de4ff
fix: export Anchor type
beeman Nov 22, 2023
d35dfb8
feature: wrap up Anchor templates
beeman Nov 22, 2023
855a691
feature: wrap up React templates
beeman Nov 22, 2023
8e4a43c
refactor: tweak React templates
beeman Nov 23, 2023
24f2594
feature: wrap up Next templates
beeman Nov 23, 2023
9440341
feat: generate run-scripts in package.json in next/react apps
beeman Nov 23, 2023
d4af78b
feat: generate README.md next/react apps
beeman Nov 23, 2023
13a8771
fix: light copyediting in generated `account-data-access.tsx`
steveluscher Nov 15, 2023
7323f9e
feat: add more detail to spinners in installer
beeman Nov 28, 2023
d1381a6
refactor: update generated readme
beeman Nov 28, 2023
a3621a7
feat: add LICENSE to generated apps
beeman Nov 28, 2023
f09edbf
feat: set default port for React apps to 3000
beeman Nov 28, 2023
b8caeb1
refactor: clean up spinners
beeman Nov 28, 2023
d456d10
refactor: change 'powered by' to 'generated by'
beeman Nov 28, 2023
73f8e5e
fix: remove pointer from h1 in tailwind template
beeman Nov 28, 2023
8ffbee2
fix: update Next.js page title to npm scope
beeman Nov 28, 2023
b783fb6
feat: add README's to packages
beeman Nov 30, 2023
11e67d4
feat: add TypeScript alias for Next apps
beeman Nov 30, 2023
3bc3643
refactor: tweak run scripts
beeman Nov 30, 2023
3efaea2
fix: gitignore anchor/target/debug
nickfrosty Nov 30, 2023
2fd352e
chore: update publish script to sync package versions with the same n…
beeman Nov 30, 2023
b7b9cf4
feat: make sure 'none' ui apps compile and build
beeman Nov 30, 2023
e100823
feat: add more metadata to package.json files in packages/*
beeman Nov 30, 2023
6c4d822
fix: pass template option into anchor generator
beeman Dec 1, 2023
4675371
fix: cargo lock for each anchor program
nickfrosty Dec 1, 2023
ad2ee2c
refactor: local publish script
nickfrosty Dec 1, 2023
14c4e0a
fix: only add anchor run-scripts when anchor is enabled
beeman Dec 1, 2023
7c82e26
fix: get rid of 'creating sandbox' spinner
beeman Dec 1, 2023
3a9a6f0
e2e: fix version inconsistencies
beeman Dec 1, 2023
e42a06f
e2e: fix prompts in react and next presets
beeman Dec 1, 2023
f895798
e2e: switch tests to pnpm
beeman Dec 1, 2023
8df8364
e2e: add snapshots for preset parameters
beeman Dec 1, 2023
c63d571
s/you/your/
steveluscher Dec 1, 2023
d1b45a1
fix: use correct address for token account balance
beeman Dec 4, 2023
e147ae7
feat: add sync-readmes script to sync preset README's
beeman Dec 4, 2023
85c9e25
fix: make sure schemas are generated correctly
beeman Dec 6, 2023
8ce44df
fix: run prettier on generated README's
beeman Dec 6, 2023
4e33b80
feat: generate vercel.json for nextjs
nickfrosty Dec 12, 2023
1ac670d
fix: workspace root files
nickfrosty Dec 12, 2023
1838533
refactor: relocated next root file generator
nickfrosty Dec 12, 2023
f57e16a
refactor: move license and readme templates to preset-common
beeman Dec 12, 2023
4d738e8
feat: document snapshot generation
nickfrosty Dec 14, 2023
4e45ff5
refactor: break useAccount hook up into smaller hooks
beeman Dec 19, 2023
4cfa03a
fix: make sure to use correct Link for Next.js apps
beeman Dec 20, 2023
387efa1
feat: readme
nickfrosty Dec 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
47 changes: 47 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"overrides": [
{
"files": "*.json",
"parser": "jsonc-eslint-parser",
"rules": {}
},
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
"env": {
"jest": true
},
"rules": {}
}
]
}
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
push:
branches:
- main
pull_request:

# Needed for nx-set-shas within nx-cloud-main.yml, when run on the main branch
permissions:
actions: read
contents: read

jobs:
main:
name: Nx Cloud - Main Job
uses: nrwl/ci/.github/workflows/[email protected]
with:
main-branch-name: main
number-of-agents: 3
init-commands: |
yarn nx-cloud start-ci-run --stop-agents-after="build" --agent-count=3
parallel-commands: |
yarn nx-cloud record -- yarn nx format:check
parallel-commands-on-agents: |
yarn nx affected --target=lint --parallel=3
yarn nx affected --target=test --parallel=3 --ci --code-coverage
yarn nx affected --target=build --parallel=3

agents:
name: Nx Cloud - Agents
uses: nrwl/ci/.github/workflows/[email protected]
with:
number-of-agents: 3
47 changes: 36 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,41 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

sample-dapp
test-dapp-null
test-dapp-next-anchor
test-dapp-next-native
test-dapp-vue-anchor
test-dapp-vue-native
test-dapp-svelte-anchor
test-dapp-svelte-native
# compiled output
dist
tmp
/out-tsc

# dependencies
node_modules
dist

package-lock.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
yarn.lock
testem.log
/typings

# System Files
.DS_Store
Thumbs.db

.nx/cache
7 changes: 7 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn verify-yarn-lock
yarn sync-readmes --check
yarn sync-schemas --check
yarn lint-staged
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn nx format:check
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Add files here to ignore them from prettier formatting

/dist
/coverage
tmp
/.yarn

.nx/cache
# Ignore generated schema files in packages
/packages/*/src/generators/**/*-schema.d.ts
9 changes: 4 additions & 5 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"tabWidth": 2,
"useTabs": false,
"singleQuote": false,
"printWidth": 80,
"singleQuote": true,
"printWidth": 120,
"semi": false,
"trailingComma": "all",
"arrowParens": "avoid",
"arrowParens": "always",
"endOfLine": "auto",
"proseWrap": "always"
}
28 changes: 28 additions & 0 deletions .verdaccio/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# path to a directory with all packages
storage: ../tmp/local-registry/storage

# a list of other known repositories we can talk to
uplinks:
npmjs:
url: https://registry.yarnpkg.com
maxage: 60m

packages:
'**':
# give all users (including non-authenticated users) full access
# because it is a local registry
access: $all
publish: $all
unpublish: $all

# if package is not available locally, proxy requests to npm registry
proxy: npmjs

# log settings
logs:
type: stdout
format: pretty
level: warn

publish:
allow_offline: true # set offline to true to allow publish offline
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"nrwl.angular-console",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"firsttris.vscode-jest-runner"
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"eslint.validate": ["json"]
}
Loading