Socket
Socket
Sign inDemoInstall

gitbook-plugin-icp

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.3 to 0.0.4

35

index.js

@@ -5,39 +5,16 @@ var fs = require('fs');

module.exports = {
book: {
assets: "./assets",
js: ["plugin.js"]
},
hooks: {
"init": function() {
this.log.debug.ln('init', this.options.pluginsConfig['icp']);
},
"finish:before": function() {
this.log.debug.ln('finish:before', this.options.pluginsConfig['icp']);
},
"finish": function() {
this.log.debug.ln('finish', this.options.pluginsConfig['icp']);
// var faviconPathFile = this.options.pluginsConfig['favicon-absolute'] && this.options.pluginsConfig['favicon-absolute'].favicon;
// if (faviconPathFile.startsWith("/")) {
// faviconPathFile = faviconPathFile.substring(1, faviconPathFile.length);
// }
// var faviconAbsolutePath = path.join(process.cwd(), faviconPathFile);
// var gitbookFaviconPath = path.join(process.cwd(), '_book', 'gitbook', 'images', 'favicon.ico');
// if (faviconPathFile && fs.existsSync(faviconPathFile) && fs.existsSync(gitbookFaviconPath)) {
// fs.unlinkSync(gitbookFaviconPath);
// fs.createReadStream(faviconAbsolutePath).pipe(fs.createWriteStream(gitbookFaviconPath));
// }
var number = this.options.pluginsConfig['icp'] && this.options.pluginsConfig['icp'].number;
var indexPath = path.join(process.cwd(), '_book', 'index.html');
console.log("number="+number+",indexPath="+indexPath);
// var appleTouchIconPrecomposed152PathFile = this.options.pluginsConfig['favicon-absolute'] && this.options.pluginsConfig['favicon-absolute'].appleTouchIconPrecomposed152;
// if (appleTouchIconPrecomposed152PathFile.startsWith("/")) {
// appleTouchIconPrecomposed152PathFile = appleTouchIconPrecomposed152PathFile.substring(1, appleTouchIconPrecomposed152PathFile.length);
// if (number && fs.existsSync(indexPath)) {
// fs.createReadStream(indexPath).pipe(fs.createWriteStream(indexPath));
// }
// var appleTouchIconPrecomposed152 = path.join(process.cwd(), appleTouchIconPrecomposed152PathFile);
// var gitbookAppleTouchPath = path.join(process.cwd(), '_book', 'gitbook', 'images', 'apple-touch-icon-precomposed-152.png');
// if (appleTouchIconPrecomposed152PathFile && fs.existsSync(appleTouchIconPrecomposed152PathFile) && fs.existsSync(gitbookAppleTouchPath)) {
// fs.unlinkSync(gitbookAppleTouchPath);
// fs.createReadStream(appleTouchIconPrecomposed152).pipe(fs.createWriteStream(gitbookAppleTouchPath));
// }
}
}
};

2

package.json
{
"name": "gitbook-plugin-icp",
"version": "0.0.3",
"version": "0.0.4",
"description": "gitbook plugin for adding icp info to footer",

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc