kiss-ssg 1.4.2 → 1.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,7 @@ const kiss = new Kiss({
7
7
  },
8
8
  verbose: true,
9
9
  dev: true,
10
+ port: 8080,
10
11
  })
11
12
  .page({
12
13
  view: 'index.hbs',
package/kiss-serve.js CHANGED
@@ -4,8 +4,10 @@ const static = require('serve-static')
4
4
  const colors = require('colors')
5
5
  const app = connect()
6
6
 
7
- module.exports = async (httpRoot) => {
7
+ module.exports = async (httpRoot, port) => {
8
8
  if (!httpRoot) httpRoot = '/public'
9
+ if (!port) port = 3000
10
+
9
11
  app.use(function (req, res, next) {
10
12
  console.log(req.url)
11
13
  next()
@@ -26,9 +28,9 @@ module.exports = async (httpRoot) => {
26
28
 
27
29
  console.log(
28
30
  `Serving (${httpRoot}): `.grey,
29
- colors.yellow('http://localhost:3000')
31
+ colors.yellow('http://localhost:' + port)
30
32
  )
31
- app.listen(3000)
33
+ app.listen(port)
32
34
 
33
35
  const livereload = require('livereload')
34
36
  const server = livereload.createServer()
package/kiss-ssg.js CHANGED
@@ -344,6 +344,7 @@ class Kiss {
344
344
  sass: {
345
345
  includePaths: [],
346
346
  },
347
+ port: 3001,
347
348
  },
348
349
  ...config,
349
350
  }
@@ -364,7 +365,7 @@ class Kiss {
364
365
  const kissServe = require('./kiss-serve')
365
366
  var publicDir = path.resolve(this.config.folders.build)
366
367
  try {
367
- kissServe(publicDir)
368
+ kissServe(publicDir, this.config.port)
368
369
  } catch (error) {
369
370
  console.error('Error running live reload server'.red)
370
371
  console.log(error.message)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kiss-ssg",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "Simple Static Website Generator",
5
5
  "main": "kiss-ssg.js",
6
6
  "scripts": {