The content in this file links to Elastic internal resources and is mainly meant for core maintainers within Elastic. For a more general guide for developing, please consult CONTRIBUTING.md.
The Search UI docs are built using an internal library (which hopefully moves into the open soon!).
An overview of the syntax used can be found here: https://github.com/elastic/docsmobile/blob/main/doc-site/docs/docs_syntax.mdx.
docs.elastic.co
folder and copying content.js: cp config/content.js config/content-dev.js
sources: [
{
type: 'github',
location: 'elastic/wordlake',
},
{
type: 'file',
location: '../../search-ui'
}
],
yarn
, then yarn init-docs
, then yarn dev
.yarn docs-start
from the search-ui root.Releases should be performed directly in master (or a minor branch for patches), following the Publishing guide.
We will create branches for all minor releases.
Because all examples are declared as "private", when running lerna commands other than bootstrap, (like
publish
andtest
), the--no-private
flag should be appended.
(Example, publishing 0.6.0)
npx lerna version 0.6.0 --force-publish --exact
.0.6.0
tag was created as well as a "Release 0.6.0" commit.nvm use
to make sure you are running the correct version of node, and verify that npm run build
runs without error before publishing.npx lerna publish from-package
.0.6.0
has been published to npm.v0.6.0
tag and commit has been pushed to master
on origin
.0.6
from the 0.6.0
tag and push to origin
.(Example, publish 0.6.1)
0.6
branch from the 0.6.0
tag, if one does not already exist.npx lerna version 0.6.1 --force-publish --exact
.v0.6.1
tag was created as well as a "Release 0.6.1" commit.nvm use
to make sure you are running the correct version of node, and verify that npm run build
runs without error before publishing.npx lerna publish from-package
.0.6.1
has been published to npm.0.6.1
tag and commit has been pushed to master
on origin
.It can often be useful to publish a change and test it before doing a real live publish. For instance, it can be useful to publish something from a PR branch and test it with an actual install. Use lerna's canary option for this.
Check out pr branch
npx lerna publish --force-publish --canary --preid canary [patch|minor|major]
- Publishing with canary generates a unique new version number, publishes it to npm, then updates the canary
tag in npm to point to that new version.
In project you'll need to install all dependencies explicitly with the canary tag from npm:
npm install --save @elastic/react-search-ui@canary @elastic/search-ui-app-search-connector@canary @elastic/react-search-ui-views@canary search-ui-views@canary
To check your changes, simply push them to the canary
branch, then visit https://codesandbox.io/s/github/elastic/search-ui/tree/canary/examples/sandbox
When pushing release candidates, the following lerna commands can be useful:
# Create a pre-release version, like 1.0.0-rc.0
npx lerna version [premajor | preminor | prepatch | prerelease] --exact --force-publish --no-private --preid rc
# Publish 1.0.0-rc.0 and update the `next` to point to this version
npx lerna publish from-package --force-publish --dist-tag next
We have a number of demos available that you can use to do quick smoke testing of releases in various stacks:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。