diff --git a/.gitignore b/.gitignore index ae88bb6..67e5748 100644 --- a/.gitignore +++ b/.gitignore @@ -30,4 +30,5 @@ node_modules bower_components/ # Sass cache -.sass-cache \ No newline at end of file +.sass-cache +*.tgz diff --git a/gulpfile.js b/gulpfile.js index 8b0dad3..0cac4b4 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -54,7 +54,7 @@ var template = cmd.template + join(cwd, 'template/index.jade'); // Task 1: Build the docs gulp.task('docs',shell.task([ - 'npm start && ./node_modules/doxx/bin/doxx ' + source + target + template + './node_modules/doxx/bin/doxx ' + source + target + template ])); // Task 2: Build Sass and copy it into the test dir and assets diff --git a/package.json b/package.json index d6051fa..2e5b7d5 100644 --- a/package.json +++ b/package.json @@ -4,12 +4,12 @@ "version": "1.0.0", "homepage": "http://github.com/iwatakeshi/doxx-theme-cayman", "author": "iwatakeshi", - "scripts":{ - "start":"npm i && bower i" + "scripts": { + "start": "npm i && bower i" }, "devDependencies": { "browser-sync": "^2.9.1", - "doxx": "file:doxx-2.0.0.tgz", + "doxx": "git+https://git@github.com/iwatakeshi/doxx.git", "gulp": "^3.9.0", "gulp-clipboard": "^0.1.1", "gulp-connect": "^2.2.0", diff --git a/template/index.jade b/template/index.jade index a7e5429..3ad744d 100644 --- a/template/index.jade +++ b/template/index.jade @@ -12,9 +12,12 @@ html(lang='en-us') meta(name='viewport', content='width=device-width, initial-scale=1') link(rel='stylesheet', href='https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css') link(rel='stylesheet', href='https://fonts.googleapis.com/css?family=Open+Sans:400,700', type='text/css') - link(rel='stylesheet', href='css/bootstrap.css') - link(rel='stylesheet', href='css/cayman.css') - link(rel='stylesheet', href='css/prism.css') + each file in files + each target in targets + if file.name === target.name + link(rel='stylesheet', href=target.relative.path + 'css/bootstrap.css') + link(rel='stylesheet', href=target.relative.path + 'css/cayman.css') + link(rel='stylesheet', href=target.relative.path + 'css/prism.css') body section.page-header h1.project-name= project.title @@ -26,24 +29,27 @@ html(lang='en-us') if(project.url.homepage) a.btn(href=project.url.homepage target='_blank') section(data-spy='scroll' data-target='.scrollspy').main-content + span #{console.log(targets)} .row .col-md-3.bs-docs-sidebar ul.nav.nav-stacked.fixed#sidebar each file in files - li(class=(file.name !== currentName ? "":"active")) - a(href=file.relName) #{file.name} - if file.name === currentName - ul.nav.nav-stacked - each symbol in symbols - li - if name === currentName - a(href='#'+symbol.name) - mixin iForSymbolType(symbol) - span #{symbol.name} - else - a(href=symbol.targetFile+'#'+symbol.name) - mixin iForSymbolType(symbol) - span #{symbol.name} + each target in targets + if file.name === target.name + li(class=(file.name !== currentName ? "":"active")) + a(href=target.relative.path + file.relName) #{file.name} + if file.name === currentName + ul.nav.nav-stacked + each symbol in symbols + li + if name === currentName + a(href='#'+symbol.name) + mixin iForSymbolType(symbol) + span #{symbol.name} + else + a(href=symbol.targetFile+'#'+symbol.name) + mixin iForSymbolType(symbol) + span #{symbol.name} .col-md-9 if locals.readme @@ -114,13 +120,16 @@ html(lang='en-us') | by a(href='https://twitter.com/jasonlong') Jason Long | . - script(src='js/jquery.min.js') - script(src='js/bootstrap.min.js') - script(src='js/affix.js') - script(src='js/dropdown.js') - script(src='js/scrollspy.js') - script(src='js/prism.js') - script(src='js/prism-bash.js') + each file in files + each target in targets + if file.name === target.name + script(src=target.relative.path + 'js/jquery.min.js') + script(src=target.relative.path + 'js/bootstrap.min.js') + script(src=target.relative.path + 'js/affix.js') + script(src=target.relative.path + 'js/dropdown.js') + script(src=target.relative.path + 'js/scrollspy.js') + script(src=target.relative.path + 'js/prism.js') + script(src=target.relative.path + 'js/prism-bash.js') script. $(document).ready(function(){ $('body').scrollspy({ diff --git a/test/docs/api/api.js.html b/test/docs/api/api.js.html new file mode 100644 index 0000000..ca51dbf --- /dev/null +++ b/test/docs/api/api.js.html @@ -0,0 +1,125 @@ + + + + + doxx-theme-cayman + + + + + + + + + + + + + + + + + + +
+
+ +
+
+

Doxx

+
+

+

class
 new Doxx()  extends Compiler +

+
+
+
class Doxx extends Compiler {
+	constructor(){
+
+	}
+
+

generate

+
+

+

method
 Doxx.prototype.generate()  +

+
+

Generates the files

+
generate (){
+
+}
+
+

fn

+
+

+

method
 Doxx.prototype.fn()  +

+
+

Some other function

+
fn () {
+
+}
+}
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/docs/api/api2/api.js.html b/test/docs/api/api2/api.js.html new file mode 100644 index 0000000..39d14a8 --- /dev/null +++ b/test/docs/api/api2/api.js.html @@ -0,0 +1,125 @@ + + + + + doxx-theme-cayman + + + + + + + + + + + + + + + + + + +
+
+ +
+
+

Doxx

+
+

+

class
 new Doxx()  extends Compiler +

+
+
+
class Doxx extends Compiler {
+	constructor(){
+
+	}
+
+

generate

+
+

+

method
 Doxx.prototype.generate()  +

+
+

Generates the files

+
generate (){
+
+}
+
+

fn

+
+

+

method
 Doxx.prototype.fn()  +

+
+

Some other function

+
fn () {
+
+}
+}
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/docs/index.html b/test/docs/index.html index 61d30e5..5ae64e0 100644 --- a/test/docs/index.html +++ b/test/docs/index.html @@ -9,19 +9,30 @@ + + + + + + + + + -
+
@@ -73,6 +84,27 @@

License

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +