angular-jsdoc
Advanced tools
Comparing version 1.4.1 to 1.4.2
@@ -70,3 +70,3 @@ /*global env: true */ | ||
var copyStaticFiles = function() { | ||
['css', 'js', 'fonts'].forEach(function(dirName) { | ||
['css', 'js'].forEach(function(dirName) { | ||
var fromDir = path.join(templatePath, dirName); | ||
@@ -73,0 +73,0 @@ var staticFiles = fs.ls(fromDir, 3); |
@@ -20,3 +20,2 @@ Angular Template | ||
├── js # javascript used in layout.html | ||
├── fonts # font used in layout.html | ||
├── html | ||
@@ -23,0 +22,0 @@ │ ├── class.html # class layout written in angular-template |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ exports.defineTags = function(dictionary) { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ /*global env: true */ |
@@ -0,0 +0,0 @@ Default Template |
@@ -0,0 +0,0 @@ var gulp = require('gulp'); |
33
index.js
@@ -7,2 +7,3 @@ 'use strict'; | ||
var Q = require('q'); | ||
var util = require("util"); | ||
@@ -15,9 +16,17 @@ /** | ||
console.log("cwd is: " + __dirname); | ||
console.log("angularJsdoc Running command\n", cmd, args.join(" ")); | ||
var child = spawn(cmd,args), result=""; | ||
var child = (process.platform === "win32") | ||
// For windows need to spawn a "cmd" instance and pass the command to it | ||
? spawn("cmd", ["/C", cmd + " " + args.join(" ")], { cwd: process.env.PWD, env: process.env}) | ||
: spawn(cmd, args); | ||
var result = ""; | ||
child.stdout.on("data", function(data) { | ||
result += data; | ||
result += data; | ||
}); | ||
child.stderr.on("data", function(data) {result += data;}); | ||
child.stdout.on("end", function() {deferred.resolve(result);}); | ||
child.stderr.on("data", function(data) { result += data; }); | ||
child.stdout.on("end", function() { deferred.resolve(result); }); | ||
@@ -33,11 +42,13 @@ return deferred.promise; | ||
dirs = Array.isArray(dirs) ? dirs : dirs.split(" "); | ||
//default values | ||
var command = | ||
optionsArg.command || path.join("node_modules", "jsdoc", "jsdoc.js"); | ||
var command = optionsArg.command || util.format("node %s", path.join("node_modules", "jsdoc", "jsdoc.js")); | ||
var options = extend({ | ||
configure: path.join(__dirname, "common", "conf.json"), | ||
template: path.join(__dirname, "default"), | ||
destination: "docs", | ||
readme: 'README.md' | ||
}, optionsArg); | ||
configure: path.join(__dirname, "common", "conf.json"), | ||
template: path.join(__dirname, "default"), | ||
destination: "docs", | ||
readme: 'README.md' | ||
}, optionsArg); | ||
// if given template a single word including dash | ||
@@ -44,0 +55,0 @@ if (optionsArg.template && optionsArg.template.match(/^[\w-]+$/i)) { |
@@ -0,0 +0,0 @@ The MIT License (MIT) |
{ | ||
"name": "angular-jsdoc", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "JsDoc Plugin and Template for AngularJs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -124,5 +124,4 @@ Angular-JSDoc | ||
The following is the example of directory with explanation; | ||
The following is the example of directory with explanation: | ||
my-template | ||
@@ -141,4 +140,42 @@ ├── css | ||
Currently the default angular-template does not come with custom fonts. If you would like to use a template like angular-template but with custom fonts, change the `copyStaticFiles` method in your publish.js: | ||
__angular-template/publish.js__ | ||
```js | ||
// copy the template's static files to outdir | ||
var copyStaticFiles = function() { | ||
['css', 'js'].forEach(function(dirName) { | ||
var fromDir = path.join(templatePath, dirName); | ||
var staticFiles = fs.ls(fromDir, 3); | ||
staticFiles.forEach(function(fileName) { | ||
var toDir = fs.toDir( fileName.replace(fromDir, path.join(outdir, dirName)) ); | ||
fs.mkPath(toDir); | ||
fs.copyFileSync(fileName, toDir); | ||
}); | ||
}); | ||
}; | ||
``` | ||
to: | ||
__my-template/publish.js__ | ||
```js | ||
// copy the template's static files to outdir | ||
var copyStaticFiles = function() { | ||
['css', 'js', 'fonts'].forEach(function(dirName) { | ||
var fromDir = path.join(templatePath, dirName); | ||
var staticFiles = fs.ls(fromDir, 3); | ||
staticFiles.forEach(function(fileName) { | ||
var toDir = fs.toDir( fileName.replace(fromDir, path.join(outdir, dirName)) ); | ||
fs.mkPath(toDir); | ||
fs.copyFileSync(fileName, toDir); | ||
}); | ||
}); | ||
}; | ||
``` | ||
Copyright | ||
-------- | ||
MIT licence |
@@ -0,0 +0,0 @@ (function () { |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ (function () { |
@@ -0,0 +0,0 @@ (function() { |
@@ -0,0 +0,0 @@ (function() { |
@@ -0,0 +0,0 @@ (function () { |
@@ -0,0 +0,0 @@ Sample Code |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ child A |
child B | ||
test |
@@ -0,0 +0,0 @@ This |
@@ -0,0 +0,0 @@ tutorial 2 |
@@ -0,0 +0,0 @@ var angularJsdoc = require('./index.js'); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 24 instances in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
180
25
2780912
128
10451
13