Skip to content
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

Allow nested /// in SassDoc comments. #220

Merged
merged 3 commits into from
Dec 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
- NEW: Support SassDoc [`googleAnalytics`][googleAnalytics] and
[`trackingCode`][trackingCode] options --
[#215](https://github.com/oddbird/sassdoc-theme-herman/issues/215)
- CHANGE: Use forked version of CDocParser preserving `///` within comments --
[#212](https://github.com/oddbird/sassdoc-theme-herman/issues/212)

[googleAnalytics]: http://sassdoc.com/customising-the-view/#google-analytics
[trackingCode]: http://sassdoc.com/customising-the-view/#tracking-code
Expand Down
2 changes: 2 additions & 0 deletions docs/CHANGELOG.html
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ <h2 id="unreleased">Unreleased</h2>
<li>NEW: Support SassDoc <a href="http://sassdoc.com/customising-the-view/#google-analytics"><code>googleAnalytics</code></a> and
<a href="http://sassdoc.com/customising-the-view/#tracking-code"><code>trackingCode</code></a> options –
<a href="https://github.com/oddbird/sassdoc-theme-herman/issues/215">#215</a></li>
<li>CHANGE: Use forked version of CDocParser preserving <code>///</code> within comments –
<a href="https://github.com/oddbird/sassdoc-theme-herman/issues/212">#212</a></li>
</ul>
<h2 id="1-0-0-rc-6-2017-12-04">1.0.0-rc.6: 2017-12-04</h2>
<ul>
Expand Down
4 changes: 2 additions & 2 deletions docs/demo_colors.html
Original file line number Diff line number Diff line change
Expand Up @@ -426,15 +426,15 @@ <h2 id="preview-color-maps-as-palettes">Preview color maps as<span class="widont
primary, secondary, button-colors, etc.
Each map will be displayed individually,
using the <code>@colors</code> annotation:</p>
<pre><code class="lang-scss">// @colors
<pre><code class="lang-scss">/// @colors
</code></pre>
<p>The <code>@colors</code> annotation accepts an optional one-word key argument,
which defaults to the map-variable name.
That key will be used to access the data from JSON,
so it doesn’t matter what key is used,
as long as the key given here matches the group-name
used when adding this data to <code>$herman</code>.</p>
<pre><code class="lang-scss">// @colors my-colors
<pre><code class="lang-scss">/// @colors my-colors
</code></pre>
<p>By default, our color palettes display
<code>name</code>, <code>hex</code>, <code>rgb(a)</code>, and <code>hsl(a)</code> for every color.
Expand Down
8 changes: 4 additions & 4 deletions docs/demo_fonts.html
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ <h1 id="documenting-fonts">Documenting fonts</h1>
<a href="http://oddbird.net/herman/docs/api_json-export.html#fonts">See the font map documentation for details<span class="widont">&nbsp;</span>»</a></p>
<p>Each font family will be displayed individually,
using the <code>@font</code> annotation:</p>
<pre><code class="lang-scss">// @font my-font (regular, bold)
<pre><code class="lang-scss">/// @font my-font (regular, bold)
</code></pre>
<p>Let’s look at a few<span class="widont">&nbsp;</span>examples…</p>

Expand Down Expand Up @@ -421,8 +421,8 @@ <h2 class="item-title">
<h2 id="displaying-cdn-hosted-webfonts">Displaying CDN-hosted webfonts</h2>
<p>For remotely-hosted fonts,
the <code>@font</code> annotation accepts three<span class="widont">&nbsp;</span>arguments:</p>
<pre><code class="lang-scss">// @font font-key (list of, variants, to show)
// &lt;any html required for import&gt;
<pre><code class="lang-scss">/// @font font-key (list of, variants, to show)
/// &lt;any html required for import&gt;
</code></pre>
<ul>
<li>The first argument is an optional one-word key
Expand Down Expand Up @@ -885,7 +885,7 @@ <h2 id="displaying-local-fonts">Displaying local fonts</h2>
If omitted, it defaults to all variants
included as keys in the font map<span class="widont">&nbsp;</span>itself.</li>
</ul>
<pre><code class="lang-scss">// @font demo-local {woff2, woff, ttf}
<pre><code class="lang-scss">/// @font demo-local {woff2, woff, ttf}
</code></pre>
<p>In order for this to work,
you must specify a <code>fontpath</code>
Expand Down
2 changes: 1 addition & 1 deletion docs/demo_icons.html
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ <h3 data-sassdoc="nav-title">
<h1 id="documenting-svg-icons">Documenting SVG icons</h1>
<p>Given a folder of individual SVG icon files,
you can use Herman to document and display your full icon<span class="widont">&nbsp;</span>set.</p>
<pre><code class="lang-scss">// @icons assets/svg/
<pre><code class="lang-scss">/// @icons assets/svg/
</code></pre>
<p>The <code>icons</code> annotation accepts one argument –
a path to a directory containing icon svg files.
Expand Down
10 changes: 5 additions & 5 deletions docs/demo_sizes.html
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ <h2 id="preview-ratios">Preview ratios</h2>
text, spacing, etc.
Each map will be displayed individually,
using the <code>@ratios</code> annotation:</p>
<pre><code class="lang-scss">// @ratios my-ratios
<pre><code class="lang-scss">/// @ratios my-ratios
</code></pre>
<p>The <code>@ratios</code> annotation accepts an optional one-word key argument,
which defaults to the map-variable name.
Expand Down Expand Up @@ -770,7 +770,7 @@ <h2 id="preview-sizes">Preview sizes</h2>
</code></pre>
<p>Each map will be displayed individually,
using the <code>@sizes</code> annotation:</p>
<pre><code class="lang-scss">// @sizes {ruler}
<pre><code class="lang-scss">/// @sizes {ruler}
</code></pre>
<p>The <code>@sizes</code> annotation accepts two optional<span class="widont">&nbsp;</span>arguments:</p>
<ul>
Expand Down Expand Up @@ -870,7 +870,7 @@ <h2 id="preview-sizes">Preview sizes</h2>

<div data-item-section="prose" class="text-block">
<h3 id="text-sizes">Text Sizes</h3>
<pre><code class="lang-scss">// @sizes demo-sizes {text}
<pre><code class="lang-scss">/// @sizes demo-sizes {text}
</code></pre>


Expand Down Expand Up @@ -1009,7 +1009,7 @@ <h4 class="size-heading">

<div data-item-section="prose" class="text-block">
<h3 id="size-rulers">Size Rulers</h3>
<pre><code class="lang-scss">// @sizes demo-sizes {ruler}
<pre><code class="lang-scss">/// @sizes demo-sizes {ruler}
</code></pre>


Expand Down Expand Up @@ -1156,7 +1156,7 @@ <h3 class="item-subtitle">

<div data-item-section="prose" class="text-block">
<h3 id="name-value-only">Name/Value Only</h3>
<pre><code class="lang-scss">// @sizes demo-sizes {output-only}
<pre><code class="lang-scss">/// @sizes demo-sizes {output-only}
</code></pre>


Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"webpack": "^3.10.0"
},
"resolutions": {
"cdocparser": "github:jgerigmeyer/CDocParser#preserve-nested-comments",
"browserslist": ">=2.4.0",
"nunjucks": "^2.5.2"
},
Expand Down
4 changes: 2 additions & 2 deletions scss/samples/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $brand-pink: hsl(330, 85%, 48%);
/// using the `@colors` annotation:
///
/// ```scss
/// // @colors
/// /// @colors
/// ```
///
/// The `@colors` annotation accepts an optional one-word key argument,
Expand All @@ -57,7 +57,7 @@ $brand-pink: hsl(330, 85%, 48%);
/// used when adding this data to `$herman`.
///
/// ```scss
/// // @colors my-colors
/// /// @colors my-colors
/// ```
///
/// By default, our color palettes display
Expand Down
8 changes: 4 additions & 4 deletions scss/samples/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/// using the `@font` annotation:
///
/// ```scss
/// // @font my-font (regular, bold)
/// /// @font my-font (regular, bold)
/// ```
///
/// Let's look at a few examples…
Expand All @@ -37,8 +37,8 @@
/// the `@font` annotation accepts three arguments:
///
/// ```scss
/// // @font font-key (list of, variants, to show)
/// // <any html required for import>
/// /// @font font-key (list of, variants, to show)
/// /// <any html required for import>
/// ```
///
/// - The first argument is an optional one-word key
Expand Down Expand Up @@ -102,7 +102,7 @@ $demo-cdn: (
/// included as keys in the font map itself.
///
/// ```scss
/// // @font demo-local {woff2, woff, ttf}
/// /// @font demo-local {woff2, woff, ttf}
/// ```
///
/// In order for this to work,
Expand Down
2 changes: 1 addition & 1 deletion scss/samples/_icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/// you can use Herman to document and display your full icon set.
///
/// ```scss
/// // @icons assets/svg/
/// /// @icons assets/svg/
/// ```
///
/// The `icons` annotation accepts one argument --
Expand Down
10 changes: 5 additions & 5 deletions scss/samples/_sizes-ratios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ $xlarge: 28px;
/// using the `@ratios` annotation:
///
/// ```scss
/// // @ratios my-ratios
/// /// @ratios my-ratios
/// ```
///
/// The `@ratios` annotation accepts an optional one-word key argument,
Expand Down Expand Up @@ -94,7 +94,7 @@ $demo-ratios: (
/// using the `@sizes` annotation:
///
/// ```scss
/// // @sizes {ruler}
/// /// @sizes {ruler}
/// ```
///
/// The `@sizes` annotation accepts two optional arguments:
Expand Down Expand Up @@ -122,23 +122,23 @@ $demo-sizes: (

/// ### Text Sizes
/// ```scss
/// // @sizes demo-sizes {text}
/// /// @sizes demo-sizes {text}
/// ```
/// @sizes demo-sizes {text}
/// @group demo_sizes


/// ### Size Rulers
/// ```scss
/// // @sizes demo-sizes {ruler}
/// /// @sizes demo-sizes {ruler}
/// ```
/// @sizes demo-sizes {ruler}
/// @group demo_sizes


/// ### Name/Value Only
/// ```scss
/// // @sizes demo-sizes {output-only}
/// /// @sizes demo-sizes {output-only}
/// ```
/// @sizes demo-sizes {output-only}
/// @group demo_sizes
Expand Down
44 changes: 41 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1640,12 +1640,13 @@ caw@^1.0.1:
object-assign "^3.0.0"
tunnel-agent "^0.4.0"

cdocparser@^0.13.0:
version "0.13.0"
resolved "https://registry.yarnpkg.com/cdocparser/-/cdocparser-0.13.0.tgz#1ba98a1e1e1668e2bfb35d41761e9e4645d731ba"
cdocparser@^0.13.0, "cdocparser@github:jgerigmeyer/CDocParser#preserve-nested-comments":
version "0.14.0"
resolved "https://codeload.github.com/jgerigmeyer/CDocParser/tar.gz/069dc00757c3494a7912fff309caab6c93bd2404"
dependencies:
escape-string-regexp "^1.0.2"
lodash.assign "^2.4.1"
lodash.union "^3.1.0"
strip-indent "^1.0.0"

center-align@^0.1.1:
Expand Down Expand Up @@ -5656,14 +5657,43 @@ lodash._basecreatewrapper@~2.4.1:
lodash._slice "~2.4.1"
lodash.isobject "~2.4.1"

lodash._baseflatten@^3.0.0:
version "3.1.4"
resolved "https://registry.yarnpkg.com/lodash._baseflatten/-/lodash._baseflatten-3.1.4.tgz#0770ff80131af6e34f3b511796a7ba5214e65ff7"
dependencies:
lodash.isarguments "^3.0.0"
lodash.isarray "^3.0.0"

lodash._baseindexof@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c"

lodash._basetostring@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5"

lodash._baseuniq@^3.0.0:
version "3.0.3"
resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-3.0.3.tgz#2123fa0db2d69c28d5beb1c1f36d61522a740234"
dependencies:
lodash._baseindexof "^3.0.0"
lodash._cacheindexof "^3.0.0"
lodash._createcache "^3.0.0"

lodash._basevalues@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7"

lodash._cacheindexof@^3.0.0:
version "3.0.2"
resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92"

lodash._createcache@^3.0.0:
version "3.1.2"
resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093"
dependencies:
lodash._getnative "^3.0.0"

lodash._createwrapper@~2.4.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/lodash._createwrapper/-/lodash._createwrapper-2.4.1.tgz#51d6957973da4ed556e37290d8c1a18c53de1607"
Expand Down Expand Up @@ -5936,6 +5966,14 @@ lodash.templatesettings@^3.0.0:
lodash._reinterpolate "^3.0.0"
lodash.escape "^3.0.0"

lodash.union@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-3.1.0.tgz#a4a3066fc15d6a7f8151cce9bdfe63dce7f5bcff"
dependencies:
lodash._baseflatten "^3.0.0"
lodash._baseuniq "^3.0.0"
lodash.restparam "^3.0.0"

lodash.uniq@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
Expand Down