Skip to content

Commit

Permalink
Merge pull request #746 from alphagov/add-sassdoc
Browse files Browse the repository at this point in the history
Add SassDoc
  • Loading branch information
36degrees authored Jun 1, 2018
2 parents f559402 + faf541d commit 17b4b46
Show file tree
Hide file tree
Showing 9 changed files with 1,162 additions and 355 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ public/
package/package-lock.json
examples/**/package-lock.json
*.zip
sassdoc/
2 changes: 2 additions & 0 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ module.exports = (options) => {
// Set up middleware to serve static assets
app.use('/public', express.static(configPaths.public))

app.use('/docs', express.static(configPaths.sassdoc))

// serve html5-shiv from node modules
app.use('/vendor/html5-shiv/', express.static('node_modules/html5shiv/dist/'))
app.use('/assets', express.static(path.join(configPaths.src, 'assets')))
Expand Down
6 changes: 6 additions & 0 deletions app/views/layouts/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
<li><a href="/examples/{{ exampleName }}" class="govuk-link">{{ exampleName | replace("-", " ") | capitalize }}</a></li>
{% endfor %}
</ul>

<h2 class="govuk-heading-m">Misc</h2>

<ul class="govuk-list">
<li><a href="/docs" class="govuk-link">Sass Documentation</a></li>
</ul>
</div>
</div>
{% endblock %}
1 change: 1 addition & 0 deletions config/paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"dist": "dist/",
"package": "package/",
"public": "public/",
"sassdoc": "sassdoc/",
"src": "src/",
"components": "src/components/",
"ports": {
Expand Down
2 changes: 2 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ require('./tasks/gulp/watch.js')
// new tasks
require('./tasks/gulp/copy-to-destination.js')
require('./tasks/gulp/asset-version.js')
require('./tasks/gulp/sassdoc.js')

// Umbrella scripts tasks for preview ---
// Runs js lint and compilation
Expand Down Expand Up @@ -66,6 +67,7 @@ gulp.task('dev', cb => {
runsequence('clean',
'generate:readme',
'copy-assets',
'sassdoc',
'serve',
cb)
})
Expand Down
Loading

0 comments on commit 17b4b46

Please sign in to comment.