mirror of
https://github.com/ent/ent.git
synced 2026-03-05 19:35:23 +03:00
ent/doc: minor changes for doc websote and readme
Reviewed By: dlvhdr Differential Revision: D17163026 fbshipit-source-id: 62536da9a450ac80eb224252e12ae8dc835acb11
This commit is contained in:
committed by
Facebook Github Bot
parent
931d0c0565
commit
6913e80e43
26
README.md
26
README.md
@@ -1,5 +1,27 @@
|
||||
## Ent
|
||||
## ent - An Entity Framework For Go
|
||||
|
||||
<img width="50%"
|
||||
align="right"
|
||||
style="display: block; margin:40px auto;"
|
||||
src="https://s3.eu-central-1.amazonaws.com/entgo.io/assets/gopher_graph.png"/>
|
||||
|
||||
Simple, yet powerful ORM for modeling and querying data.
|
||||
|
||||
- **Schema As Code** - model any graph schema as Go objects.
|
||||
- **Easily Traverse Any Graph** - run queries, aggregations and traverse any graph structure easily.
|
||||
- **Statically Typed And Explicit API** - 100% statically typed and explicit API using code generation.
|
||||
- **Multi Storage Driver** - supports MySQL, SQLite and Gremlin.
|
||||
|
||||
## Installation
|
||||
```console
|
||||
go get github.com/facebookincubator/ent/entc/cmd/entc
|
||||
```
|
||||
|
||||
## Docs
|
||||
The documentation for developing and using ent is avaliable at: https://entgo.io
|
||||
|
||||
## Join the ent Community
|
||||
See the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out.
|
||||
|
||||
## License
|
||||
|
||||
ent is licensed under Apache 2.0 as found in the LICENSE file.
|
||||
|
||||
@@ -17,7 +17,7 @@ sidebar_label: Quick Introduction
|
||||
## Installation
|
||||
|
||||
```console
|
||||
$ go get github.com/facebookincubator/ent/entc/cmd/entc
|
||||
go get github.com/facebookincubator/ent/entc/cmd/entc
|
||||
```
|
||||
|
||||
After installing `entc` (the code generator for `ent`), you should have it in your `PATH`.
|
||||
@@ -27,7 +27,7 @@ After installing `entc` (the code generator for `ent`), you should have it in yo
|
||||
Go to the root directory of your project, and run:
|
||||
|
||||
```console
|
||||
$ entc init User
|
||||
entc init User
|
||||
```
|
||||
The command above will generate the schema for `User` under `<project>/ent/schema/` directory:
|
||||
|
||||
@@ -80,7 +80,7 @@ func (User) Fields() []ent.Field {
|
||||
Run `entc generate` from the root directory of the project:
|
||||
|
||||
```go
|
||||
$ entc generate ./ent/schema
|
||||
entc generate ./ent/schema
|
||||
```
|
||||
|
||||
This produces the following files:
|
||||
@@ -197,7 +197,7 @@ Let's create 2 additional entities named `Car` and `Group` with a few fields. We
|
||||
to generate the initial schemas:
|
||||
|
||||
```console
|
||||
$ entc init Car Group
|
||||
entc init Car Group
|
||||
```
|
||||
|
||||
And then we add the rest of the fields manually:
|
||||
@@ -440,7 +440,7 @@ relationship named `groups`. Let's define this relationship in our schemas:
|
||||
|
||||
We run `entc` on the schema directory to re-generate the assets.
|
||||
```cosole
|
||||
$ entc generate ./ent/schema
|
||||
entc generate ./ent/schema
|
||||
```
|
||||
|
||||
## Run Your First Graph Traversal
|
||||
|
||||
@@ -56,7 +56,7 @@ Entity schemas are usually stored inside `ent/schema` directory under
|
||||
the root directory of your project, and can be generated by `entc` as follows:
|
||||
|
||||
```console
|
||||
$ entc init User Group
|
||||
entc init User Group
|
||||
```
|
||||
|
||||
## It's Just Another ORM
|
||||
|
||||
@@ -59,7 +59,7 @@ class Footer extends React.Component {
|
||||
</span>
|
||||
<br/><br/>
|
||||
<span className="copyright">
|
||||
The homepage was designed by Moriah Rich.
|
||||
Design by Moriah Rich, illustration by Ariel Mashraki.
|
||||
</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -20,7 +20,9 @@ const arrow = '\u2192';
|
||||
const Block = props => (
|
||||
<div className="block">
|
||||
<div className="blockTitle">
|
||||
<div className="blockTitleText">{props.title}</div>{' '}
|
||||
<a href={props.link}>
|
||||
<div className="blockTitleText">{props.title}</div>{' '}
|
||||
</a>
|
||||
<a className="yellowArrow" href={props.link}>{arrow}</a>
|
||||
</div>
|
||||
<div className="blockContent">{props.content}</div>
|
||||
|
||||
@@ -583,6 +583,7 @@ ol {
|
||||
}
|
||||
.blockTitleText {
|
||||
display: inline;
|
||||
color: #ffe800;
|
||||
}
|
||||
|
||||
.nav-footer .sitemap {
|
||||
|
||||
@@ -33,7 +33,7 @@ window.addEventListener('load', function() {
|
||||
const clipboard = new ClipboardJS('.btnClipboard', {
|
||||
target: function(trigger) {
|
||||
return trigger.parentNode.querySelector('code');
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
clipboard.on('success', function(event) {
|
||||
|
||||
Reference in New Issue
Block a user