Verified Commit a67e6589 authored by Aral Balkan's avatar Aral Balkan
Browse files

Fix sync regression

parent 7afbbadc
......@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [14.6.1] - 2020-08-29
### Fixed
- Regression with sync/push due to missing dependencies in generate content refactor in 14.4.0.
## [14.6.0] - 2020-08-27
### Added
......
......@@ -46,7 +46,7 @@ function push (args) {
;(async () => {
// Generate any content that needs to be generated (e.g., Hugo content).
await generateContent(pathToPush)
await generateContent(pathToPush, host)
console.log(`\n ⏩ ❨site.js❩ Pushing from ${clr(pathToPush, 'yellow')} to ${clr(host, 'yellow')}…\n`)
......
......@@ -150,7 +150,7 @@ function serve (args) {
;(async () => {
// Generate any content that needs to be generated (e.g., Hugo content).
await generateContent(path)
await generateContent(path, syncOptions.host)
// Any content that needs to be generated has been generated. Ready to sync.
sync(syncOptions)
......@@ -417,7 +417,6 @@ module.exports = serve
// Note: requires are at the bottom to avoid a circular reference as ../../index (Site)
// ===== also requires this module.
const Hugo = require('@small-tech/node-hugo')
const sync = require('../lib/sync')
const ensure = require('../lib/ensure')
const status = require('../lib/status')
......
const fs = require('fs-extra')
const path = require('path')
const clr = require('../../lib/clr')
const Hugo = require('@small-tech/node-hugo')
const Site = require('../../index')
const asyncForEach = require('../../lib/async-foreach')
async function generateContent (workingPath) {
async function generateContent (workingPath, host) {
const absolutePathToServe = path.resolve(workingPath)
......@@ -54,7 +58,7 @@ async function generateContent (workingPath) {
const sourcePath = path.join(workingPath, file)
const destinationPath = `../.generated${mountPath}`
const baseURL = `https://${syncOptions.host}`
const baseURL = `https://${host}`
// Run the Hugo build.
try {
......
{
"name": "@small-tech/site.js",
"version": "14.6.0",
"version": "14.6.1",
"description": "Small Web construction set.",
"keywords": [
"web server",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment