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

Add template for remix #442

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/cli_internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
} from './src'
import { Project } from './src/project'

function getConfig(options: any): Configuration {

Check warning on line 37 in packages/cli/cli_internal.ts

View workflow job for this annotation

GitHub Actions / build (20)

Unexpected any. Specify a different type
const configFile = options.config ? (options.config as string) : getConfigFile()
console.log(`Loading alephium config file: ${configFile}`)
const config = loadConfig(configFile)
Expand All @@ -58,7 +58,7 @@
return isDebug ? debugMsg : error.message
}

const templateTypes = ['base', 'react', 'nextjs', 'nextjs-app', 'nextjs-pages']
const templateTypes = ['base', 'react', 'nextjs', 'nextjs-app', 'nextjs-pages', 'remix']

program
.command('init')
Expand Down Expand Up @@ -99,7 +99,7 @@
try {
const config = getConfig(options)
const networkId = checkAndGetNetworkId(options.network)
const nodeUrl = config.networks[networkId].nodeUrl

Check warning on line 102 in packages/cli/cli_internal.ts

View workflow job for this annotation

GitHub Actions / build (20)

Generic Object Injection Sink
if (!(await isNetworkLive(nodeUrl))) {
throw new Error(`${networkId} is not live`)
}
Expand Down
7 changes: 4 additions & 3 deletions packages/cli/scripts/create-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,16 @@ export function createProject(templateType: string, packageRoot: string, project
case 'react':
gitClone('https://github.com/alephium/react-dapp-template.git', projectRoot)
break
case 'remix':
gitClone('https://github.com/alephium/remix-dapp-template.git', projectRoot)
break
case 'nextjs':
case 'nextjs-app':
case 'nextjs-pages':
prepareNextJs(templateType, packageRoot, projectRoot)
break
default:
console.error(
`Invalid template type ${templateType}, expect one of base, react, nextjs, nextjs-app, nextjs-pages`
)
console.error(`Invalid template type ${templateType}`)
process.exit(1)
}

Expand Down
Loading