LoginSignup
1
1

More than 5 years have passed since last update.

Yeomanの使い方

Last updated at Posted at 2017-01-21

Yeoman

  • ※バーチャルボックスでは「yo webapp」でエラーが出て使えない!

Yeomanとは

  • Yo
    • ひな型作成(ジェネレータ)
  • Grunt
    • タスクランナー
  • Bower
    • パッケージマネージャ

インストール

  1. Node.js のインストール

    # yumにepelのリポジトリを追加
    rpm -ivh http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
    yum install nodejs npm --enablerepo=epel
    
  2. git のインストール

  3. Yoman のインストール

    npm install -g yo grunt-cli bower
    # [npm]は、nodeのパッケージマネージャ
    
  4. ジェネレータをインストール

    npm install -g generator-webapp
    

使い方

  1. yoでプロジェクト作成

    mkdir hello_yeoman
    cd hello_yeoman
    sudo chown -R `whoami` ~/.npm
    yo webapp
    
  2. ページ起動

    grunt server
    # 停止は[ctrl + c]
    
  3. ビルド

    grunt
    # distフォルダにサーバにUPするファイルが作成される
    
1
1
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
1
1