reshape / standard

a standard plugin pack with modern template language features
Other
17 stars 6 forks source link

Add support for markdown-it plugins #22

Closed tkraak closed 7 years ago

tkraak commented 7 years ago
coveralls commented 7 years ago

Coverage Status

Changes Unknown when pulling 5cc4713c40036b281ef26fa498f0ea9eed6aca5c on tkraak:markdown-it-plugins into on reshape:master.

tkraak commented 7 years ago

@jescalan ... question ... this assumes the markdownPlugins object in the form of:

const options = {
  markdownPlugins: { emoji, toc, videoEmbed }
}

Is that ok as long as we document how plugins should be added to the object?

jescalan commented 7 years ago

Why not have it as an array instead of an object?

mwickett commented 7 years ago

I've been playing with trying to pass along plugin options as well, but can't get it.

Based on the markdown-it plugin docs, options need to be passed as a second argument, but I can't get the syntax right for passing it from app.js. I tried just manually adding options inside reshape-standard's index.js and it works (for one plugin, obviously).

When I try to use your suggested code @jescalan I get Error: TypeError: (intermediate value) is not a function

Realize this isn't a huge priority, but I'm trying to keep it moving.

My repo is here: https://github.com/sagecomm/reporter (will need to manually edit reshape-standard/index.js with changes in this PR)

tkraak commented 7 years ago

@mwickett ... I should have my refactor pushed within 24 hours, which fixes the Error: TypeError: (intermediate value) is not a function error.

Let's worry about plugin options after that. I'm eager to keep this moving as well 🐎 .

coveralls commented 7 years ago

Coverage Status

Changes Unknown when pulling 7fcc0cd2def5aea38359fae75dc51dc238b68d49 on tkraak:markdown-it-plugins into on reshape:master.

jescalan commented 7 years ago

This is looking great so far! Looking forward to some tests 😁

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-2.5%) to 97.5% when pulling 6473fe002d1a6f0803f2c48a3c416ad3a6271c29 on tkraak:markdown-it-plugins into 836d4d6ea4e75e3c721d261781be7b810aa391a6 on reshape:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-2.5%) to 97.5% when pulling 0d2dd6a2f1d478df269467b21b624826aa60936c on tkraak:markdown-it-plugins into 836d4d6ea4e75e3c721d261781be7b810aa391a6 on reshape:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-2.5%) to 97.5% when pulling 0d2dd6a2f1d478df269467b21b624826aa60936c on tkraak:markdown-it-plugins into 836d4d6ea4e75e3c721d261781be7b810aa391a6 on reshape:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-2.5%) to 97.5% when pulling acc60b11142d576ef118aefdc3aed99f43470027 on tkraak:markdown-it-plugins into 836d4d6ea4e75e3c721d261781be7b810aa391a6 on reshape:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling ff3dd6fddb1ba7e2830508d19624d6db12d1c43d on tkraak:markdown-it-plugins into 836d4d6ea4e75e3c721d261781be7b810aa391a6 on reshape:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 89d3a2907adce72cdb85ba7ae84f27d497f93949 on tkraak:markdown-it-plugins into 836d4d6ea4e75e3c721d261781be7b810aa391a6 on reshape:master.