Skip to content

Commit

Permalink
remove deprecated flow dev
Browse files Browse the repository at this point in the history
  • Loading branch information
nialexsan committed Nov 21, 2024
1 parent dcad1f9 commit a8839f8
Showing 1 changed file with 0 additions and 59 deletions.
59 changes: 0 additions & 59 deletions docs/tools/flow-cli/super-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,65 +45,6 @@ list by [following instructions here](https://github.com/onflow/flow-cli/blob/ma
## Testing
`flow init` will also have created an example test file in the `/tests` folder. You can run the tests by using the `flow test` command.

## Develop
After creating the project using the `flow init` command you can start the emulator in
the project directory by running `flow emulator`. After emulator is started up you can continue by
running the flow develop command like so:
```
> flow dev
```
This will continuously watch for your projects Cadence files for changes and keep them in sync with the deployed contracts on the emulator.

The output will look something like:
```
[15:53:38] Syncing all the contracts...
😜 charlie
|- MyContract contracts/charlie/MyContract.cdc
😏 emulator-account
|- HelloWorld contracts/HelloWorld.cdc
```

After the command is started it will automatically watch any changes you make to
Cadence files and make sure to continuously sync those changes on the emulator network.
If you make any mistakes it will report the errors as well.

It is recommended that you use VSCode as the IDE and run the command in the terminal window of the IDE.
The latest VSCode extension also supports resolution of the improved import syntax, more on that later.


⚠️ Please note that this command only works on the emulator network. It's meant for development only and hence
it doesn't allow interacting with testnet or mainnet network. After your project is completed you will
be soon able to migrate it using a migration super command. Also, please note the command requires a
running emulator which you have to start. If you restart the emulator the command needs to be restarted as well.
This command is meant to be used during development, and it updates the contracts by removing and redeploying
them, which means that if you manually interacted with those contracts and stored resources in accounts
storage that stored items might no longer be valid after contract is updated. Our advise is to first focus
on development and use automated tests to assert correct functionality and interact with contracts manually
after this cycle is complete. Also note that this is still a very experimental feature, so it might
undergo a lot of changes and improvements as we learn from the usage.

**Deploying Contracts**

When adding the contracts to the `/contracts` folder it will automatically deploy them to the `default`
account, which is also created for you at startup of running `flow dev`.

If you want to add the contracts to a separate account all you have to do is create a folder inside the
`/contracts` folder and add the contract there, that will first automatically create the account with
the same name as the folder name and then deploy all the contracts inside
that folder to that newly created account.

Example:
If I want to have a contract named `A.cdc` deployed to a default account and a contract named `B.cdc`
deployed to account called `Bob` my folder structure inside contracts folder will look like:
```
/contracts
A.cdc
bob/
B.cdc
```

## Import Schema
You can simply import your contracts by name. We have introducted a new way to import your contracts. This will simply your workflow.

Expand Down

0 comments on commit a8839f8

Please sign in to comment.