Socket
Socket
Sign inDemoInstall

ghost-static

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ghost-static - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

10

bin/scrap.js

@@ -17,3 +17,3 @@ #!/usr/bin/env node

.option('publish', 'The url that will point to the static Ghost site', 'http://localhost:8080')
.option('to-replace', 'List of comma-separated urls, if you want to replace other URLs than [source] by [publish].')
.option('to-replace', 'List of comma-separated urls, if you want to replace other URLs than [source] by [publish].', null)

@@ -39,5 +39,3 @@

let data = fs.readFileSync(resPath, 'utf8')
for (const url of this.replaceUrls) {
data = data.replace(new RegExp(scraper.localURL, 'g'), url)
}
data = data.replace(new RegExp(scraper.replaceUrls, 'g'), scraper.publishURL)
fs.writeFileSync(resPath, data, 'utf8')

@@ -67,7 +65,7 @@ } catch (e) {

this.tmpFolder = path.resolve('tmp')
this.replaceUrls = flags['to-replace'] ? flags['to-replace'].replace(/\s/g, '').split(',') : [this.publishURL]
this.replaceUrls = flags.toReplace ? flags.toReplace.replace(/\s/g, '').split(',').join('|') : [this.publishURL]
console.log('----')
console.log(`Will download from ${this.localURL} to ${path.resolve(this.destFolder)}`)
console.log(`All references to ${this.localURL} will be replaced by ${this.publishURL}`)
console.log(`All references to ${this.replaceUrls} will be replaced by ${this.publishURL}`)
console.log('----')

@@ -74,0 +72,0 @@ }

2

package.json
{
"name": "ghost-static",
"version": "0.3.0",
"version": "0.3.1",
"description": "A tool to convert you Ghost blog to a static website",

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

@@ -28,3 +28,4 @@ # Ghost static

-p, --publish [value] The url that will point to the static Ghost site (defaults to "http://localhost:8080")
-s, --source [value] The current running instance of Ghost (defaults to "http://localhost:2368")
-s, --source [value] The current running instance of Ghost. This url will be replaced by the [publish] one. (defaults to "http://localhost:2368")
-t, --to-replace List of comma-separated urls, if you want to replace other URLs than [source] by [publish]. (defaults to null)
-v, --version Output the version number

@@ -31,0 +32,0 @@ ```

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