sdk icon indicating copy to clipboard operation
sdk copied to clipboard

feat: Includes motoko-dev-server in new motoko projects

Open krpeacock opened this issue 2 years ago • 3 comments

Description

The Motoko project now includes a few new quality-of-life enhancements:

  • npm start now starts the motoko-dev-server in addition to the webpack server.
    • This means that you can now use the motoko-dev-server to hot-reload your motoko canisters and frontends as you make changes.
  • mops package manager is now included and configured
    • This installs the motoko-base and test libraries
  • hello world now includes a lib.mo and lib.test.mo file
    • This demonstrates write tests for your canisters and run them with npm run test:motoko

Fixes #SDK-991

How Has This Been Tested?

Manually compiling the rust and motoko new projects

  • dfx deploy
    • visiting the webpage
  • npm start
    • visiting the webpage

Checklist:

  • [x] The title of this PR complies with Conventional Commits.
  • [x] I have edited the CHANGELOG accordingly.
  • [x] I have made corresponding changes to the documentation.

krpeacock avatar Mar 22 '23 00:03 krpeacock

Noting here - mops sources failed during CI with exit status: 254. It may be that mops isn't mature enough yet

krpeacock avatar Mar 22 '23 16:03 krpeacock

Which version of Node.js is being used in the CI?

(Update: it's Node 18.x)

rvanasa avatar Mar 23 '23 02:03 rvanasa

@krpeacock @ZenVoich @dfx-json, these CI errors are apparently caused by the replica timing out rather than an issue with Mops (relevant log output).

I temporarily switched the default mops.toml dependencies to use GitHub repositories to unblock progress on renovating the dfx new command.

rvanasa avatar May 16 '23 18:05 rvanasa