diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-24 09:22:02 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-24 09:22:02 +0000 |
commit | 8b9e5144f7af3bb0578d80ed619dd0743d0d5f0f (patch) | |
tree | c651acc917541c3ad4fc91eb30df52c2f07095fd /build/zip-examples.js | |
parent | Adding upstream version 5.3.1+dfsg. (diff) | |
download | bootstrap-html-upstream.tar.xz bootstrap-html-upstream.zip |
Adding upstream version 5.3.3+dfsg.upstream/5.3.3+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | build/zip-examples.mjs (renamed from build/zip-examples.js) | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/build/zip-examples.js b/build/zip-examples.mjs index 7378c33..e5e39be 100644 --- a/build/zip-examples.js +++ b/build/zip-examples.mjs @@ -3,16 +3,19 @@ /*! * Script to create the built examples zip archive; * requires the `zip` command to be present! - * Copyright 2020-2023 The Bootstrap Authors + * Copyright 2020-2024 The Bootstrap Authors * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ -'use strict' +import fs from 'node:fs/promises' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import sh from 'shelljs' -const path = require('node:path') -const sh = require('shelljs') +const __dirname = path.dirname(fileURLToPath(import.meta.url)) -const pkg = require('../package.json') +const pkgJson = path.join(__dirname, '../package.json') +const pkg = JSON.parse(await fs.readFile(pkgJson, 'utf8')) const versionShort = pkg.config.version_short const distFolder = `bootstrap-${pkg.version}-examples` |