{"id":15376358,"url":"https://github.com/cheshire137/gulp-ruby-haml","last_synced_at":"2025-04-15T16:35:06.923Z","repository":{"id":14011597,"uuid":"16713121","full_name":"cheshire137/gulp-ruby-haml","owner":"cheshire137","description":"Haml plugin for Gulp that uses the Ruby Haml gem.","archived":false,"fork":false,"pushed_at":"2018-04-12T19:21:31.000Z","size":57,"stargazers_count":27,"open_issues_count":10,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-08T02:35:17.122Z","etag":null,"topics":["gulp","gulp-plugin","haml","javascript","ruby"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/gulp-ruby-haml","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cheshire137.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-10T23:36:10.000Z","updated_at":"2020-11-11T02:15:05.000Z","dependencies_parsed_at":"2022-09-26T16:21:10.404Z","dependency_job_id":null,"html_url":"https://github.com/cheshire137/gulp-ruby-haml","commit_stats":null,"previous_names":["moneypenny/gulp-ruby-haml"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheshire137%2Fgulp-ruby-haml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheshire137%2Fgulp-ruby-haml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheshire137%2Fgulp-ruby-haml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheshire137%2Fgulp-ruby-haml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cheshire137","download_url":"https://codeload.github.com/cheshire137/gulp-ruby-haml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248813725,"owners_count":21165629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gulp","gulp-plugin","haml","javascript","ruby"],"created_at":"2024-10-01T14:06:56.588Z","updated_at":"2025-04-15T16:35:06.905Z","avatar_url":"https://github.com/cheshire137.png","language":"JavaScript","readme":"# gulp-ruby-haml\n\nThis is a [gulp](http://gulpjs.com/) plugin that will use the `haml` command\nline script to compile your Haml files into HTML. You need both Ruby and Haml\ninstalled to use this. Try `gem install haml`. If you use\n[Bundler](http://bundler.io/), add `gem 'haml'` to your Gemfile and run\n`bundle install`.\n\n## Options\n\n### hamlPath\nSpecify where the haml executable is. Defaults to just `haml` if not provided.\n`{hamlPath: '/path/to/haml'}`\n\n### style\nOutput style. Can be indented (default) or ugly.\n`{style: ugly}`\n\n### format\nOutput format. Can be html5 (default), xhtml, or html4.\n`{format: \"xhtml\"}`\n\n### require\nRequire additional ruby files. Same as 'ruby -r'.\n`{require: [\"./my_haml_helpers.rb\"]}`\n\n### escapeHtml\nEscape HTML characters (like ampersands and angle brackets) by default.\n`{escapeHtml: true}`\n\n### noEscapeAttrs\nDon't escape HTML characters (like ampersands and angle brackets) in attributes.\n`{noEscapeAttrs: true}`\n\n### doubleQuoteAttributes\nSet attribute wrapper to double-quotes (default is single).\n`{doubleQuote: true}`\n\n### trace\nShow a full traceback on error\n`{trace: true}`\n\n### unixNewlines (false)\nUse Unix-style newlines in written files.\n`{unixNewlines: true}`\n\n### cdata\nAlways add CDATA sections to javascript and css blocks.\n`{cdata: true}`\n\n### autoclose\nList of elements to be automatically self-closed.\n`{autoclose: [\"img\", \"input\", \"br\", ...]}`\n\n### loadPath\nspecify $LOAD_PATH directory (may be used more than once). Same as 'ruby -I'.\n`{loadPath: \"my/load/path\"}`\n\n### outExtension\nSet the output extension. Defaults to '.html'.\n`{outExtension: \".hbs\"}`\n\nUse the `encodings` option to specify encodings, e.g., `{encodings: \"UTF-8\"}`.\n\n## gulpfile.js example\n\n    var gulp = require('gulp');\n    var watch = require('gulp-watch');\n    var haml = require('gulp-ruby-haml');\n\n    // Compile Haml into HTML\n    gulp.task('haml', function() {\n      gulp.src('./app/assets/haml/**/*.haml', {read: false}).\n           pipe(haml().on('error', function(e) { console.log(e.message); })).\n           pipe(gulp.dest('./public'));\n    });\n\n    // Compile Haml into HTML with double quotes around attributes\n    // Same as haml -q\n    gulp.task('haml-double-quote', function() {\n      gulp.src('./app/assets/haml/**/*.haml', {read: false}).\n           pipe(haml({doubleQuote: true})).\n           pipe(gulp.dest('./public'));\n    });\n\n    // Pipe Haml output from one command into another without writing the\n    // Haml to file first\n    gulp.src('foo/bar/**/*.haml').\n         pipe(replace('albert', 'dilbert')).\n         pipe(haml()).\n         pipe(gulp.dest('baz'));\n\n    // Require an additional Ruby file for compilation\n    gulp.src(in_path).\n         pipe(haml({require: [\"./path/to/my_ruby_script.rb\"]})).\n         pipe(gulp.dest(dest_dir));\n\n    // Watch for changes in Haml files\n    gulp.task('haml-watch', function() {\n      gulp.src('./app/assets/haml/**/*.haml', {read: false}).\n           pipe(watch()).\n           pipe(haml()).\n           pipe(gulp.dest('./public'));\n    });\n\n    // Change the output extension\n    gulp.task(\"haml-to-handlebars\", function() {\n      gulp\n        .src(\"./source/handlebars/**/*.haml\")\n        .pipe(\n          haml({\n            outExtension: \".hbs\"\n          })\n        )\n        .pipe(gulp.dest(\"./handlebars\"));\n    });\n\n## How to Test This Plugin\n\n    npm install\n    npm test\n\n## Thanks\n\nThis largely came from [gulp-ruby-sass](https://github.com/sindresorhus/gulp-ruby-sass) by Sindre Sorhus.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheshire137%2Fgulp-ruby-haml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcheshire137%2Fgulp-ruby-haml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheshire137%2Fgulp-ruby-haml/lists"}