LoginSignup
0
0

More than 5 years have passed since last update.

cloud9にriot.jsプリコンパイル環境を作る

Last updated at Posted at 2016-06-19

愛機がChromeBookなので開発環境構築に毎度困っていたのですが、cloud9には重宝しています。
riot.jsを勉強してみようと、cloud9上に環境構築してみたのでメモしました。

諸事情あって、プリコンパイル環境を作っています。

 準備

cloud9のworkspaceはblankで作成します。
プリコンパイルにnode.jsが必要なのでapt-getします。

$ sudo apt-get update
$ sudo apt-get install nodejs npm
$ node -v
v4.4.5

riotをインストールします。

$ sudo npm install riot -g
$ riot --help
<省略>
Version
  riot-cli:      2.5.0 - https://github.com/riot/cli
  riot-compiler: 2.5.1 - https://github.com/riot/compiler

以上で準備はお終いです。

プリコンパイル方法

ディレクトリ構成は以下

workspace
  assets
    js
      sample.js
    tag
      sample.tag
  index.html
  README.md

以下のコマンドでコンパイルすることが出来る。
-wオプションを付けると、ディレクトリの変更を監視してtagファイルの編集・追加後に即座にコンパイルしてくれる。
オプションは riot --help で確認できる。 

$ riot ./assets/tag/ ./assets/js/
$ riot -w ./assets/tag/ ./assets/js/
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0