Skip to content

Commit

Permalink
chore: add new cli
Browse files Browse the repository at this point in the history
  • Loading branch information
beeman committed Sep 11, 2024
1 parent 6bba157 commit d232ed1
Show file tree
Hide file tree
Showing 39 changed files with 7,223 additions and 14 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: autofix.ci # needed to securely identify the workflow

on:
pull_request:
push:
branches: ['main', 'next']

permissions:
contents: read

jobs:
autofix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- run: pnpm install
- run: pnpm lint:fix
- uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c
with:
commit-message: 'chore: apply automated updates'
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: ci

on:
push:
branches:
- main
- next
pull_request:
branches:
- main
- next

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- run: pnpm install
- run: pnpm lint
- run: pnpm test:types
- run: pnpm build
- run: pnpm vitest --coverage
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Solana Foundation
Copyright (c) 2022-2024 Solana Foundation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
22 changes: 9 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ npx create-solana-dapp@latest

The following UI frameworks are supported within `create-solana-dapp`:

- ReactJS
- NextJS
- Next.js
- [Next.js + Tailwind CSS (no Anchor)](https://github.com/solana-developers/template-next-tailwind)
- [Next.js + Tailwind CSS + Anchor Basic Example](https://github.com/solana-developers/template-next-tailwind-basic)
- [Next.js + Tailwind CSS + Anchor Counter Example](https://github.com/solana-developers/template-next-tailwind-counter)
- React with Vite
- [React with Vite + Tailwind CSS (no Anchor)](https://github.com/solana-developers/template-react-vite-tailwind)
- [React with Vite + Tailwind CSS + Anchor Basic Example](https://github.com/solana-developers/template-react-vite-tailwind-basic)
- [React with Vite + Tailwind CSS + Anchor Counter Example](https://github.com/solana-developers/template-react-vite-tailwind-counter)

### Planned frameworks to support

Expand All @@ -23,18 +29,12 @@ The following UI frameworks are planned and expected to be supported in the futu
- Svelte
- React Native

## Supported onchain program frameworks
## Supported on-chain program frameworks

The following on-chain programs (aka smart contracts) frameworks are supported within `create-solana-dapp`:

- Anchor

## Packages

This projects operates as an NX monorepo that requires each of the child packages deployed to the NPM package registry:

- [create-solana-dapp](./packages/create-solana-dapp): The CLI tool that generates a new project.

## Contributing

Contributions are welcome! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for more info.
Expand All @@ -58,10 +58,6 @@ pnpm install
pnpm run build
```
### Local registry

The `create-solana-dapp` CLI uses a local registry to publish packages to.

```
Detailed instructions on the local development workflow are outlined in the
Expand Down
19 changes: 19 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import unjs from 'eslint-config-unjs'

export default unjs({
ignores: [
// ignore paths
'tmp',
],
rules: {
// rule overrides
'unicorn/no-array-reduce': 'off',
'unicorn/no-process-exit': 'off',
'unicorn/prefer-top-level-await': 'off',
},
markdown: {
rules: {
// markdown rule overrides
},
},
})
100 changes: 100 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"name": "create-solana-dapp",
"version": "0.0.4",
"description": "Get up and running fast with Solana dApps",
"repository": {
"name": "solana-developers/create-solana-dapp",
"type": "git",
"url": "https://github.com/solana-developers/create-solana-dapp"
},
"homepage": "https://github.com/solana-developers/create-solana-dapp#readme",
"bugs": {
"url": "https://github.com/solana-developers/create-solana-dapp/issues"
},
"license": "MIT",
"sideEffects": false,
"type": "module",
"publishConfig": {
"access": "public"
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"bin": {
"create-solana-dapp": "./dist/bin/index.cjs"
},
"files": [
"dist"
],
"scripts": {
"build": "unbuild",
"build:watch": "unbuild --watch",
"dev": "vitest dev",
"lint": "eslint . && prettier -c .",
"lint:fix": "automd && eslint . --fix && prettier -w .",
"prepack": "pnpm build",
"play": "jiti playground",
"release": "pnpm test && changelogen --release && npm publish && git push --follow-tags",
"test": "pnpm lint && pnpm test:types && vitest run --coverage",
"test:types": "tsc --noEmit --skipLibCheck"
},
"devDependencies": {
"@types/node": "^22.1.0",
"@types/semver": "^7.5.8",
"@vitest/coverage-v8": "^2.0.5",
"automd": "^0.3.8",
"changelogen": "^0.5.5",
"eslint": "^9.8.0",
"eslint-config-unjs": "^0.3.2",
"jiti": "^2.0.0-beta.3",
"prettier": "^3.3.3",
"typescript": "^5.5.4",
"unbuild": "^3.0.0-rc.7",
"vitest": "^2.0.5"
},
"packageManager": "[email protected]",
"dependencies": {
"@changesets/cli": "^2.27.8",
"@clack/prompts": "^0.7.0",
"commander": "^12.1.0",
"execa": "^9.3.1",
"giget": "^1.2.3",
"mock-fs": "^5.2.0",
"picocolors": "^1.0.1",
"semver": "^7.6.3",
"zod": "^3.23.8"
},
"contributors": [
{
"name": "Joe Caulfield",
"url": "https://github.com/jpcaulfi"
},
{
"name": "Jacob Creech",
"url": "https://github.com/jacobcreech"
},
{
"name": "Nick Frostbutter",
"url": "https://github.com/nickfrosty"
},
{
"name": "Bram Borggreve",
"url": "https://github.com/beeman"
}
],
"keywords": [
"solana",
"next",
"react",
"web3",
"blockchain",
"nft"
]
}
3 changes: 3 additions & 0 deletions playground/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { test } from '../src'

console.log(test())
Loading

0 comments on commit d232ed1

Please sign in to comment.