Skip to content

Commit

Permalink
Update the "build" tasl [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Nov 7, 2024
1 parent 889d280 commit 435bdd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/cakefile.coffee
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{spawnSync} = require "node:child_process"
{readdirSync, rmSync} = require "node:fs"
{readdirSync, readFileSync, rmSync, writeFileSync} = require "node:fs"
{join} = require "node:path"
{env} = require "node:process"
pkg = require "../package.json"

option "-m", "--map", "Whether to generate source maps."

task "build", "Builds the project.", (options) ->
file = "src/client.coffee"
writeFileSync file, readFileSync(file, "utf8").replace /@_version = "\d+(\.\d+){2}"/, "@_version = \"#{pkg.version}\""
sourcemaps = if options.map then ["--map"] else []
run "coffee", "--compile", sourcemaps..., "--no-header", "--output", "lib", "src"

Expand Down
2 changes: 1 addition & 1 deletion src/client.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class Client
@_success = "Thanks for making the web a better place."

# The package version.
@_version = "16.2.1"
@_version = "17.0.0"

# Creates a new client.
constructor: (apiKey, blog, options = {}) ->
Expand Down

0 comments on commit 435bdd1

Please sign in to comment.