hagenburger / pimd

PIMD – Processing Instructions for Markdown
https://hagenburger.github.io/pimd-docs/
MIT License
20 stars 5 forks source link

Livedemo #42

Closed violetadev closed 5 years ago

violetadev commented 6 years ago

This closes #14

benevbright commented 6 years ago

Hi, @hagenburger . Is it possible to use prettier for html or css? I've been searching for it but no luck.

And I tried with prettier cli to see if it's working, but it's not working on html.

[error] No parser could be inferred for file: demo/index.html

Found this issue though, https://github.com/prettier/prettier/issues/4759

violetadev commented 6 years ago

I'm getting errors when using prettier for the html/css. I found this also https://github.com/prettier/prettier/issues/1189

hagenburger commented 6 years ago

I tried running

 npx prettier --write "**/*.*"
benevbright commented 6 years ago

OK, good to know. @artnerdnet I tested it and it works.

In order to use prettier for html/css. We can't use prettier with eslint which we tried so far. prettier is also an executable module(it has a command) like eslint.

So, we can use npx prettier demo/css/*.* as Nico said. npx, the tool lets you use execute prettier easily. https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b

Without npx, we have 3 options to execute module like prettier. (NOTE: It's not only about prettier, it's common way to use executable devDependency modules)

  1. write script on package.json like the way we're using eslint, and do npm run prettier
  2. or we can also use modules with the path or module's command $ node_module/.bin/prettier demo/css/*.*. (similar way with npx)
  3. or install prettier globally and execute it with its command.

But with npx, it makes things easier.

NOTE: You need parser option to use prettier for html. Please follow below link. https://github.com/prettier/prettier/pull/4753 https://prettier.io/docs/en/options.html#parser

@hagenburger Nico, which parser are you using for html? for example prettier XXX --parser parse5

hagenburger commented 6 years ago

@benevbright no, I checked and I used the formatter out of VS Code. As Prettier’s HTML formatting is not complete yet, I would say let’s do it manually. The way I write HTML works very well with the guidelines in here: http://codeguide.co/#html-syntax

benevbright commented 5 years ago

Hi, @artnerdnet Your new commit is not based on origin/master but greenkeeper branch.

violetadev commented 5 years ago

@benevbright is this ok now ? >.>

benevbright commented 5 years ago

Hey @artnerdnet No, You somehow merged greenkeeper's branch with master and now your commit is based on it. greenkeeper branch should not be related with this commit.

screen shot 2018-09-02 at 10 35 07 pm
hagenburger commented 5 years ago

@artnerdnet please check if your last commit contains all the changes. I only see the CNAME file was deleted. But the missing newlines don’t appear.

violetadev commented 5 years ago

I don't know what happened, I did git add . and then commited but it only added the CNAME removal, it looks like it's complete now

hagenburger commented 5 years ago

@artnerdnet please also add demo/js_dist/script.js to the .gitignore and do not commit the file. It’s quite big ;)

violetadev commented 5 years ago

@hagenburger I added the folder js_dist/ to the gitignore, please confirm if this is correct. Thanks :)

benevbright commented 5 years ago

V, I'm sorry that I couldn't make review at once.

violetadev commented 5 years ago

@benevbright @hagenburger could you tell me if this is ok?

benevbright commented 5 years ago

screen shot 2018-09-18 at 4 56 45 pm

I have no idea why I found this now.