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

Fix circular dependency in generate-content

This was causing sync/push to fail on sites with generated content (currently Hugo-based sites).
parent 8105b416
......@@ -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).
## [15.1.1] - 2020-09-11
### Fixed
- Circular dependency issue (regression) in content generator used by the push and serve commands.
## [15.1.0] - 2020-09-02
### Added
......
......@@ -46,7 +46,7 @@ function push (args) {
;(async () => {
// Generate any content that needs to be generated (e.g., Hugo content).
await generateContent(pathToPush, host)
await generateContent(pathToPush, host, Site)
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, syncOptions.host)
await generateContent(path, syncOptions.host, Site)
// Any content that needs to be generated has been generated. Ready to sync.
sync(syncOptions)
......
......@@ -3,11 +3,9 @@ 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, host) {
async function generateContent (workingPath, host, Site) {
const absolutePathToServe = path.resolve(workingPath)
......
{
"name": "@small-tech/site.js",
"version": "15.1.0",
"version": "15.1.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