Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
breck7 committed Oct 13, 2024
1 parent 88ac90e commit 1df4b6e
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions gettingStarted.scroll
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ The World Wide Scroll (WWS) is designed to be a more intelligent, offline, and h

2. *Open Source and Public Domain*: The WWS is designed for a post-copyright world and all content on the WWS is open-source and public domain.

3. *Leverage Git for Site Management*: Unlike the traditional web, the WWS uses Git for site transfers. Your site must be stored in a publicly accessible Git repository. Platforms like GitHub and GitLab offer free hosting for open-source projects. Your repo should have a branch named `wws` where your compiled site is written to. ScrollHub (beta) is another fast option you could use.
3. *Leverage Git for Site Management*: Unlike the traditional web, the WWS uses Git for site transfers. Your site must be stored in a publicly accessible Git repository. Platforms like GitHub and GitLab offer free hosting for open-source projects. ScrollHub (beta) is another fast option you could use.
https://github.com GitHub
https://gitlab.com GitLab
http://hub.scroll.pub/ ScrollHub
https://hub.scroll.pub/ ScrollHub

4. *Design for Offline Use*: Your site should function fully offline. Avoid using external JavaScript, images, or assets that require an internet connection. Ensure all necessary files are included in your Git repo. For large files, such as videos, linking to external sites is acceptable, but avoid adding unnecessarily large files directly to your repo.

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@breck/wws",
"version": "0.16.0",
"version": "0.17.0",
"description": "The World Wide Scroll",
"main": "wws.js",
"engines": {
Expand Down Expand Up @@ -36,8 +36,8 @@
"dependencies": {
"express": "^4.21.1",
"minimist": "^1.2.8",
"scroll-cli": "^138.4.0",
"scrollsdk": "^88.0.0"
"scroll-cli": "^141.0.0",
"scrollsdk": "^90.1.0"
},
"devDependencies": {
"tap": "^18.7.2"
Expand Down
4 changes: 4 additions & 0 deletions releaseNotes.scroll
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ node_modules/scroll-cli/microlangs/changes.parsers

thinColumns 1

📦 0.17.0 10/13/2024
🏥 bug fixes
⚠️ removed branches. not worth the complexity at all.

📦 0.16.0 10/11/2024
🎉 store data in users home dir. Thanks TD!
🏥 bug fixes
Expand Down
6 changes: 0 additions & 6 deletions root.parsers
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ sourceParser
description What is the URL to the source code for this folder?
float sortIndex 1.02

branchParser
// todo: remove this
extends abstractStringMeasureParser
description What is the branch to fetch if not main?
float sortIndex 1.021

editorParser
// required
extends abstractStringMeasureParser
Expand Down
1 change: 0 additions & 1 deletion root.scroll
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ name pldb
description A Programming Language DataBase
web https://pldb.io
source https://github.com/breck7/pldb
branch wws
editor Breck Yunits
email breck7@gmail.com
registered 6/12/2024
Expand Down
25 changes: 14 additions & 11 deletions wws.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,21 +202,18 @@ viewSourceUrl https://github.com/breck7/wws/blob/main/wws.js
// mkdir the folder if it doesn't exist:
const rootFolder = path.join(wwsDir, folder.name)
const gitSource = folder.source
const gitBranch = folder.branch || "main"
if (!Disk.exists(rootFolder)) {
this.log(`Fetching ${folderName}`)
Disk.mkdir(rootFolder)
// do a shallow clone of the built site (wws branch) into the folder:
const cloneCommand = `git clone --branch ${gitBranch} ${gitSource} ${rootFolder}`
const cloneCommand = `git clone ${gitSource} ${rootFolder}`
console.log(cloneCommand)
child_process.execSync(cloneCommand)
} else {
// update the shallow clone but still keep it shallow
this.log(`Updating ${folderName}`)
child_process.execSync(`cd ${rootFolder} && git pull origin ${gitBranch}`)
child_process.execSync(`cd ${rootFolder} && git pull origin`)
}
// if main branch, build the site
if (gitBranch === "main") await scrollCli.buildCommand(rootFolder)
await scrollCli.buildCommand(rootFolder)
// ditch subfolders?
const settingsParticle = this.getFolderSettings(folder.name)
settingsParticle
.filter(particle => particle.getLine().startsWith("subfolder"))
Expand All @@ -227,8 +224,8 @@ viewSourceUrl https://github.com/breck7/wws/blob/main/wws.js
console.log(`Updating subfolder '${subfolderName}'`)
if (!Disk.exists(subfolderPath)) {
Disk.mkdir(subfolderPath)
child_process.execSync(`git clone --depth 1 --branch wws ${sourceRepo} ${subfolderPath}`)
} else child_process.execSync(`cd ${subfolderPath} && git pull origin wws`)
child_process.execSync(`git ${sourceRepo} ${subfolderPath}`)
} else child_process.execSync(`cd ${subfolderPath} && git pull origin`)
})
}

Expand All @@ -250,6 +247,10 @@ viewSourceUrl https://github.com/breck7/wws/blob/main/wws.js
this.buildIndexPage()
}

get isLocalServerRunning() {
return false
}

// buildCommand() {
// this.init()
// this.buildIndexPage()
Expand All @@ -258,9 +259,11 @@ viewSourceUrl https://github.com/breck7/wws/blob/main/wws.js
openCommand() {
// Trigger the terminal to run "open index.html", opening the users web browser:
this.init()
const { wwsDir } = this
const { wwsDir, isLocalServerRunning } = this
const indexHtml = path.join(wwsDir, "index.html")
return child_process.exec(`open ${indexHtml}`)
const url = isLocalServerRunning ? "http://scroll/" : indexHtml
console.log(`Your copy of The Scroll can be accessed with 'open ${indexHtml}' or 'open http://scroll/' (if server started). Now opening: '${url}'`)
return child_process.exec(`open ${url}`)
}

get welcomeMessage() {
Expand Down

0 comments on commit 1df4b6e

Please sign in to comment.