Socket
Socket
Sign inDemoInstall

gitbook-plugin-icp

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitbook-plugin-icp - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

_layouts/website/page.html

38

index.js

@@ -0,6 +1,42 @@

var fs = require('fs');
var path = require('path');
module.exports = {
book: {
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 appleTouchIconPrecomposed152PathFile = this.options.pluginsConfig['favicon-absolute'] && this.options.pluginsConfig['favicon-absolute'].appleTouchIconPrecomposed152;
// if (appleTouchIconPrecomposed152PathFile.startsWith("/")) {
// appleTouchIconPrecomposed152PathFile = appleTouchIconPrecomposed152PathFile.substring(1, appleTouchIconPrecomposed152PathFile.length);
// }
// 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));
// }
}
}
};

4

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

@@ -29,2 +29,2 @@ "main": "index.js",

"homepage": "https://github.com/snowdreams1006/gitbook-plugin-icp#readme"
}
}
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