Skip to content

posthtml options #306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Scrum opened this issue Aug 13, 2020 · 4 comments · Fixed by #309
Closed

posthtml options #306

Scrum opened this issue Aug 13, 2020 · 4 comments · Fixed by #309
Labels
Milestone

Comments

@Scrum
Copy link
Member

Scrum commented Aug 13, 2020

Hi @Scrum.
Thank you very much. This does work.

Could you please tell me how could I achieve the same functionality but with plugins in the config file (.posthtmlrc)?

Originally posted by @VladimirMikulic in posthtml/posthtml#329 (comment)

@Scrum
Copy link
Member Author

Scrum commented Aug 13, 2020

@VladimirMikulic Unfortunately, this functionality is not available, I made it a separate task and soon I will implement it

@Scrum Scrum added the bug label Aug 13, 2020
@Scrum Scrum added this to the 0.7.1 milestone Aug 13, 2020
Scrum added a commit that referenced this issue Aug 13, 2020
@Scrum Scrum linked a pull request Aug 13, 2020 that will close this issue
@Scrum
Copy link
Member Author

Scrum commented Aug 13, 2020

@VladimirMikulic publish v0.7.1

@VladimirMikulic
Copy link

VladimirMikulic commented Aug 13, 2020

@Scrum fixed in a snap! Wow!
I appreciate that very much.

I tried it now, but it seems that it is not picking up the config file.

.posthtmlrc

{
  "directives": [
    {
      "name": "?",
      "start": "<",
      "end": ">"
    },
    {
      "name": "?=",
      "start": "<",
      "end": ">"
    }
  ]
}

Command: posthtml -c .posthtmlrc index.html -o dist/index-a.html (It's still that same index.html file from #329)

@Scrum
Copy link
Member Author

Scrum commented Aug 13, 2020

{
  input: 'test/fixtures/by-config/options/input.html',
  output: 'test/expected/by-config/options/output.html',
  options: {
    directives: [{name: '?php', start: '<', end: '>'}]
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants