Skip to content

Commit

Permalink
Add sassdoc and jsdoc generation tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
ediblecode committed Apr 28, 2017
1 parent 12684e2 commit bed38db
Show file tree
Hide file tree
Showing 8 changed files with 18,078 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .grunt-tasks/documentation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
default : {
src: [
"src/javascripts/**/*.js",
"src/components/**/*.js",
"!src/components/**/*.test.js"
],
options: {
destination: "./dist/docs/js",
format: "json",
filename: "experience.json"
}
}
};
5 changes: 5 additions & 0 deletions .grunt-tasks/sassdoc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
default: {
src: "./src/**/*.scss"
}
};
31 changes: 31 additions & 0 deletions .sassdocrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"dest": "./dist/docs/sass",
"exclude": [
"**/vendor/**/*.scss"
],
"display": {
"annotations": {
"function": ["description", "return", "throw", "require", "usedby", "since", "see", "todo", "link"],
"mixin": ["description", "content", "output", "throw", "require", "example", "usedby", "since", "see", "todo", "link"],
"placeholder": ["description", "example", "throw", "require", "usedby", "since", "see", "todo", "link"],
"variable": ["description", "type", "require", "example", "usedby", "since", "see", "todo", "link"],
"css": ["description", "require", "example", "usedby", "since", "see", "todo", "link"]
},
"access": ["public", "private"],
"alias": false,
"watermark": false
},
"groups": {
"undefined": "Ungrouped",
"general": "General",
"colors": "Colours",
"helpers": "Helpers",
"typography": "Typography",
"components": "Components",
"hacks": "Hacks",
"grid": "Grid",
"icons": "Icons"
},
"package": "./package.json",
"theme": "./src/stylesheets/.sassdoc-nice-theme"
}
5 changes: 4 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,17 @@ module.exports = grunt => {

var r = grunt.registerTask;

// Generate documentation
r("docs", ["sassdoc", "documentation"]);

// Lint both SASS and JS
r("lint", ["sasslint", "eslint"]);

// Run JS unit tests
r("test", ["mochaTest"]);

// For building before publishing to NPM etc
r("prepublish", ["env:dist", "clean:dist", "lint", "test", "webfont:dist", "sass:dist", "postcss:dist", "cssmin:dist", "webpack"]);
r("prepublish", ["env:dist", "clean:dist", "lint", "test", "webfont:dist", "sass:dist", "postcss:dist", "cssmin:dist", "docs", "webpack"]);

r("default", ["env:dev", "clean:temp", "lint", "test", "webfont:temp", "sass:temp", "postcss:temp", "cssmin:temp", "watch"]);
};

0 comments on commit bed38db

Please sign in to comment.