HAML Plain Loader
Webpack loader for HAML files, returning a plain String (useful for Vue.js)
Installation
npm install haml-plain-loader --save-dev
NPM: yarn add haml-plain-loader
Yarn: Configuration
Add to your webpack config's module.loaders
:
test: /\.haml$/ use: "haml-plain-loader"
Usage
Javascript
template.hmal
%article %h1.title {{ title }}
index.js
consolelog
VueJS
Use vue-loader
to load .vue
Single File Components (SFC):
test: /\.vue$/ use: "vue-loader"
Use lang="haml"
within SFCs:
%article(:data-title="title") %h1 {{ title }}
Contributing
- Fork it (https://github.com/RyanScottLewis/haml-plain-loader/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
License
This program is available as open source under the terms of the MIT License http://opensource.org/licenses/MIT.