Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "litecanvas",
"version": "0.103.5",
"version": "0.103.6",
"description": "Lightweight HTML5 canvas 2D game engine suitable for small projects and creative coding. Inspired by PICO-8 and p5.js/Processing.",
"license": "MIT",
"author": "Luiz Bills <luizbills@pm.me>",
Expand Down
22 changes: 12 additions & 10 deletions script/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ import * as prettier from 'prettier'

await fs.rm('dist', { recursive: true, force: true })

const prettierOptions = {
parser: 'babel',
tabWidth: 2,
semi: true,
endOfLine: 'lf',
}

// build the dist.dev.js (for development)
{
const filepath = 'dist/dist.dev.js'
Expand All @@ -17,11 +24,7 @@ await fs.rm('dist', { recursive: true, force: true })
minifyWhitespace: true,
drop: ['debugger'],
})
const formatted = await prettier.format(await fs.readFile(filepath, 'utf8'), {
parser: 'babel',
tabWidth: 2,
semi: false,
})
const formatted = await prettier.format(await fs.readFile(filepath, 'utf8'), prettierOptions)
await fs.writeFile(filepath, formatted)

console.log(` 📄 ${filepath} (${await filesize(filepath)})`)
Expand All @@ -40,11 +43,10 @@ await fs.rm('dist', { recursive: true, force: true })
drop: ['debugger', 'console'],
dropLabels: ['DEV'],
})
const formatted = await prettier.format(await fs.readFile(filepath, 'utf8'), {
parser: 'babel',
tabWidth: 2,
semi: false,
})
const formatted = await prettier.format(
await fs.readFile(filepath, 'utf8'),
prettierOptions
)
await fs.writeFile(filepath, formatted)

console.log(` 📄 ${filepath} (${await filesize(filepath)})`)
Expand Down
2 changes: 1 addition & 1 deletion src/version.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.