@5lions/library-registry-admin 中文文档教程

发布于 3年前 浏览 37 项目主页 更新于 3年前

Library Registry Administrative Interface

Test

这是 LYRASIS 维护的分支NYPL Library Simplified 图书馆注册管理界面。

Library Simplified Documentation

要查看屏幕截图、阅读深入的文档并了解有关该项目的更多信息,请查看 Confluence 网站纽约公共图书馆。

Setup

这个包旨在与宫殿项目 Library Registry 一起使用。

Use npm version

建议的本地文件夹设置:

  • /[path to project folder]/library-registry

要将已发布的版本与流通管理器一起使用,请从 library-registry 本地安装的存储库运行 npm install

Use local development version

建议的本地文件夹设置:

  • /[path to project folder]/library-registry
  • /[path to project folder]/library-registry-admin

如果您在管理界面上工作并想测试本地更改,您可以将此存储库的本地克隆链接到本地​​库注册表。 这些步骤将允许您在前端管理界面上工作,并在开发时查看更新。

  1. Run npm link in this library-registry-admin repository,
  2. run npm link library-registry-admin from the library-registry repository,
  3. run the library registry using python app.py at the root in the library-registry repository,
  4. run the web interface using npm run dev at the root of this library-registry-admin repository,
  5. visit localhost:7000/admin/

Webpack 将负责编译和更新本地为开发所做的任何新更改。 只需刷新页面即可查看更新,而无需重新启动 library_registryregistry_admin 服务器。

Publishing

我们使用 GitHub Actions 进行发布。 创建新版本时会自动发布此包。

Accessibility

为了开发每个人都可以访问的用户界面,工作流中添加了一些工具。 除了 Typescript tslint-react-a11y 插件外,还安装了 react-axe 用于本地开发。 在运行应用程序时使用该模块会占用大量资源,因此它应该只在专门测试可访问性时使用,而不是在积极开发新功能或修复错误时使用。

要使用 react-axe 运行应用程序,请运行 npm run dev-test-axe。 这将添加一个局部全局变量 process.env.TEST_AXE(通过 webpack),它将触发 /src/index.tsx 中的 react-axe . 输出将在浏览器的 控制台终端中看到。

Tests

与代码库一样,所有单元测试都是用 Typescript 编写的。 测试是为所有 React 组件以及 redux 和实用程序函数编写的,所有这些都可以在它们各自的 __tests__ 文件夹中找到。

要运行测试,请执行 npm test

我们使用 GitHub Actions 进行持续集成。 提交的任何拉取请求都必须进行测试,并且这些测试必须在 CI 检查期间通过。

License

Copyright © 2015 The New York Public Library, Astor, Lenox, and Tilden Foundations

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Library Registry Administrative Interface

Test

This is a LYRASIS-maintained fork of the NYPL Library Simplified Library Registry administrative interface.

Library Simplified Documentation

To see screenshots, read in-depth documentation, and find out more about the project, check out the Confluence site hosted by The New York Public Library.

Setup

This package is meant to be used with The Palace Project Library Registry.

Use npm version

Suggested local folder setup:

  • /[path to project folder]/library-registry

To use the published version with your circulation manager, run npm install from the library-registry locally installed repository.

Use local development version

Suggested local folder setup:

  • /[path to project folder]/library-registry
  • /[path to project folder]/library-registry-admin

If you're working on the administrative interface and want to test local changes, you can link your local clone of this repository to your local library registry. These steps will allow you to work on the front-end administrative interface and see updates while developing.

  1. Run npm link in this library-registry-admin repository,
  2. run npm link library-registry-admin from the library-registry repository,
  3. run the library registry using python app.py at the root in the library-registry repository,
  4. run the web interface using npm run dev at the root of this library-registry-admin repository,
  5. visit localhost:7000/admin/

Webpack will take care of compiling and updating any new changes made locally for development. Just refresh the page to see updates without having to restart either the library_registry or registry_admin servers.

Publishing

We use GitHub Actions for publishing. This package is published automatically when a new release is created.

Accessibility

In order to develop user interfaces that are accessible to everyone, there are tools added to the workflow. Besides the Typescript tslint-react-a11y plugin, react-axe is also installed for local development. Using that module while running the app uses a lot of resources so it should be only when specifically testing for accessibility and not while actively developing new features or fixing bugs.

In order to run the app with react-axe, run npm run dev-test-axe. This will add a local global variable process.env.TEST_AXE (through webpack) that will trigger react-axe in /src/index.tsx. The output will be seen in the browser's console terminal.

Tests

Like the codebase, all the unit tests are written in Typescript. Tests are written for all React components as well as redux and utility functions, and all can be found in their respective __tests__ folders.

To run the tests, perform npm test.

We use GitHub Actions for continuous integration. Any pull requests submitted must have tests and those tests must pass during the CI checks.

License

Copyright © 2015 The New York Public Library, Astor, Lenox, and Tilden Foundations

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文