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

docsify-ts-api

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docsify-ts-api - npm Package Compare versions

Comparing version 1.0.4 to 1.1.0

50

lib/context/context.js

@@ -1,20 +0,20 @@

const readPkgUp = require("read-pkg-up");
const readPkgUp = require('read-pkg-up');
const SYMBOL_TYPES = {
"@": { value: "decorator", label: "Decorator" },
"T": { value: "type", label: "Type alias" },
"C": { value: "class", label: "Class" },
"S": { value: "service", label: "Service" },
"I": { value: "interface", label: "Interface" },
"K": { value: "const", label: "Constant" },
"E": { value: "enum", label: "Enum" },
"F": { value: "function", label: "Function" }
'@': { value: 'decorator', label: 'Decorator' },
'T': { value: 'type', label: 'Type alias' },
'C': { value: 'class', label: 'Class' },
'S': { value: 'service', label: 'Service' },
'I': { value: 'interface', label: 'Interface' },
'K': { value: 'const', label: 'Constant' },
'E': { value: 'enum', label: 'Enum' },
'F': { value: 'function', label: 'Function' }
};
const SYMBOL_STATUS = {
"S": { value: "stable", label: "Stable" },
"D": { value: "deprecated", label: "Deprecated" },
"E": { value: "experimental", label: "Experimental" },
"P": { value: "private", label: "Private" },
"O": { value: "public", label: "Public" }
'S': { value: 'stable', label: 'Stable' },
'D': { value: 'deprecated', label: 'Deprecated' },
'E': { value: 'experimental', label: 'Experimental' },
'P': { value: 'private', label: 'Private' },
'O': { value: 'public', label: 'Public' }
};

@@ -38,13 +38,17 @@

readPkg() {
return readPkgUp().then((result) => {
const { name, repository, version, docsifyApi } = result.pkg;
this.github = repository.url.replace(".git", "").replace("git+", "");
this.version = version;
this.projectName = name;
this.host = `${this.github}/blob/v${version}/src/`;
this.modules = docsifyApi.modules;
return result.pkg;
});
return readPkgUp()
.then((result) => {
module.exports.importPkg(result.pkg);
return result.pkg;
});
},
importPkg(pkg) {
const { name, repository, version, docsifyApi } = pkg;
this.github = repository.url.replace('.git', '').replace('git+', '');
this.version = version;
this.projectName = name;
this.host = `${this.github}/blob/v${version}/src/`;
this.modules = docsifyApi.modules;
}
};

@@ -1,14 +0,14 @@

"use strict";
'use strict';
const { context } = require("../context");
const { writeSymbol, writeTemplate } = require("../write/write");
const { scanFiles, scanComponents } = require("../scan/scan");
const path = require("path");
const { context } = require('../context');
const { writeSymbol, writeTemplate } = require('../write/write');
const { scanFiles, scanComponents } = require('../scan/scan');
const path = require('path');
const { $log } = require("ts-log-debug");
const { $log } = require('ts-log-debug');
$log.name = "DOC";
$log.name = 'DOC';
const options = {
components: path.join(__dirname, "..", "..", "components")
components: path.join(__dirname, '..', '..', 'components')
};

@@ -20,3 +20,3 @@

*/
buildApi(config) {
buildApi(config, pkg) {
context.root = config.root;

@@ -28,6 +28,6 @@ context.apiDir = config.apiDir;

return context
.readPkg()
return Promise.resolve()
.then(() => pkg ? context.importPkg(pkg) : context.readPkg())
.then(() => scanComponents(options.components))
.then(() => scanFiles(context.libDir + "/**/*.ts"))
.then(() => scanFiles(context.libDir + '/**/*.ts'))
.then(() => {

@@ -40,7 +40,7 @@ context.symbols.forEach((symbol) => {

.then(() => {
writeTemplate(context.docsDir + "/**/*.{ejs,emd}");
writeTemplate(context.docsDir + '/**/*.{ejs,emd}');
})
.then(() => $log.info("done"))
.then(() => $log.info('done'))
.catch(err => console.error(err));
}
};
{
"name": "docsify-ts-api",
"version": "1.0.4",
"version": "1.1.0",
"description": "Generate documentation on TypeScript API for docsify tool",

@@ -5,0 +5,0 @@ "main": "index.js",

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