sintro / slm-brunch

Adds Slm template engine (Slim without Ruby) support to brunch.
0 stars 1 forks source link

Help getting started #2

Open trafnar opened 6 years ago

trafnar commented 6 years ago

I'd like to use this but I can't figure out how to set it up. If you help me understand I'll submit a PR for updated README.

I added "slm-brunch": "git+https://github.com/sintro/slm-brunch.git" to my package.json, ran npm install, then ran brunch watch. I renamed index.html to index.slim and changed to slim syntax.

I think the page is being interpreted as HTML, I just see my slim code on the page when I open in browser.

sintro commented 6 years ago

Hello! To be honest, this plugin was created to be used in context of Phoenix Framework, which uses brunch as default framework to manage front-end assets. Phoenix has some default configs for brunch and if you use it with this plugin, you probably will not have any problems and questions. But, I am ashamed, i've never used it with pure Brunch, i think, so may be there are some unusual settings have to be made for everything work as expected. Anyway, I can try to help you some later. Also, I wanted to make this plugin to compile templates as javascript-modules, this was the main purpose, but for now this part of my work is frozen, so if you need this, PR are welcome :) For now, it only can make static .html files from .slim

trafnar commented 6 years ago

I see, thanks for the info.