Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

doctasia

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

doctasia - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

lib/template/deep-ocean/css/bootstrap-responsive.css

10

index.js

@@ -12,2 +12,8 @@ var args = require("argsparser").parse()

var theme = "deep-ocean"
if(args["-t"]) {
theme = args["-t"]
}
var outPutDir = "docs_out"

@@ -24,3 +30,3 @@

}
HTMLCompiler.compile(manifest, outPutDir)
HTMLCompiler.compile(manifest, outPutDir, theme)

@@ -45,2 +51,4 @@ }

help += "\n"
help += "-t\t\t the theme to use. Default 'white'. Available: 'white', 'deep-ocean"
help += "\n"
help += "-h\t\t display this "

@@ -47,0 +55,0 @@

26

lib/doctasia.js

@@ -12,5 +12,4 @@

function compile(manifestFilePath, outputDir) {
function compile(manifestFilePath, outputDir, theme) {
var content = fs.readFileSync(manifestFilePath, 'utf8')

@@ -28,2 +27,7 @@

if(!manifest.prettify) {
console.log("Prettify theme set to default because it is no in your manifest.")
manifest.prettify = "default"
}
for(var i = 0 ; i < manifest.pages.length ; i++) {

@@ -58,3 +62,3 @@ var page = manifest.pages[i]

page.htmlContent = page.htmlContent.replace('<pre>', '<pre class="prettyprint">')
page.htmlContent = page.htmlContent.replace(/<pre><code/gi, '<pre class="prettyprint"><code')

@@ -72,5 +76,5 @@ if(i === 0) {

copyTemplate(outputDir)
copyTemplate(outputDir, theme)
compilePages(outputDir, manifest, function(err) {
compilePages(outputDir, manifest, theme, function(err) {
if(err) {

@@ -86,5 +90,5 @@ console.log(err)

function loadTemplate() {
function loadTemplate(theme) {
// TODO: make template configurable
var templateFile = __dirname+"/template/default/index.html"
var templateFile = __dirname+"/template/"+theme+"/index.html"
var template = fs.readFileSync(templateFile, 'utf8')

@@ -95,5 +99,5 @@ var compiled = dust.compile(template, "template")

function compilePages(targetDir, manifest, callback) {
function compilePages(targetDir, manifest, theme, callback) {
loadTemplate()
loadTemplate(theme)

@@ -165,3 +169,3 @@ var runner = new SerialRunner()

function copyTemplate(targetDir) {
function copyTemplate(targetDir, theme) {

@@ -173,5 +177,5 @@ if(!fs.existsSync(targetDir)) {

wrench.copyDirSyncRecursive(__dirname+"/template/default", targetDir)
wrench.copyDirSyncRecursive(__dirname+"/template/"+theme, targetDir)
}
exports.compile = compile
{
"name": "doctasia",
"version": "0.0.3",
"version": "0.0.4",
"author": "Nicolas Herment <nherment@gmail.com>",

@@ -5,0 +5,0 @@ "preferGlobal": "true",

@@ -20,3 +20,3 @@ **Doctasia** is a straightforward static website generator for Markdown documentation.

```
```json
{

@@ -45,2 +45,2 @@ "title": "Doctasia", /* the website title */

- color highlighting of code snippets
- better UI
- better UI
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc