LoginSignup
10
10

More than 5 years have passed since last update.

Haml のインストールから grunt の設定まで

Posted at

Haml を使い始めました。とっても語彙力の無い子に見えるかもしれませんが、ヤバいですねこれ!

ということで、インストールから grunt の設定までを書いてみます。

インストール

$ sudo gem install haml

grunt-haml のインストール

$ sudo npm install grunt-haml --save-dev

Gruntfile.coffee の設定

module.exports = (grunt) ->
    pkg = grunt.file.readJSON 'package.json'
    grunt.initConfig
        haml:
            one:
                files:
                    'index.html': 'src/index.haml'
        watch:
            files: ['src/*.haml']
            tasks: ['haml']

    for t of pkg.devDependencies
        if t.substring(0, 6) is 'grunt-'
            grunt.loadNpmTasks t

    grunt.registerTask 'default', ['haml']

設定は、こちらもご参考までに。

10
10
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
10
10