@academyjs/rover 中文文档教程

发布于 3年前 浏览 21 项目主页 更新于 3年前

Rover by AcademyJS

Rover 是一个用于交互式学习编程的命令行工具。

作为一名开发人员,您将在您的机器上工作,在您的终端上执行命令,并且 甚至使用您最喜欢的编辑器编写代码。 您不会使用在线编辑器和编译器 (当然,取决于您的角色)。 那你为什么要练习 在浏览器上编码?

与其他流行的基于浏览器的学习平台相比,Rover 是倒退了一步。 但是请听我们说完……作为一名学习者,您需要在设置开发方面积累经验 环境,修复错误以及您每天都会遇到的其他此类场景。 不幸的是,在浏览器上学习并不能模拟这一点。 这就是路虎的亮点!

Installation

我们建议您通过 npm 安装 Rover,它附带 Node.js 安装时。

一旦你在你的系统上安装了 npm,你就可以安装 Rover:

npm install --global @academyjs/rover

你可以通过运行来检查 Rover 是否安装正确:

rover --version

Example

Rover 带有许多练习。 为了演示,我们将解决 Hello World 练习。

要通过 Hello World 程序,您需要满足以下要求:

  • Write the program in 'hello.js'
  • Print 'Hello, world!\n' to the standard output stream

因此,让我们创建一个名为 hello.js 的文件,其中包含以下内容:

console.log("Hello, world!");

对于本演示,我们将该文件保存在我们的桌面上。 所以Ubuntu用户的绝对路径 是 ~/Desktop/hello.js

打开您的终端并将当前工作目录更改为 ~/Desktop,如下所示:

cd ~/Desktop

Rover 中的每个练习都由句柄标识。 句柄是给练习的唯一名称。 例如,“node/hello-world”是 Hello World 练习的句柄。

您现在可以通过运行来提交您的解决方案:

rover submit node/hello-world

命令的输出如下所示:

rover 0.1.13 (https://academyjs.com/rover)

    ‣ node/hello-world

      ↪ Print a text message on the console.

        ✔ Write the program in 'hello.js'

        ✔ Print 'Hello, world!\n' to the standard output stream (92ms)

  2 passing (97ms)

如果输出有一些差异,请不要担心。 那是因为 Rover 经常更新。 所以输出的微小变化必然会发生。

Support

寻求帮助? 写一封电子邮件到 samuel@academyjs.com

License

Rover 在 MIT 许可下可用。

Rover by AcademyJS

Rover is a command-line tool for learning programming interactively.

As a developer, you'll work on your machine, execute commands on your terminal, and even write code using your favorite editor. You won't use online editors and compilers (depending on your role, of course). So why would you want to practice coding on your browser?

Rover is a step backwards compared to other popular browser-based learning platforms. But hear us out… As a learner, you need to build experience with setting up development environments, fixing bugs, and other such scenarios which you will encounter on a daily basis. Unfortunately, learning on a browser does not simulate this. This is where Rover shines!

Installation

We recommend you to install Rover through npm, which comes with Node.js when you install it.

Once you have npm installed on your system, you can install Rover:

npm install --global @academyjs/rover

You can check if Rover installed correctly by running:

rover --version

Example

Rover comes with many exercises. For demonstration, we'll solve the Hello World exercise.

To pass the Hello World program, you need to solve the following requirements:

  • Write the program in 'hello.js'
  • Print 'Hello, world!\n' to the standard output stream

So let's create a file called hello.js with the following content:

console.log("Hello, world!");

For this demonstration, we will save the file on our Desktop. So the absolute path for Ubuntu users is ~/Desktop/hello.js.

Open your terminal and change the current working directory to ~/Desktop like this:

cd ~/Desktop

Every exercise in Rover is identified by a handle. A handle is a unique name given to an exercise. For example, "node/hello-world" is the handle for the Hello World exercise.

You can now submit your solution by running:

rover submit node/hello-world

The output of the command is shown below:

rover 0.1.13 (https://academyjs.com/rover)

    ‣ node/hello-world

      ↪ Print a text message on the console.

        ✔ Write the program in 'hello.js'

        ✔ Print 'Hello, world!\n' to the standard output stream (92ms)

  2 passing (97ms)

Don't worry if the output has a few differences. That's because Rover is updated frequently. So small changes in the output are bound to happen.

Support

Looking for help? Write an email to samuel@academyjs.com.

License

Rover is available under the MIT license.

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文