npm Get it here
near-shell The NEAR cli tool.
npm i -g near-shell
Check out the commands here
Whatever frontend build tools you prefer.
gulp is used for compiling. Check it out here. (You shouldn't need to do any config for gulp specifically).
near new_project --project_dir ~/[wherever you want your project]
Write the code!
All contract code is found in the
assembly/ folder. (named for webassembly conventions)
assembly/main.ts is where all smart contract code can be found.
src/test.js is where unit tests for the smart contract can be found.
src/main.js is the default frontend code, but that can be changed to whatever frontend you prefer!
Deploy your contract to the same DevNet which the NEAR Studio IDE deploys to.
Navigate to your source directory in command line, and do the following
Create an account for your contract
near create_account --node_url https://studio.nearprotocol.com/devnet --account_id <yourcontractname>
Build your contract
npm run build
Deploy your contract to DevNet
near deploy --node_url https://studio.nearprotocol.com/devnet --contract_name <yourcontractname>
For help using cli tools, you can use
Within the application's directory run
That's it! The tests will run against the instance that you've deployed to DevNet!
The tests in
tests.js will run against the deployed contract.