blob: ee1fca021e9efe84964de4ece9c77e830f56dce7 [file] [log] [blame]
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" class="default">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<title>Apache Annotator (incubating)</title>
<meta property="og:title" content="Apache Annotator" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://annotator.apache.org/" />
<meta property="og:image:url" content="https://annotator.apache.org/images/annotator-logo.svg" />
<meta property="og:image:alt" content="Apache Annotator (incubating) logo" />
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/images/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<link rel="alternate" title="DOAP" href="doap.rdf" type="application/rdf+xml" />
<link rel="stylesheet" href="//semantic-ui.com/dist/semantic.min.css" />
</head>
<body>
<div class="ui borderless stackable top attached main menu">
<div class="ui container">
<a class="item" href="/" style="color: rgba(0,0,0,.87);">
<img class="ui small image" src="/images/annotator-logo.svg" alt="Apache Annotator (incubating)" />
</a>
<nav class="right menu">
<a class="item" href="/">Home</a>
<a class="item" href="/demo/"><span class="ui positive button">Demo!</span></a>
<a class="active item" href="/docs/">Documentation</a>
<a class="item" rel="external" href="https://github.com/apache/incubator-annotator">Code&nbsp;<i class="small external icon"></i></a>
<a class="item" rel="external" href="https://github.com/apache/incubator-annotator/issues">Issue tracker&nbsp;<i class="small external icon"></i></a>
</nav>
</div>
</div>
<div class="ui basic segment container">
<nav class="ui secondary stackable pointing menu" style="justify-content: center;">
<a href="/docs/" class="item">Overview</a>
<a href="/docs/getting-started/" class="item">Getting Started</a>
<a href="/docs/develop/" class="active item">Develop</a>
<a href="/docs/api/" class="item">API reference</a>
</nav>
<main class="ui basic segment container">
<h1 style="margin-bottom: 2rem">Develop Apache Annotator</h1>
<div class="ui mobile reversed stackable grid">
<div class="twelve wide column">
<h2 id="install-from-source">Install from source</h2>
<p>This project’s source code is available directly <a href="https://gitbox.apache.org/repos/asf?p=incubator-annotator.git">from the ASF</a> or <a href="https://github.com/apache/incubator-annotator">via GitHub</a>.</p>
<h3 id="requirements">Requirements</h3>
<p>If you’d like to code on the project, you will need the following:</p>
<ul>
<li><a href="https://git-scm.com/">git</a></li>
<li><a href="https://nodejs.org">node</a> version ^12.20 || ^14.15 || ^15.4</li>
<li><a href="https://www.yarnpkg.com/">yarn</a> version ^1.5</li>
</ul>
<h3 id="install">Install</h3>
<p>To retrieve the code using git:</p>
<pre><code>$ git clone https://gitbox.apache.org/repos/asf/incubator-annotator.git apache-annotator
</code></pre>
<p>Then install dependencies using yarn:</p>
<pre><code class="language-sh">$ cd apache-annotator
$ yarn install
</code></pre>
<h2 id="build">Build</h2>
<p>To compile (‘transpile’) the code:</p>
<pre><code class="language-sh">$ yarn build
</code></pre>
<p>For each module, the TypeScript source code is in <code>packages/…/src</code> and the Javascript is output in <code>packages/…/lib</code>.</p>
<p>To use your local build of the code in an application that depends on annotator, have a look at the <a href="https://yarnpkg.com/cli/link"><code>yarn link</code></a> or <a href="https://docs.npmjs.com/cli/v7/commands/npm-link"><code>npm link</code></a> command.</p>
<h2 id="play">Play</h2>
<p>To run a webserver running <a href="https://annotator.apache.org/demo/">the demo</a>:</p>
<pre><code>$ yarn start
</code></pre>
<p>Now open <code>http://localhost:8080/</code> (or whichever address the command prints) in your web browser to play with the demo. The server continuously rebuilds and hot-reloads to the source code after any edits, so you can directly try out any changes you make to the features it demonstrates.</p>
<h2 id="run-tests">Run tests</h2>
<p>This runs the tests for all packages and reports their code coverage:</p>
<pre><code class="language-sh">$ yarn test
</code></pre>
</div>
<aside class="ui four wide column">
<style>
.toc ol {
list-style-type: none;
padding-left: 1em;
}
.toc ol li {
margin: 0.25em 0;
}
</style>
<h1 class="ui small dividing header" style="margin: 0;">Contents</h1>
<nav class="toc">
<ol><li><a href="#install-from-source">Install from source</a><ol><li><a href="#requirements">Requirements</a></li><li><a href="#install">Install</a></li></ol></li><li><a href="#build">Build</a></li><li><a href="#play">Play</a></li><li><a href="#run-tests">Run tests</a></li></ol></nav>
</aside>
</div>
</main>
</div>
<footer class="ui bottom attached segment">
<div class="ui container">
<div class="ui equal height divided stackable grid">
<div class="four wide column">
<a class="ui left floated medium image" href="https://apache.org/" target="_blank">
<img src="https://incubator.apache.org/images/incubator_feather_egg_logo_sm.png" alt="logo of the Apache Incubator" />
</a>
<p>
<em>Copyright © 2016-2018 The Apache Software Foundation, Licensed under
the <a href="https://www.apache.org/licenses/LICENSE-2.0" rel="license external">Apache License, Version 2.0</a>.
|
<a rel="external" href="https://www.apache.org/foundation/policies/privacy">Privacy Policy</a>
</em>
</p>
</div>
<div class="nine wide column">
<p>
<em>Apache Annotator is an effort undergoing incubation at <a target="_blank" href="https://apache.org/">The Apache Software Foundation (ASF)</a> sponsored by the Apache Incubator PMC. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.</em></p>
<p><em>Apache®, the names of Apache projects, and the feather logo are either <a rel="external" href="https://www.apache.org/foundation/marks/list/">registered trademarks or trademarks</a> of the Apache Software Foundation in the United States and/or other countries.</em></p>
</div>
<div class="three wide column">
<h4 class="header">The <abbr title="Apache Software Foundation">ASF</abbr></h4>
<div class="ui link list">
<a class="item" rel="external" href="https://incubator.apache.org/">Apache Incubator</a>
<a class="item" rel="external" href="https://www.apache.org/">About the ASF</a>
<a class="item" rel="external" href="https://www.apache.org/events/current-event">Events</a>
<a class="item" rel="external" href="https://www.apache.org/foundation/thanks.html">Thanks</a>
<a class="item" rel="external" href="https://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a>
<a class="item" rel="external" href="https://www.apache.org/security/">Security</a>
<a class="item" rel="external" href="https://www.apache.org/licenses/">License</a>
</div>
</div>
</div>
</div>
</footer>
</body>
</html>