sassdoc-theme-default
Advanced tools
Comparing version 1.6.0 to 1.7.0
60
index.js
'use strict'; | ||
module.exports = require('sassdoc-theme-light'); | ||
var extend = require('extend'); | ||
var swig = new (require('swig').Swig)(); | ||
var swigExtras = require('swig-extras'); | ||
var themeleon = require('themeleon')(); | ||
var sassdocExtras = require('sassdoc-extras'); | ||
swigExtras.useFilter(swig, 'split'); | ||
swigExtras.useFilter(swig, 'trim'); | ||
swigExtras.useFilter(swig, 'groupby'); | ||
swig.setFilter('push', function (arr, val) { | ||
return arr.push(val); | ||
}); | ||
themeleon.use('swig', swig); | ||
var theme = themeleon(__dirname, function (t) { | ||
var assetsPromise = t.copy('assets'); | ||
if (t.ctx.shortcutIcon && t.ctx.shortcutIcon.type === 'internal') { | ||
assetsPromise.then(function () { | ||
return t.copy(t.ctx.shortcutIcon.path, t.ctx.shortcutIcon.url); | ||
}); | ||
t.ctx.shortcutIcon.url = 'assets/img/' + t.ctx.shortcutIcon.url; | ||
} | ||
t.swig('views/documentation/index.html.swig', 'index.html'); | ||
}); | ||
module.exports = function (dest, ctx) { | ||
if (!('view' in ctx)) { | ||
ctx.view = {}; | ||
} | ||
var defaultView = require('./view.json'); | ||
ctx.view = extend({}, defaultView, ctx.view); | ||
ctx.view.groups = extend(defaultView.groups, ctx.view.groups); | ||
if (!ctx.view.display) { | ||
ctx.view.display = {}; | ||
} | ||
ctx.view.display.annotations = { | ||
'function': ['description', 'parameters', 'returns', 'example', 'throws', 'requires', 'usedby', 'since', 'see', 'todo', 'link', 'author'], | ||
'mixin': ['description', 'parameters', 'output', 'example', 'throws', 'requires', 'usedby', 'since', 'see', 'todo', 'link', 'author'], | ||
'placeholder': ['description', 'example', 'throws', 'requires', 'usedby', 'since', 'see', 'todo', 'link', 'author'], | ||
'variable': ['description', 'type', 'prop', 'requires', 'example', 'usedby', 'since', 'see', 'todo', 'link', 'author'] | ||
}; | ||
sassdocExtras.markdown(ctx); | ||
sassdocExtras.display(ctx); | ||
sassdocExtras.groupName(ctx); | ||
sassdocExtras.shortcutIcon(ctx); | ||
ctx.data.byGroupAndType = sassdocExtras.byGroupAndType(ctx.data); | ||
return theme.apply(this, arguments); | ||
}; |
{ | ||
"name": "sassdoc-theme-default", | ||
"version": "1.6.0", | ||
"description": "SassDoc's default theme", | ||
"title": "SassDoc Default Theme", | ||
"author": "SassDoc team", | ||
"version": "1.7.0", | ||
"keywords": [ | ||
"sassdoc-theme" | ||
], | ||
"repository": { | ||
@@ -9,4 +15,12 @@ "type": "git", | ||
"dependencies": { | ||
"sassdoc-theme-light": "^1.6.0" | ||
"extend": "1.*", | ||
"swig": "1.4.0", | ||
"swig-extras": "0.*", | ||
"themeleon": "1.*", | ||
"themeleon-swig": "0.*", | ||
"sassdoc-extras": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"uglify-js": "^2.4.15" | ||
} | ||
} |
# SassDoc Default Theme | ||
This leads to [sassdoc-theme-light](https://github.com/SassDoc/sassdoc-theme-light). | ||
This is [SassDoc](https://github.com/SassDoc/sassdoc)'s default theme which means this is the theme that will be used when running SassDoc without a custom theme. | ||
This theme uses [Themeleon](https://github.com/themeleon/themeleon) as a theme engine, and [themeleon-swig](https://github.com/themeleon/themeleon-swig) as a template engine, directly plugged into Themeleon. | ||
Because this is likely to be the most used theme of all, it is not as simple as a theme can get. For instance, there is quite a bit of logic in both `index.js` and the Swig templates. Fortunately, you don't have to deal with that at all. | ||
## Customising the view | ||
There are some possibilites to customise the theme's view. Essentially what's being displayed, what's not, and what are the project informations to be displayed in the header and footer. | ||
To learn how to customise the theme's view, please read [the documentation on SassDoc's site](http://sassdoc.com/customising-the-view/). Fear not! It's all about creating a configuration file. No big deal. |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
177815
54
733
1
14
6
1
1
+ Addedextend@1.*
+ Addedsassdoc-extras@^1.0.0
+ Addedswig@1.4.0
+ Addedswig-extras@0.*
+ Addedthemeleon@1.*
+ Addedthemeleon-swig@0.*
- Removedsassdoc-theme-light@^1.6.0
- Removedsassdoc-theme-light@1.7.2(transitive)