Skip to content

Commit 55ddae9

Browse files
committed
Fix formatting
1 parent 0b5dc62 commit 55ddae9

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

index.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class TopBun {
6464
* @param {string} dest - The dest path of the page build
6565
* @param {TopBunOpts} [opts] - The options for the site build
6666
*/
67-
constructor(src, dest, opts = {}) {
67+
constructor (src, dest, opts = {}) {
6868
assert(src, 'src is a required argument')
6969
assert(dest, 'dest is a required argument')
7070

@@ -78,11 +78,11 @@ export class TopBun {
7878
this.opts = opts
7979
}
8080

81-
get watching() {
81+
get watching () {
8282
return Boolean(this.#watcher)
8383
}
8484

85-
build() {
85+
build () {
8686
return builder(this.#src, this.#dest, { static: true, ...this.opts })
8787
}
8888

@@ -92,11 +92,11 @@ export class TopBun {
9292
* @param {boolean} params.serve
9393
* @return {Promise<Results>}
9494
*/
95-
async watch({
95+
async watch ({
9696
serve,
9797
} = {
98-
serve: true,
99-
}) {
98+
serve: true,
99+
}) {
100100
if (this.watching) throw new Error('Already watching.')
101101

102102
/** @type Results */
@@ -188,7 +188,7 @@ export class TopBun {
188188
return report
189189
}
190190

191-
async stopWatching() {
191+
async stopWatching () {
192192
if ((!this.watching || !this.#cpxWatcher)) throw new Error('Not watching')
193193
if (this.#watcher) await this.#watcher.close()
194194
this.#cpxWatcher.close()
@@ -205,15 +205,15 @@ export class TopBun {
205205
* @param {string} name The name string
206206
* @return {string} the relname
207207
*/
208-
function relname(root, name) {
208+
function relname (root, name) {
209209
return root === name ? basename(name) : relative(root, name)
210210
}
211211

212212
/**
213213
* An error logger
214214
* @param {Error | AggregateError | any } err The error to log
215215
*/
216-
function errorLogger(err) {
216+
function errorLogger (err) {
217217
if (!(err instanceof Error || err instanceof AggregateError)) throw new Error('Non-error thrown', { cause: err })
218218
if ('results' in err) delete err.results
219219
console.error(inspect(err, { depth: 999, colors: true }))
@@ -226,7 +226,7 @@ function errorLogger(err) {
226226
* An build logger
227227
* @param {Results} results
228228
*/
229-
function buildLogger(results) {
229+
function buildLogger (results) {
230230
if (results?.warnings?.length > 0) {
231231
console.log(
232232
'\nThere were build warnings:\n'

0 commit comments

Comments
 (0)