зеркало из https://github.com/telerik/dss.git
Merge pull request #18 from darcyclarke/develop
Fixed up gruntfile and modified parser slightly
This commit is contained in:
Коммит
005ac0a740
|
@ -13,7 +13,9 @@ module.exports = function(grunt) {
|
|||
grunt.initConfig({
|
||||
DSS: {
|
||||
options: {
|
||||
location: __dirname + '/example/'
|
||||
location: process.cwd(),
|
||||
output: process.cwd() + '/docs/',
|
||||
template: process.cwd() + '/template/'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -34,7 +34,7 @@ module.exports = function(grunt) {
|
|||
// Store reference
|
||||
var _dss = function(){};
|
||||
|
||||
// Detect
|
||||
// Default detect function
|
||||
_dss.detect = function(){
|
||||
return true;
|
||||
};
|
||||
|
@ -355,7 +355,7 @@ module.exports = function(grunt) {
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// Create new blocks with custom parsing
|
||||
_parsed = true;
|
||||
_blocks.forEach(function(block, index){
|
||||
|
@ -404,6 +404,8 @@ module.exports = function(grunt) {
|
|||
length = files.length,
|
||||
styleguide = [];
|
||||
|
||||
// TODO: location is usless, grunt expand may not be what I need
|
||||
|
||||
// Parse files
|
||||
files.map(function(filename){
|
||||
|
||||
|
@ -416,8 +418,6 @@ module.exports = function(grunt) {
|
|||
// Add comment block to styleguide
|
||||
styleguide.push(parsed);
|
||||
|
||||
console.log(JSON.stringify(styleguide));
|
||||
|
||||
// Check if we're done
|
||||
if(length > 1){
|
||||
|
||||
|
@ -425,6 +425,7 @@ module.exports = function(grunt) {
|
|||
|
||||
} else {
|
||||
|
||||
// TODO: remove this
|
||||
// Set output directories
|
||||
template_dir = template_dir || '../template';
|
||||
output_dir = output_dir || 'styleguide';
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
|
||||
<title>{{project.name}} Styleguide</title>
|
||||
<title>{{project.name}} styleguide</title>
|
||||
<link rel="stylesheet" href="assets/css/styles.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
|
Загрузка…
Ссылка в новой задаче