Skip to content

Commit

Permalink
Perf fix
Browse files Browse the repository at this point in the history
  • Loading branch information
breck7 committed Dec 19, 2024
1 parent 2751800 commit b97f3d7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scroll-cli",
"version": "164.4.0",
"version": "164.5.0",
"description": "A language for scientists of all ages. A curated collection of tools for refining and sharing thoughts.",
"main": "scroll.js",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion parsers/root.parsers
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ scrollParser
}
get scrollVersion() {
// currently manually updated
return "164.4.0"
return "164.5.0"
}
// Use the first paragraph for the description
// todo: add a particle method version of get that gets you the first particle. (actulaly make get return array?)
Expand Down
3 changes: 3 additions & 0 deletions releaseNotes.scroll
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ ciBadges.scroll
br
thinColumns

📦 164.5.0 12/19/2024
🏥 perf fix: reuse same disk cache when doing `scroll list | scroll build`

📦 164.4.0 12/17/2024
🎉 assertions now can also be one liners
🎉 `inlineJs` and `inlineCss` can now take filenames as subparticles
Expand Down
8 changes: 5 additions & 3 deletions scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,14 @@ footer.scroll`
return this.log(`\n✅ Initialized new scroll in '${cwd}'. Build your new site with: scroll build`)
}

sfs = new ScrollFileSystem()

deleteCommand() {
return this.log(`\n💡 To delete a Scroll just delete the folder\n`)
}

async getErrorsInFolder(folder) {
const fileSystem = new ScrollFileSystem()
const fileSystem = this.sfs
const folderPath = Utils.ensureFolderEndsInSlash(folder)
const files = await fileSystem.getLoadedFilesInFolder(folderPath, ".scroll") // Init/cache all parsers
const parserErrors = fileSystem.parsers.map(parser => parser.getAllErrors().map(err => err.toObject())).flat()
Expand Down Expand Up @@ -131,7 +133,7 @@ footer.scroll`
}

async formatCommand(cwd) {
const fileSystem = new ScrollFileSystem()
const fileSystem = this.sfs
const folder = this.resolvePath(cwd)
const files = await fileSystem.getLoadedFilesInFolder(folder, ".scroll")
// .concat(fileSystem.getLoadedFilesInFolder(folder, PARSERS_FILE_EXTENSION)) // todo: should format parser files too.
Expand All @@ -145,7 +147,7 @@ footer.scroll`
}

async buildCommand(cwd) {
await this.buildFilesInFolder(new ScrollFileSystem(), this.resolvePath(cwd))
await this.buildFilesInFolder(this.sfs, this.resolvePath(cwd))
return this
}

Expand Down

0 comments on commit b97f3d7

Please sign in to comment.