Changed around line 5: const path = require("path")
- const { ScrollFile, ScrollFileSystem, ScrollCli } = require("scroll-cli")
Changed around line 116: class PLDBCli extends ScrollSetCLI {
- async formatCommand(lang) {
- // Todo: figuring out best repo orgnization for crawlers.
- // Note: this currently assumes you have crawlers project installed separateely.
- if (!lang) return
- const file = this.concepts.filter(file => lang === file.id)[0]
- if (file) this.formatAndSave(file)
- }
-
- async testCommand(lang) {
- if (!lang) return ""
- const file = new ScrollFile(undefined, path.join(this.conceptsFolder, lang + ".scroll"), new ScrollFileSystem())
- const errors = file.scrollProgram.getAllErrors().map(obj => obj.toObject())
- console.log(errors.length + " errors")
- if (errors.length) console.log(errors)
- }
-
- async buildCommand(lang) {
- if (!lang) return ""
- const sfs = new ScrollFileSystem()
- const file = new ScrollFile(undefined, path.join(this.conceptsFolder, lang + ".scroll"), sfs)
- new ScrollCli().buildFiles(sfs, [file], this.conceptsFolder)
- }
-