From 435bdd1f70a321c8ae712aa6b06143d6f0c30fad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Belin?= Date: Thu, 7 Nov 2024 20:32:19 +0100 Subject: [PATCH] Update the "build" tasl [skip ci] --- src/cakefile.coffee | 4 +++- src/client.coffee | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cakefile.coffee b/src/cakefile.coffee index 4c47b69..870d3c0 100644 --- a/src/cakefile.coffee +++ b/src/cakefile.coffee @@ -1,5 +1,5 @@ {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" @@ -7,6 +7,8 @@ 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" diff --git a/src/client.coffee b/src/client.coffee index 9cfc1a7..1008987 100644 --- a/src/client.coffee +++ b/src/client.coffee @@ -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 = {}) ->