-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f0735c7
commit 5865d7e
Showing
24 changed files
with
775 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env node | ||
export {}; |
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 |
---|---|---|
@@ -1 +1 @@ | ||
export declare const createApp: (repo: string) => (argv: any) => Promise<any>; | ||
export declare const createGitApp: (repo: string) => (argv: any) => Promise<any>; |
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 |
---|---|---|
@@ -1 +1 @@ | ||
export declare const createApp: (repo: string) => (argv: any) => Promise<any>; | ||
export declare const createQuestionTemplate: (repo: string) => (argv: any) => Promise<any>; |
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,14 @@ | ||
const useESModules = !!process.env.MODULE; | ||
|
||
module.exports = (api) => { | ||
api.cache(() => process.env.MODULE); | ||
return { | ||
plugins: [ | ||
['@babel/transform-runtime', { useESModules }], | ||
'@babel/proposal-object-rest-spread', | ||
'@babel/proposal-class-properties', | ||
'@babel/proposal-export-default-from' | ||
], | ||
presets: useESModules ? ['@babel/typescript'] : ['@babel/typescript', '@babel/env'] | ||
}; | ||
}; |
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,12 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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 @@ | ||
node_modules/ | ||
dist/ | ||
main/ | ||
module/ | ||
coverage/ |
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,71 @@ | ||
module.exports = { | ||
plugins: ['prettier'], | ||
extends: ['eslint:recommended', 'prettier'], | ||
parser: '@babel/eslint-parser', | ||
parserOptions: { | ||
ecmaVersion: 11, | ||
requireConfigFile: false, | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: true | ||
} | ||
}, | ||
env: { | ||
es6: true, | ||
browser: true, | ||
node: true, | ||
jest: true | ||
}, | ||
rules: { | ||
'no-debugger': 2, | ||
'no-alert': 2, | ||
'no-await-in-loop': 0, | ||
'no-prototype-builtins': 0, | ||
'no-return-assign': ['error', 'except-parens'], | ||
'no-restricted-syntax': [ | ||
2, | ||
'ForInStatement', | ||
'LabeledStatement', | ||
'WithStatement' | ||
], | ||
'no-unused-vars': [ | ||
0, | ||
{ | ||
ignoreSiblings: true, | ||
argsIgnorePattern: 'React|res|next|^_' | ||
} | ||
], | ||
'prefer-const': [ | ||
'error', | ||
{ | ||
destructuring: 'all' | ||
} | ||
], | ||
'no-unused-expressions': [ | ||
2, | ||
{ | ||
allowTaggedTemplates: true | ||
} | ||
], | ||
'no-console': 1, | ||
'comma-dangle': 2, | ||
'jsx-quotes': [2, 'prefer-double'], | ||
'linebreak-style': ['error', 'unix'], | ||
quotes: [ | ||
2, | ||
'single', | ||
{ | ||
avoidEscape: true, | ||
allowTemplateLiterals: true | ||
} | ||
], | ||
'prettier/prettier': [ | ||
'error', | ||
{ | ||
trailingComma: 'none', | ||
singleQuote: true, | ||
printWidth: 80 | ||
} | ||
] | ||
} | ||
}; |
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,48 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# dist | ||
main | ||
module | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules | ||
jspm_packages | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Editors | ||
.idea | ||
|
||
# Lib | ||
lib | ||
|
||
# npm package lock | ||
package-lock.json | ||
yarn.lock | ||
|
||
# others | ||
.DS_Store |
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,32 @@ | ||
*.log | ||
npm-debug.log* | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
.nyc_output | ||
|
||
# Dependency directories | ||
node_modules | ||
|
||
# npm package lock | ||
package-lock.json | ||
yarn.lock | ||
|
||
# project files | ||
__fixtures__ | ||
__tests__ | ||
.babelrc | ||
.babelrc.js | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc | ||
.eslintrc.js | ||
.gitignore | ||
.travis.yml | ||
.vscode | ||
CHANGELOG.md | ||
examples | ||
jest.config.js | ||
package.json | ||
src | ||
test |
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 @@ | ||
scripts-prepend-node-path=true |
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,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2022 Dan Lynch <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,99 @@ | ||
# create-cosmwasm-app | ||
|
||
<p align="center" width="100%"> | ||
<img height="148" src="https://user-images.githubusercontent.com/545047/186589196-e75c9540-86a7-4a71-8096-207be9a4216f.svg" /> | ||
</p> | ||
|
||
<p align="center" width="100%"> | ||
<a href="https://github.com/cosmology-tech/create-cosmos-app/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"></a> | ||
<a href="https://www.npmjs.com/package/create-cosmwasm-app"><img height="20" src="https://img.shields.io/github/package-json/v/cosmology-tech/create-cosmos-app?filename=packages%2Fcreate-cosmwasm-app%2Fpackage.json"></a> | ||
</p> | ||
|
||
Set up a modern CosmWasm app by running one command ⚛️ | ||
|
||
## Demo | ||
|
||
https://user-images.githubusercontent.com/545047/192061992-f0e1106d-f4b2-4879-ab0a-896f22ee4f49.mp4 | ||
|
||
## Overview | ||
|
||
``` | ||
# install | ||
npm install -g create-cosmwasm-app | ||
# run one command | ||
create-cosmwasm-app | ||
> name: my-app | ||
cd my-app | ||
yarn && yarn dev | ||
# now your app is running on localhost:3000! | ||
``` | ||
|
||
### Get Started Immediately | ||
|
||
You don’t need to install or configure cosmjs, keplr, nextjs, webpack or Babel. | ||
|
||
Everything is preconfigured, ready-to-go, so you can focus on your code! | ||
|
||
* ⚡️ Connect easily to keplr + keplr mobile via wallet connect | ||
* ⚛️ Sign and broadcast with [cosmjs](https://github.com/cosmos/cosmjs) stargate + cosmwasm signers | ||
* 🛠 Render pages with [next.js](https://nextjs.org/) hybrid static & server rendering | ||
* 🎨 Build awesome UI with [Cosmos Kit](https://github.com/cosmology-tech/cosmos-kit) and [Chakra UI](https://chakra-ui.com/docs/components) | ||
* 📝 Leverage [chain-registry](https://github.com/cosmology-tech/chain-registry) for Chain and Asset info for all Cosmos chains | ||
## Education & Resources | ||
|
||
🎥 [Checkout our videos](https://cosmology.tech/learn) to learn to learn more about `create-cosmos-app` and tooling for building frontends in the Cosmos! | ||
|
||
Checkout [cosmos-kit](https://github.com/cosmology-tech/cosmos-kit) for more docs as well as [cosmos-kit/react](https://github.com/cosmology-tech/cosmos-kit/tree/main/packages/react#2-signing-clients) for getting cosmjs stargate and cosmjs signers. | ||
|
||
## Creating an App | ||
|
||
To create a new app, you may choose one of the following methods: | ||
|
||
### global install | ||
|
||
```sh | ||
npm install -g create-cosmwasm-app | ||
``` | ||
|
||
Then run the command: | ||
|
||
```sh | ||
create-cosmwasm-app | ||
``` | ||
|
||
we also made an alias `cwa` if you don't want to type `create-cosmwasm-app`: | ||
|
||
```sh | ||
cwa | ||
``` | ||
|
||
### npx | ||
|
||
```sh | ||
npx create-cosmwasm-app | ||
``` | ||
### npm | ||
|
||
```sh | ||
npm init cosmwasm-app | ||
``` | ||
### Yarn | ||
|
||
```sh | ||
yarn create cosmwasm-app | ||
``` | ||
|
||
## Credits | ||
|
||
🛠 Built by Cosmology — if you like our tools, please consider delegating to [our validator ⚛️](https://cosmology.tech/validator) | ||
|
||
Code built with the help of these related projects: | ||
|
||
* [create-cosmos-app](https://github.com/cosmology-tech/create-cosmos-app) Set up a modern Cosmos app by running one command ⚛️ | ||
* [@cosmwasm/ts-codegen](https://github.com/CosmWasm/ts-codegen) for generated CosmWasm contract Typescript classes | ||
* [@osmonauts/telescope](https://github.com/osmosis-labs/telescope) a "babel for the Cosmos", Telescope is a TypeScript Transpiler for Cosmos Protobufs. | ||
* [chain-registry](https://github.com/cosmology-tech/chain-registry) Cosmos chain registry and chain info. | ||
* [cosmos-kit](https://github.com/cosmology-tech/cosmos-kit) A wallet connector for the Cosmos. |
Oops, something went wrong.