@carto/do-catalog

中文文档
0.4.2发布于 2024/06/20BSD-3-ClauseCommonJS零依赖近 30 天下载 7358

Data Observatory Catalog

原始使用文档
文档目录4 节
  1. Quickstart
  2. When to update
  3. Publishing updates
  4. Testing locally with cloud-native

Data Observatory Catalog

This repo contains sources (instructions atm) that build @carto/do-catalog NPM package

Quickstart

  • Install nvm
  • Execute nvm install && nvm use
  • Execute npm install
  • Execute ./scripts/checkout.sh

When to update

  • Update is needed if cloud-native updates @deck.gl version as do-catalog shares runtime with cloud-native so require strictly same version of deck.gl compiled in
  • Update is needed if cartodb releases new version of do-catalog app, one shall merge main into cloud-native branch then

Publishing updates

  1. nvm use
  2. rm -rf .cartodb && npm install && ./scripts/checkout.sh
  3. npm version <patch | minor | major>
  4. git push origin "v$(awk -F\" '/"version":/ {print $4}' package.json)"
  5. Create a new release with the latest published tag
  6. ./scripts/build.sh
  7. npm login
  8. npm publish --tag latest

NOTE: If you don't have access to the @carto/do-catalog package, you should ask for permissions raising an it-issue

Testing locally with cloud-native

IMPORTANT: This is a very hacky solution, yarn link should be used instead, but due to incompatibility issues with latest versions of Yarn, copying the umd.min.js file into cloud-native/workspace-www/node_modules is the quick-win:

  1. Install all the dependencies in the cloud-native/workspace-www directory:
.../cloud-native/workspace-www$ yarn
  1. Build the do-catalog package and replace it in cloud-native/workspace-www/node_modules:
.../do-catalog$ nvm use && npm run build
.../do-catalog$ ./scripts/copy-build.sh /route/to/cloud-native/workspace-www
  1. Start the cloud-native Server
.../cloud-native/workspace-www$ yarn start --force

NOTE: Repeat Step 2 & 3 each time you modify the do-catalog under the .cartodb directory

Image assets

The bundle relies on image assets from .cartodb/public/assets/1.0.0-assets.274/images/do-catalog/ to be available under ../../images/do-catalog w.r.t to url from which javacript runtime is loaded.

Currently those images are committed as-is into cloud-native repo in public/images/do-catalog

IMPORTANT NOTES

  • To install peerDependencies correctly you'll need to use Node v12 with npm v7 and run: npm install --force

TODO:

  • Publish images in this npm package and
  • cloud-native to bundle those images from npm package

版本与发布记录

@carto/do-catalog 共发布 30 个版本,首次发布于 2021/11/09;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.4.2latest2024/06/202 年前
0.4.12024/06/202 年前
0.4.02024/06/202 年前
0.3.132023/09/153 年前
0.3.122023/07/313 年前
0.3.12-alpha.0prerelease2023/07/313 年前

关于 @carto/do-catalog 的常见问题

@carto/do-catalog 是什么?

Data Observatory Catalog

如何安装 @carto/do-catalog?

在项目目录运行 npm install @carto/do-catalog,或使用 pnpm add / yarn add / bun add。

@carto/do-catalog 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/carto__do-catalog 是否存在。

@carto/do-catalog 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@carto/do-catalog 可以商用吗?

@carto/do-catalog 使用 BSD-3-Clause 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。另外不得用原作者名义为衍生产品背书。以上为概括,不构成法律意见,请以许可原文为准。

@carto/do-catalog 的下载量有多少?

根据 npm 官方下载统计,@carto/do-catalog 在 2026/10/09 – 2026/11/07 这 30 天内被下载 7,358 次,日均约 245 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@carto/do-catalog 还在维护吗?

最新版本 0.4.2 发布于 2024/06/20(2 年前);至今共发布 30 个版本,其中过去 12 个月发布了 0 个;首次发布于 2021/11/09。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。