diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e1c003a64..000000000 --- a/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ - -[submodule "docs/themes/docsy"] - path = docs/themes/docsy - url = https://github.com/google/docsy.git diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index 0065c8c2f..000000000 --- a/docs/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ - -public/ -resources/ -node_modules/ -tech-doc-hugo - -.vscode/ \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index ad0a3746d..c25627b81 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,13 +1,33 @@ # Moor documentation -Contains the source code for the moor documentation, live at moor.simonbinder.eu -We use [Docsy](https://github.com/google/docsy), a Hugo theme for this website. You'll need the extended version of Hugo as described -[here](https://www.docsy.dev/docs/getting-started/). -To work on the documentation, first cd into this directory, then run `git submodule update --init --recursive` and -`npm install`. To update the dependencies, run `git pull --recurse-submodules`. +Welcome to the source of moor's documentation, live at moor.simonbinder.eu. +We use a static site generator based on `build_runner` to build the documentation. ## Running the website locally -After the setup, it's just a simple + +For a fast edit-refresh cycle, run + ``` -hugo server +dart run webdev serve --auto refresh pages:9999 web:8080 ``` + +You can ignore the `pages:9999` (or use any other port), it's just required +so that the build system actually generates pages. + +## Building the website + +To build the website, first run + +``` +dart run build_runner build --release +``` + +To then copy generated contents into a directory, use: + +``` +dart run build_runner build --release --output web:out +``` + +Where `out` is the desired output directory. +Note that both steps are necessary since the build system doesn't re-generate +pages otherwise. diff --git a/docs/build.yaml b/docs/build.yaml new file mode 100644 index 000000000..eea5bb36c --- /dev/null +++ b/docs/build.yaml @@ -0,0 +1,32 @@ +targets: + # Preprocess css first, so that we can read generated assets in the main target (for subresource integrity) + css: + auto_apply_builders: false + builders: + sass_builder: + enabled: true + sources: + - "web/main.scss" + - "web/main.css" + + $default: + dependencies: [":css"] + builders: + sass_builder: + enabled: false + build_web_compilers|entrypoint: + release_options: + # Turn of null assertions for release builds, it looks like this + # makes generated code slightly smaller. + native_null_assertions: false + dart2js_args: + - "-O4" + - "--csp" + sources: + - "lib/**" + - "pages/**" + - "templates/**" + - "web/**" + - "$package$" + - "pubspec.yaml" + - "website.yaml" diff --git a/docs/config.toml b/docs/config.toml deleted file mode 100644 index d1fecfd4b..000000000 --- a/docs/config.toml +++ /dev/null @@ -1,136 +0,0 @@ -baseURL = "https://moor.simonbinder.eu/" -title = "Moor" - -enableRobotsTXT = true - -# Hugo allows theme composition (and inheritance). The precedence is from left to right. -theme = ["docsy"] - -# Will give values to .Lastmod etc. -enableGitInfo = true - -# Language settings -contentDir = "content/en" -defaultContentLanguage = "en" -defaultContentLanguageInSubdir = false -# Useful when translating. -#enableMissingTranslationPlaceholders = true - -disableKinds = ["taxonomy", "taxonomyTerm"] - -# Highlighting config -pygmentsCodeFences = true -pygmentsUseClasses = false -# Use the new Chroma Go highlighter in Hugo. -pygmentsUseClassic = false -#pygmentsOptions = "linenos=table" -# See https://help.farbox.com/pygments.html -pygmentsStyle = "vs" - - # First one is picked as the Twitter card image if not set on page. - #images = ["images/project-illustration.png"] - -# Configure how URLs look like per section. -[permalinks] -blog = "/:section/:year/:month/:day/:slug/" - -## Configuration for BlackFriday markdown parser: https://github.com/russross/blackfriday -[blackfriday] -plainIDAnchors = true -hrefTargetBlank = false -angledQuotes = false -latexDashes = true - -[markup] -# todo migrate to goldmark (will need configuration for backwards-compatibility https://gohugo.io/getting-started/configuration-markup/) -defaultMarkdownHandler = "blackfriday" - -# Image processing configuration. -[imaging] -resampleFilter = "CatmullRom" -quality = 75 -anchor = "smart" - -[services] -[services.googleAnalytics] -# Comment out the next line to disable GA tracking. Also disables the feature described in [params.ui.feedback]. -#id = "UA-00000000-0" - -# Language configuration - -[languages] -[languages.en] -title = "Moor" -description = "A typesafe, reactive persistence library for Dart and Flutter apps" -languageName ="English" -# Weight used for sorting. -weight = 1 -#[languages.no] -#title = "Goldydocs" -#description = "Docsy er operativsystem for skyen" -#languageName ="Norsk" -#contentDir = "content/no" -#time_format_default = "02.01.2006" -#time_format_blog = "02.01.2006" - -# Additional menu items to GitHub and pub -[[menu.main]] - name = "Pub" - weight = 100 - url = "https://pub.dev/packages/moor" -[[menu.main]] - name = "GitHub" - weight = 110 - url = "https://github.com/simolus3/moor/" -[[menu.main]] - name = "API docs" - weight = 120 - url = "https://pub.dev/documentation/moor/latest/" - -# Everything below this are Site Params - -[params] -copyright = "Simon Binder" -#privacy_policy = "https://policies.google.com/privacy" - -# Menu title if your navbar has a versions selector to access old versions of your site. -# This menu appears only if you have at least one [params.versions] set. -version_menu = "Releases" - -# Repository configuration (URLs for in-page links to opening issues and suggesting changes) -github_repo = "https://github.com/simolus3/moor" - -# Specify a value here if your content directory is not in your repo's root directory -github_subdir = "docs" - -# Google Custom Search Engine ID. Remove or comment out to disable search. -gcs_engine_id = " 002567324444333206795:_yptu7lact8 " - -# User interface configuration -[params.ui] -# Enable to show the side bar menu in its compact state. -sidebar_menu_compact = false -# Set to true to disable breadcrumb navigation. -breadcrumb_disable = false -# Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled) -sidebar_search_disable = false -# Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top nav bar -navbar_logo = false - -[params.links] -# End user relevant links. These will show up on left side of footer and in the community page if you have one. -[[params.links.user]] - name = "Contact me via e-mail" - url = "mailto:oss@simonbinder.eu" - icon = "fa fa-envelope" -[[params.links.user]] - name = "Room in gitter" - url = "https://gitter.im/moor-dart/community" - icon = "fab fa-gitter" -[[params.links.user]] - name = "Project on GitHub" - url = "https://github.com/simolus3/moor" - icon = "fab fa-github" - desc = "Development takes place here!" - -# could also add another with params.links.developer. They appear on the right \ No newline at end of file diff --git a/docs/content/en/_index.html b/docs/content/en/_index.html deleted file mode 100644 index d1c09cdb7..000000000 --- a/docs/content/en/_index.html +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: "Moor - Reactive, typesafe persistence library for Dart" -description: Moor is a reactive and typesafe persistence library for Dart and Flutter apps. - It generates code to let you write complex queries easily. -linkTitle: "Moor" ---- - -{{< blocks/cover title="Moor: Persistence library for Dart" image_anchor="top" height="med" color="indigo" >}} -
- }}"> - Learn moor - - - Get from pub - - -

- With a fluent query api, a powerful sql analyzer, auto-updating streams and much moor, - moor makes persistence fun. Scroll down to learn about moor's key features, or visit the - }}">getting started guide for a step-by-step guide on using moor. -

-
-{{< /blocks/cover >}} - - -{{% blocks/lead color="dark" %}} -Moor is an easy to use, reactive persistence library for Flutter apps. Define tables in Dart or -SQL and enjoy a fluent query API, auto-updating streams and more! -{{% /blocks/lead %}} - -{{< blocks/section color="primary" >}} -{{% blocks/feature icon="fa-lightbulb" title="Declarative tables, fluent queries!" %}} -With moor, you can write your database tables in pure Dart without having to miss out on -advanced sqlite features. Moor will take care of creating the tables and generate code -that allows you run fluent queries on your data. - -[Get started now]({{< ref "/docs/Getting started/_index.md" >}}) -{{% /blocks/feature %}} - -{{% blocks/feature icon="fas fa-database" title="Prefer SQL? Moor got you covered!" %}} -Moor contains a powerful sql parser and analyzer, allowing it to create typesafe APIs for all your sql queries. All sql queries are -validated and analyzed during build-time, so moor can provide hints about potential errors quickly and generate efficient mapping -code. - -[Learn more]({{< ref "/docs/Using SQL/_index.md" >}}) -{{% /blocks/feature %}} - - -{{% blocks/feature icon="fas fa-star" title="And much more!" %}} -Moor provides auto-updating streams for all your queries, makes dealing with transactions and migrations easy -and lets your write modular database code with DAOs. We even have a [sql IDE](too) builtin to the project -When using moor, working with databases in Dart is fun! - -{{% /blocks/feature %}} -{{< /blocks/section >}} - -{{< blocks/section color="light" type="section" >}} - -

Key moor features

-Here are some of the many ways moor helps you write awesome database code: - - -{{< /blocks/section >}} diff --git a/docs/content/en/docs/Advanced Features/_index.md b/docs/content/en/docs/Advanced Features/_index.md deleted file mode 100644 index c877ec73d..000000000 --- a/docs/content/en/docs/Advanced Features/_index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Advanced features" -weight: 20 -description: Learn about some advanced features of moor ---- diff --git a/docs/content/en/docs/Other engines/_index.md b/docs/content/en/docs/Other engines/_index.md deleted file mode 100644 index 85d55b24c..000000000 --- a/docs/content/en/docs/Other engines/_index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Other engines" -weight: 100 -description: Use moor on the web or other platforms ---- diff --git a/docs/content/en/search.md b/docs/content/en/search.md deleted file mode 100644 index e3690fd5a..000000000 --- a/docs/content/en/search.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Search Results -layout: search - ---- - diff --git a/docs/content/en/v2/index.md b/docs/content/en/v2/index.md deleted file mode 100644 index c6526045d..000000000 --- a/docs/content/en/v2/index.md +++ /dev/null @@ -1,114 +0,0 @@ ---- -title: Version 2.0 -layout: home ---- - -{{< blocks/cover title="Moor 2.0: Supercharged SQL for Dart" image_anchor="top" height="min" color="indigo" >}} -
-

- Learn everything about Dart-SQL interop, the SQL IDE, experimental ffi support and all things new in moor -

- - }}"> - Get started - - }}"> - Migrate an existing project - -
-{{< /blocks/cover >}} - -{{% blocks/lead color="blue" %}} -## Generator overhaul - -The rewritten compiler is faster than ever, supports more SQL features and gives you -more flexibility when writing database code. - -[Check the updated documentation]({{< ref "../docs/Using SQL/moor_files.md" >}}) -{{% /blocks/lead %}} - -{{< blocks/section color="light" >}} -{{% blocks/feature icon="fas fa-database" title="Pure SQL API" %}} -The new `.moor` files have been updated and can now hold both `CREATE TABLE` statements -and queries you define. Moor will then generate typesafe Dart APIs based on your tables -and statements. - -[Get started with SQL and moor]({{< ref "../docs/Getting started/starting_with_sql.md" >}}) -{{% /blocks/feature %}} -{{% blocks/feature icon="fas fa-plus" title="Analyzer improvements" %}} -We now support more advanced features like compound select statements and window functions, -including detailed static analysis and lints. The updated type inference engine provides -better results on complex expressions. We also generate simpler methods for queries that only -return one column. -{{% /blocks/feature %}} -{{% blocks/feature icon="fas fa-code-branch" title="Dart-SQL interop" %}} -Declare tables in Dart, write your queries in SQL. Or do it the other way around. Or do it all in Dart. -Or all in SQL. Moor makes writing database code fun without taking control over your code. -For maximum flexibilty, moor lets you inline Dart expressions into SQL and use the best of both -worlds. -{{% /blocks/feature %}} - -{{< /blocks/section >}} - -{{% blocks/lead color="green" %}} -## Builtin SQL IDE - -Moor 2.0 expands the previous sql parser and analyzer, providing real-time feedback on your -SQL queries as you type. Moor plugs right into the Dart analysis server, so you don't have -to install any additional extensions. - -[Learn more about the IDE]({{< ref "../docs/Using SQL/sql_ide.md" >}}) -{{% /blocks/lead %}} - -{{< blocks/section color="dark" >}} -{{% blocks/feature icon="fa-lightbulb" title="Quickfixes" %}} -![](quickfix.png) - -Moor lets you write query code faster with helpful actions. -{{% /blocks/feature %}} -{{% blocks/feature icon="fas fa-exclamation-circle" title="Smart warnings" %}} -![](warning.png) - -Moor analyzes statements as you write them and reports errors right away. -This helps you identify problems fast, without having to open your app. -{{% /blocks/feature %}} -{{% blocks/feature icon="fas fa-info-circle" title="Structure view" %}} -![](outline.png) - -Moor provides an outline of your tables and queries for a better overview. -{{% /blocks/feature %}} - -{{< /blocks/section >}} - -{{% blocks/lead color="purple" %}} -## And much, much more - -Moor 2.0 contains a set of optimizations and makes common tasks simpler -{{% /blocks/lead %}} - -{{< blocks/section color="light" >}} -{{% blocks/feature icon="fa-lightbulb" title="New database helpers" %}} -New utils to load database from assets or to perform additional work before creating a database. -{{% /blocks/feature %}} -{{% blocks/feature icon="fas fa-exclamation" title="Removed deprecated features" %}} -We removed a whole bunch of deprecated apis that made it harder to develop new features. - -[Read the changelog for details](https://pub.dev/packages/moor#-changelog-tab-) -{{% /blocks/feature %}} -{{% blocks/feature icon="fas fa-bolt" title="Experimental `dart:ffi` bindings" %}} -The new [moor_ffi](https://pub.dev/packages/moor_ffi) package brings moor to the desktop and is up to 500x faster than the old -implementation. - -_Please not that the package is still in preview_ -{{% /blocks/feature %}} - -{{< /blocks/section >}} - -{{< blocks/section color="dark" type="section" >}} -## Try moor now - -- To get started with moor, follow our [getting started guide]({{< ref "../docs/Getting started/_index.md" >}}) here. -- To get started with SQL in moor, or to migrate an existing project to moor, follow our - [migration guide]({{< ref "../docs/Getting started/starting_with_sql.md" >}}) - -{{< /blocks/section >}} \ No newline at end of file diff --git a/docs/layouts/404.html b/docs/layouts/404.html deleted file mode 100644 index ed68ce7a6..000000000 --- a/docs/layouts/404.html +++ /dev/null @@ -1,8 +0,0 @@ -{{ define "main"}} -
-
-

Not found

-

Oops! This page doesn't exist. Try going back to our home page.

-
-
-{{ end }} diff --git a/docs/layouts/partials/head.html b/docs/layouts/partials/head.html deleted file mode 100644 index d2761fb56..000000000 --- a/docs/layouts/partials/head.html +++ /dev/null @@ -1,42 +0,0 @@ -{{/* This file is adapted from themes/docsy/partials/head.html, but we use - the regular title for the home page and write a meta description tag */}} - - - -{{ hugo.Generator }} -{{ if eq (getenv "HUGO_ENV") "production" }} - -{{ else }} - -{{ end }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} -{{ partialCached "favicons.html" . }} -{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }} - -{{ if .Description }} - -{{ else }} - -{{ end }} - -{{- template "_internal/opengraph.html" . -}} -{{- template "_internal/google_news.html" . -}} -{{- template "_internal/schema.html" . -}} -{{- template "_internal/twitter_cards.html" . -}} -{{ if eq (getenv "HUGO_ENV") "production" }} -{{ template "_internal/google_analytics_async.html" . }} -{{ end }} -{{ partialCached "head-css.html" . "asdf" }} - -{{ if .Site.Params.offlineSearch }} - -{{end}} -{{ partial "hooks/head-end.html" . }} diff --git a/docs/lib/_highlight.scss b/docs/lib/_highlight.scss new file mode 100644 index 000000000..76fb88659 --- /dev/null +++ b/docs/lib/_highlight.scss @@ -0,0 +1,93 @@ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #333; + background: #f8f8f8; +} + +.hljs-comment, +.hljs-quote { + color: #998; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-subst { + color: #333; + font-weight: bold; +} + +.hljs-number, +.hljs-literal, +.hljs-variable, +.hljs-template-variable, +.hljs-tag .hljs-attr { + color: #008081; +} + +.hljs-string, +.hljs-doctag { + color: #d14; +} + +.hljs-title, +.hljs-section, +.hljs-selector-id { + color: #900; + font-weight: bold; +} + +.hljs-subst { + font-weight: normal; +} + +.hljs-type, +.hljs-class .hljs-title { + color: #458; + font-weight: bold; +} + +.hljs-tag, +.hljs-name, +.hljs-attribute { + color: #000080; + font-weight: normal; +} + +.hljs-regexp, +.hljs-link { + color: #009926; +} + +.hljs-symbol, +.hljs-bullet { + color: #990073; +} + +.hljs-built_in, +.hljs-builtin-name { + color: #0086b3; +} + +.hljs-meta { + color: #999; + font-weight: bold; +} + +.hljs-deletion { + background: #fdd; +} + +.hljs-addition { + background: #dfd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/docs/assets/scss/_variables_project.scss b/docs/lib/_variables.scss similarity index 58% rename from docs/assets/scss/_variables_project.scss rename to docs/lib/_variables.scss index 2ec1ccb88..0ea7b86f3 100644 --- a/docs/assets/scss/_variables_project.scss +++ b/docs/lib/_variables.scss @@ -1,4 +1,3 @@ -// todo: figure out why none of these actually do anything at all $enable-gradients: false; $enable-rounded: false; $enable-shadows: false; @@ -6,4 +5,4 @@ $enable-shadows: false; $secondary: #4CAF50; $navbar-padding-x: 1rem; -$code-color: #dc3545; \ No newline at end of file +$code-color: #dc3545; diff --git a/docs/package-lock.json b/docs/package-lock.json deleted file mode 100644 index e85c0a1e9..000000000 --- a/docs/package-lock.json +++ /dev/null @@ -1,830 +0,0 @@ -{ - "name": "tech-doc-hugo", - "version": "0.0.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@nodelib/fs.scandir": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", - "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.3", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz", - "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==", - "dev": true - }, - "@nodelib/fs.walk": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz", - "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==", - "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.3", - "fastq": "^1.6.0" - } - }, - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", - "dev": true - }, - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "dev": true, - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true - }, - "autoprefixer": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.0.0.tgz", - "integrity": "sha512-rFlVYthz6Iw0LhEYryiGGyjTGofebWie3ydvtqTCJiwWe+z6y8H35b4cadYbOUcYlP495TNeVktW+ZZqxbPW4Q==", - "dev": true, - "requires": { - "browserslist": "^4.14.2", - "caniuse-lite": "^1.0.30001131", - "colorette": "^1.2.1", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss-value-parser": "^4.1.0" - } - }, - "binary-extensions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", - "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", - "dev": true - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "browserslist": { - "version": "4.14.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.4.tgz", - "integrity": "sha512-7FOuawafVdEwa5Jv4nzeik/PepAjVte6HmVGHsjt2bC237jeL9QlcTBDF3PnHEvcC6uHwLGYPwZHNZMB7wWAnw==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001135", - "electron-to-chromium": "^1.3.570", - "escalade": "^3.1.0", - "node-releases": "^1.1.61" - } - }, - "caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", - "dev": true, - "requires": { - "callsites": "^2.0.0" - } - }, - "caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", - "dev": true, - "requires": { - "caller-callsite": "^2.0.0" - } - }, - "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", - "dev": true - }, - "caniuse-lite": { - "version": "1.0.30001135", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001135.tgz", - "integrity": "sha512-ziNcheTGTHlu9g34EVoHQdIu5g4foc8EsxMGC7Xkokmvw0dqNtX8BS8RgCgFBaAiSp2IdjvBxNdh0ssib28eVQ==", - "dev": true - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "chokidar": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz", - "integrity": "sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A==", - "dev": true, - "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.1.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.4.0" - } - }, - "cliui": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.1.tgz", - "integrity": "sha512-rcvHOWyGyid6I1WjT/3NatKj2kDt9OdSHSXpyLXaMWFbKpGACNW8pRhhdPUq9MWUOdwn8Rz9AVETjF4105rZZQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "colorette": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz", - "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==", - "dev": true - }, - "cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", - "dev": true, - "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" - } - }, - "dependency-graph": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.9.0.tgz", - "integrity": "sha512-9YLIBURXj4DJMFALxXw9K3Y3rwb5Fk0X5/8ipCzaN84+gKxoHK43tVKRNakCQbiEx07E8Uwhuq21BpUagFhZ8w==", - "dev": true - }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, - "electron-to-chromium": { - "version": "1.3.571", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.571.tgz", - "integrity": "sha512-UYEQ2Gtc50kqmyOmOVtj6Oqi38lm5yRJY3pLuWt6UIot0No1L09uu6Ja6/1XKwmz/p0eJFZTUZi+khd1PV1hHA==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "escalade": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.0.tgz", - "integrity": "sha512-mAk+hPSO8fLDkhV7V0dXazH5pDc6MrjBTPyD3VeKzxnVFjH1MIxbCdqGZB9O8+EwWakZs3ZCbDS4IpRt79V1ig==", - "dev": true - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "fast-glob": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz", - "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.0", - "merge2": "^1.3.0", - "micromatch": "^4.0.2", - "picomatch": "^2.2.1" - } - }, - "fastq": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.8.0.tgz", - "integrity": "sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "fs-extra": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz", - "integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==", - "dev": true, - "requires": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^1.0.0" - } - }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "dev": true, - "optional": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-stdin": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", - "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", - "dev": true - }, - "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "globby": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz", - "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", - "slash": "^3.0.0" - } - }, - "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "dev": true - }, - "import-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz", - "integrity": "sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk=", - "dev": true, - "requires": { - "import-from": "^2.1.0" - } - }, - "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "dev": true, - "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - } - }, - "import-from": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-from/-/import-from-2.1.0.tgz", - "integrity": "sha1-M1238qev/VOqpHHUuAId7ja387E=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - }, - "js-yaml": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", - "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "jsonfile": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz", - "integrity": "sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^1.0.0" - } - }, - "line-column": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/line-column/-/line-column-1.0.2.tgz", - "integrity": "sha1-0lryk2tvSEkXKzEuR5LR2Ye8NKI=", - "dev": true, - "requires": { - "isarray": "^1.0.0", - "isobject": "^2.0.0" - } - }, - "lodash.difference": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", - "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=", - "dev": true - }, - "lodash.forown": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.forown/-/lodash.forown-4.4.0.tgz", - "integrity": "sha1-hRFc8E9z75ZuztUlEdOJPMRmg68=", - "dev": true - }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, - "lodash.groupby": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.groupby/-/lodash.groupby-4.6.0.tgz", - "integrity": "sha1-Cwih3PaDl8OXhVwyOXg4Mt90A9E=", - "dev": true - }, - "lodash.sortby": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", - "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", - "dev": true - }, - "log-symbols": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", - "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", - "dev": true, - "requires": { - "chalk": "^4.0.0" - } - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "micromatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", - "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", - "dev": true, - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.0.5" - } - }, - "nanoid": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.12.tgz", - "integrity": "sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A==", - "dev": true - }, - "node-releases": { - "version": "1.1.61", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.61.tgz", - "integrity": "sha512-DD5vebQLg8jLCOzwupn954fbIiZht05DAZs0k2u8NStSe6h9XdsuIQL8hSRKYiU8WUQRznmSDrKGbv3ObOmC7g==", - "dev": true - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", - "dev": true - }, - "num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, - "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "postcss": { - "version": "8.0.9", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.0.9.tgz", - "integrity": "sha512-9Ikq03Hvb/L6dgnOtNOUbcgg9Rsff5uKrI1TyNTQ2ALpa6psZk1Ar3/Hhxv2Q0rECRGDxtcMUTZIQglXozlrDQ==", - "dev": true, - "requires": { - "colorette": "^1.2.1", - "line-column": "^1.0.2", - "nanoid": "^3.1.12", - "source-map": "^0.6.1" - } - }, - "postcss-cli": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/postcss-cli/-/postcss-cli-8.0.0.tgz", - "integrity": "sha512-WgQIz1tc8htjob2DULE6dTssDzItuBh3UbscdrAlvid7M6X2WBZUrHCaLMtIuFkHFijAnimIq3nkpXV6FdDTSg==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "chokidar": "^3.3.0", - "dependency-graph": "^0.9.0", - "fs-extra": "^9.0.0", - "get-stdin": "^8.0.0", - "globby": "^11.0.0", - "postcss-load-config": "^2.1.1", - "postcss-reporter": "^7.0.0", - "pretty-hrtime": "^1.0.3", - "read-cache": "^1.0.0", - "yargs": "^16.0.0" - } - }, - "postcss-load-config": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.1.1.tgz", - "integrity": "sha512-D2ENobdoZsW0+BHy4x1CAkXtbXtYWYRIxL/JbtRBqrRGOPtJ2zoga/bEZWhV/ShWB5saVxJMzbMdSyA/vv4tXw==", - "dev": true, - "requires": { - "cosmiconfig": "^5.0.0", - "import-cwd": "^2.0.0" - } - }, - "postcss-reporter": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-7.0.0.tgz", - "integrity": "sha512-TQ7aIDKgd7FFekFMHLRoDfl0aY3XmIAAhE4Bduyh5GvFi6uYPSVORWY4jkeC7qidFw7YtXwF5ejYQfUHOC73rQ==", - "dev": true, - "requires": { - "colorette": "^1.2.1", - "lodash.difference": "^4.5.0", - "lodash.forown": "^4.4.0", - "lodash.get": "^4.4.2", - "lodash.groupby": "^4.6.0", - "lodash.sortby": "^4.7.0", - "log-symbols": "^4.0.0" - } - }, - "postcss-value-parser": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", - "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", - "dev": true - }, - "pretty-hrtime": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", - "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", - "dev": true - }, - "read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=", - "dev": true, - "requires": { - "pify": "^2.3.0" - } - }, - "readdirp": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", - "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true - }, - "run-parallel": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", - "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==", - "dev": true - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "universalify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", - "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==", - "dev": true - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.1.tgz", - "integrity": "sha512-/jJ831jEs4vGDbYPQp4yGKDYPSCCEQ45uZWJHE1AoYBzqdZi8+LDWas0z4HrmJXmKdpFsTiowSHXdxyFhpmdMg==", - "dev": true - }, - "yargs": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.0.3.tgz", - "integrity": "sha512-6+nLw8xa9uK1BOEOykaiYAJVh6/CjxWXK/q9b5FpRgNslt8s22F2xMBqVIKgCRjNgGvGPBy8Vog7WN7yh4amtA==", - "dev": true, - "requires": { - "cliui": "^7.0.0", - "escalade": "^3.0.2", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.1", - "yargs-parser": "^20.0.0" - } - }, - "yargs-parser": { - "version": "20.2.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.0.tgz", - "integrity": "sha512-2agPoRFPoIcFzOIp6656gcvsg2ohtscpw2OINr/q46+Sq41xz2OYLqx5HRHabmFU1OARIPAYH5uteICE7mn/5A==", - "dev": true - } - } -} diff --git a/docs/package.json b/docs/package.json deleted file mode 100644 index 58ea40ec3..000000000 --- a/docs/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "tech-doc-hugo", - "version": "0.0.1", - "description": "Hugo theme for technical documentation.", - "main": "none.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/bep/tech-doc-hugo.git" - }, - "author": "", - "license": "ISC", - "bugs": { - "url": "https://github.com/bep/tech-doc-hugo/issues" - }, - "homepage": "https://github.com/bep/tech-doc-hugo#readme", - "dependencies": {}, - "devDependencies": { - "autoprefixer": "^10.0.0", - "postcss": "^8.0.9", - "postcss-cli": "^8.0.0" - } -} diff --git a/docs/content/en/docs/Advanced Features/builder_options.md b/docs/pages/docs/Advanced Features/builder_options.md similarity index 94% rename from docs/content/en/docs/Advanced Features/builder_options.md rename to docs/pages/docs/Advanced Features/builder_options.md index 6e14f184e..9f8195dc4 100644 --- a/docs/content/en/docs/Advanced Features/builder_options.md +++ b/docs/pages/docs/Advanced Features/builder_options.md @@ -1,7 +1,9 @@ --- -title: "Builder options" -description: >- - Advanced options applied when writing the generated code +data: + title: "Builder options" + description: >- + Advanced options applied when writing the generated code +template: layouts/docs/single --- The `moor_generator` package has some options that control how the @@ -42,7 +44,7 @@ At the moment, moor supports these options: of inserted data and report detailed errors when the integrity is violated. If you're only using inserts with SQL, or don't need this functionality, enabling this flag can help to reduce the amount generated code. -* `use_data_class_name_for_companions`: By default, the name for [companion classes]({{< relref "../Getting started/writing_queries.md#updates-and-deletes" >}}) +* `use_data_class_name_for_companions`: By default, the name for [companion classes]({{ "../Getting started/writing_queries.md#updates-and-deletes" | pageUrl }}) is based on the table name (e.g. a `@DataClassName('Users') class UsersTable extends Table` would generate a `UsersTableCompanion`). With this option, the name is based on the data class (so `UsersCompanion` in this case). @@ -51,7 +53,7 @@ At the moment, moor supports these options: (so a column named `user_name` would also use `user_name` as a json key instead of `userName`). You can always override the json key by using a `JSON KEY` column constraint (e.g. `user_name VARCHAR NOT NULL JSON KEY userName`) -* `generate_connect_constructor`: Generate necessary code to support the [isolate runtime]({{< relref "isolates.md" >}}). +* `generate_connect_constructor`: Generate necessary code to support the [isolate runtime]({{ "isolates.md" | pageUrl }}). This is a build option because isolates are still experimental. This will be the default option eventually. * `sqlite_modules`: This list can be used to enable sqlite extensions, like those for json or full-text search. Modules have to be enabled explicitly because they're not supported on all platforms. See the following section for @@ -77,7 +79,7 @@ At the moment, moor supports these options: __Note__: This enables extensions in the analyzer for custom queries only. For instance, when the `json1` extension is enabled, the [`json`](https://www.sqlite.org/json1.html) functions can be used in moor files. This doesn't necessarily mean that those functions are supported at runtime! Both extensions are available on iOS 11 or later. On Android, they're -only available when using `moor_ffi`. See [our docs]({{< relref "extensions.md" >}}) for more details on them. +only available when using `moor_ffi`. ```yaml targets: @@ -97,7 +99,7 @@ We currently support the following extensions: - [fts5](https://www.sqlite.org/fts5.html): Support `CREATE VIRTUAL TABLE` statements for `fts5` tables and the `MATCH` operator. Functions like `highlight` or `bm25` are available as well. - `moor_ffi`: Enables support for functions that are only available when using `moor_ffi`. This contains `pow`, `sqrt` and a variety - of trigonometric functions. Details on those functions are available [here]({{< relref "../Other engines/vm.md#moor-only-functions" >}}). + of trigonometric functions. Details on those functions are available [here]({{ "../Other engines/vm.md#moor-only-functions" }}). ## Recommended options @@ -127,9 +129,9 @@ and minor code changes. Put this content in a file called `build.yaml` next to y ```yaml targets: $default: + # disable the default generators, we'll only use the non-shared moor generator here + auto_apply_builders: false builders: - # disable the default generators, we'll only use the non-shared moor generator here - auto_apply_builders: false moor_generator|moor_generator_not_shared: enabled: true # If needed, you can configure the builder like this: diff --git a/docs/content/en/docs/Advanced Features/daos.md b/docs/pages/docs/Advanced Features/daos.md similarity index 91% rename from docs/content/en/docs/Advanced Features/daos.md rename to docs/pages/docs/Advanced Features/daos.md index 50b7affa3..26c893fe6 100644 --- a/docs/content/en/docs/Advanced Features/daos.md +++ b/docs/pages/docs/Advanced Features/daos.md @@ -1,8 +1,10 @@ --- -title: "DAOs" -description: Keep your database code modular with DAOs +data: + title: "DAOs" + description: Keep your database code modular with DAOs aliases: - /daos/ +template: layouts/docs/single --- When you have a lot of queries, putting them all into one class might become diff --git a/docs/content/en/docs/Advanced Features/expressions.md b/docs/pages/docs/Advanced Features/expressions.md similarity index 93% rename from docs/content/en/docs/Advanced Features/expressions.md rename to docs/pages/docs/Advanced Features/expressions.md index 2b1cc6c6e..104c6156c 100644 --- a/docs/content/en/docs/Advanced Features/expressions.md +++ b/docs/pages/docs/Advanced Features/expressions.md @@ -1,11 +1,12 @@ --- -title: "Expressions" -linkTitle: "Expressions in Dart" -description: Deep-dive into what kind of SQL expressions can be written in Dart -weight: 200 +data: + title: Expressions + description: Deep-dive into what kind of SQL expressions can be written in Dart + weight: 200 # used to be in the "getting started" section -url: docs/getting-started/expressions/ +path: docs/Getting started/expressions/ +template: layouts/docs/single --- Expressions are pieces of sql that return a value when the database interprets them. @@ -112,7 +113,7 @@ from the Dart api. Unlike regular functions, aggregate functions operate on mult once. By default, they combine all rows that would be returned by the select statement into a single value. You can also make them run over different groups in the result by using -[group by]({{< relref "joins.md#group-by" >}}). +[group by]({{ "joins.md#group-by" | pageUrl }}). ### Comparing @@ -136,12 +137,12 @@ Stream averageItemLength() { __Note__: We're using `selectOnly` instead of `select` because we're not interested in any colum that `todos` provides - we only care about the average length. More details are available -[here]({{< relref "joins.md#group-by" >}}) +[here]({{ "joins.md#group-by" | pageUrl }}) ### Counting Sometimes, it's useful to count how many rows are present in a group. By using the -[table layout from the example]({{}}), this +[table layout from the example]({{ "../Getting started/index.md" | pageUrl }}), this query will report how many todo entries are associated to each category: ```dart @@ -166,7 +167,7 @@ To count all rows (instead of a single value), you can use the top-level `countA function. More information on how to write aggregate queries with moor's Dart api is available -[here]({{< relref "joins.md#group-by" >}}) +[here]({{ "joins.md#group-by" | pageUrl }}) ### group_concat @@ -188,7 +189,7 @@ with the `separator` argument on `groupConcat`. When using a `VmDatabase`, a basic set of trigonometric functions will be available. It also defines the `REGEXP` function, which allows you to use `a REGEXP b` in sql queries. -For more information, see the [list of functions]({{< relref "../Other engines/vm.md#moor-only-functions" >}}) here. +For more information, see the [list of functions]({{ "../Other engines/vm.md#moor-only-functions" | pageUrl }}) here. ## Subqueries @@ -246,4 +247,4 @@ select(users)..where((u) => inactive); _Note_: It's easy to write invalid queries by using `CustomExpressions` too much. If you feel like you need to use them because a feature you use is not available in moor, consider creating an issue to let us know. If you just prefer sql, you could also take a look at -[compiled sql]({{< ref "../Using SQL/custom_queries.md" >}}) which is typesafe to use. \ No newline at end of file +[compiled sql]({{ "../Using SQL/custom_queries.md" | pageUrl }}) which is typesafe to use. \ No newline at end of file diff --git a/docs/pages/docs/Advanced Features/index.md b/docs/pages/docs/Advanced Features/index.md new file mode 100644 index 000000000..1270f5c92 --- /dev/null +++ b/docs/pages/docs/Advanced Features/index.md @@ -0,0 +1,7 @@ +--- +data: + title: Advanced Features + weight: 20 + description: Learn about some advanced features of moor +template: layouts/docs/list +--- diff --git a/docs/content/en/docs/Advanced Features/isolates.md b/docs/pages/docs/Advanced Features/isolates.md similarity index 96% rename from docs/content/en/docs/Advanced Features/isolates.md rename to docs/pages/docs/Advanced Features/isolates.md index f60a750f3..0bad18960 100644 --- a/docs/content/en/docs/Advanced Features/isolates.md +++ b/docs/pages/docs/Advanced Features/isolates.md @@ -1,17 +1,19 @@ --- -title: "Isolates" -description: Seamlessly run moor on a background isolate and unblock the main thread +data: + title: Isolates + description: Using moor databases on a background isolate +template: layouts/docs/single --- -{{% alert title="New feature" color="primary" %}} +{% block "blocks/alert" title="New feature" color="primary" %} The api for background isolates only works with moor version 2.1.0 or newer. Due to -platform limitations, using [moor_ffi]({{< relref "../Other engines/vm.md" >}}) is required when +platform limitations, using [moor_ffi]({{ "../Other engines/vm.md" | pageUrl }}) is required when using a background isolate. Using `moor_flutter` is not supported. -{{% /alert %}} +{% endblock %} ## Preparations -To use the isolate api, first enable the appropriate [build option]({{< relref "builder_options.md" >}}) by +To use the isolate api, first enable the appropriate [build option]({{ "builder_options.md" | pageUrl }}) by creating a file called `build.yaml` in your project root, next to your `pubspec.yaml`. It should have the following content: ```yaml diff --git a/docs/content/en/docs/Advanced Features/joins.md b/docs/pages/docs/Advanced Features/joins.md similarity index 95% rename from docs/content/en/docs/Advanced Features/joins.md rename to docs/pages/docs/Advanced Features/joins.md index e3de93948..7c1bae571 100644 --- a/docs/content/en/docs/Advanced Features/joins.md +++ b/docs/pages/docs/Advanced Features/joins.md @@ -1,10 +1,11 @@ --- -title: "Advanced queries in Dart" -weight: 1 -description: Use sql joins or custom expressions from the Dart api -url: /docs/advanced-features/joins +data: + title: "Advanced queries in Dart" + weight: 1 + description: Use sql joins or custom expressions from the Dart api aliases: - - /queries/joins + - queries/joins/ +template: layouts/docs/single --- ## Joins @@ -12,7 +13,7 @@ aliases: Moor supports sql joins to write queries that operate on more than one table. To use that feature, start a select regular select statement with `select(table)` and then add a list of joins using `.join()`. For inner and left outer joins, a `ON` expression needs to be specified. Here's an example using the tables -defined in the [example]({{< relref "../Getting started/_index.md" >}}). +defined in the [example]({{ "../Getting started/index.md" | pageUrl }}). ```dart // we define a data class to contain both a todo entry and the associated category @@ -161,7 +162,7 @@ comes from multiple rows. Common questions include What these queries have in common is that data from multiple rows needs to be combined into a single row. In sql, this can be achieved with "aggregate functions", for which moor has -[builtin support]({{< relref "expressions.md#aggregate" >}}). +[builtin support]({{ "expressions.md#aggregate" | pageUrl }}). _Additional info_: A good tutorial for group by in sql is available [here](https://www.sqlitetutorial.net/sqlite-group-by/). diff --git a/docs/content/en/docs/Advanced Features/migrations.md b/docs/pages/docs/Advanced Features/migrations.md similarity index 97% rename from docs/content/en/docs/Advanced Features/migrations.md rename to docs/pages/docs/Advanced Features/migrations.md index 0d4e71125..3760ce2dc 100644 --- a/docs/content/en/docs/Advanced Features/migrations.md +++ b/docs/pages/docs/Advanced Features/migrations.md @@ -1,9 +1,11 @@ --- -title: "Migrations" -weight: 10 -description: Define what happens when your database gets created or updated +data: + title: "Migrations" + weight: 10 + description: Define what happens when your database gets created or updated aliases: - /migrations +template: layouts/docs/single --- Moor provides a migration API that can be used to gradually apply schema changes after bumping @@ -226,7 +228,7 @@ By using those test databases, moor can help you test migrations from and to any To use this feature, moor needs to know all schemas of your database. A schema is the set of all tables, triggers and indices that you use in your database. -You can use the [CLI tools]({{< relref "../CLI.md" >}}) to export a json representation of your schema. +You can use the [CLI tools]({{ "../CLI.md" | pageUrl }}) to export a json representation of your schema. In this guide, we'll assume a file layout like the following, where `my_app` is the root folder of your project: ``` @@ -327,7 +329,7 @@ In general, a test looks like this: - Use `verifier.startAt()` to obtain a [connection](https://pub.dev/documentation/moor/latest/moor/DatabaseConnection-class.html) to a database with an initial schema. This database contains all your tables, indices and triggers from that version, created by using `Migrator.createAll`. -- Create your application database (you can enable the [`generate_connect_constructor`]({{< relref "builder_options.md" >}}) to use +- Create your application database (you can enable the [`generate_connect_constructor`]({{ "builder_options.md" | pageUrl }}) to use a `DatabaseConnection` directly) - Call `verifier.migrateAndValidate(db, version)`. This will initiate a migration towards the target version (here, `2`). Unlike the database created by `startAt`, this uses the migration logic you wrote for your database. @@ -335,11 +337,11 @@ In general, a test looks like this: `migrateAndValidate` will extract all `CREATE` statement from the `sqlite_schema` table and semantically compare them. If it sees anything unexpected, it will throw a `SchemaMismatch` exception to fail your test. -{{% alert title="Writing testable migrations" %}} +{% block "blocks/alert" title="Writing testable migrations" %} To test migrations _towards_ an old schema version (e.g. from `v1` to `v2` if your current version is `v3`), you're `onUpgrade` handler must be capable of upgrading to a version older than the current `schemaVersion`. For this, check the `to` parameter of the `onUpgrade` callback to run a different migration if necessary. -{{% /alert %}} +{% endblock %} #### Verifying data integrity diff --git a/docs/content/en/docs/Advanced Features/type_converters.md b/docs/pages/docs/Advanced Features/type_converters.md similarity index 92% rename from docs/content/en/docs/Advanced Features/type_converters.md rename to docs/pages/docs/Advanced Features/type_converters.md index 07b6d5abb..aef64db48 100644 --- a/docs/content/en/docs/Advanced Features/type_converters.md +++ b/docs/pages/docs/Advanced Features/type_converters.md @@ -1,8 +1,10 @@ --- -title: "Type converters" -description: Store more complex data in columns with type converters +data: + title: "Type converters" + description: Store more complex data in columns with type converters aliases: - /type_converters +template: layouts/docs/single --- Moor supports a variety of types out of the box, but sometimes you need to store more complex data. @@ -74,12 +76,12 @@ class Users extends Table { The generated `User` class will then have a `preferences` column of type `Preferences`. Moor will automatically take care of storing and loading the object in `select`, `update` and `insert` statements. This feature -also works with [compiled custom queries]({{ "/queries/custom" | absolute_url }}). +also works with [compiled custom queries]({{ "/queries/custom" | absURL }}). -{{% alert title="Caution with equality" color="warning" %}} +{% block "blocks/alert" title="Caution with equality" color="warning" %} > If your converter returns an object that is not comparable by value, the generated dataclass will not be comparable by value. -{{% /alert %}} +{% endblock %} ### Implicit enum converters @@ -101,7 +103,7 @@ class Tasks extends Table { } ``` -{{% alert title="Caution with enums" color="warning" %}} +{% block "blocks/alert" title="Caution with enums" color="warning" %} > It can be easy to accidentally invalidate your database by introducing another enum value. For instance, let's say we inserted a `Task` into the database in the above example and set its `Status` to `running` (index = 1). @@ -119,7 +121,7 @@ class Tasks extends Table { For this reason, it's best to add new values at the end of the enumeration, where they can't conflict with existing values. Otherwise you'd need to bump your schema version and run a custom update statement to fix this. -{{% /alert %}} +{% endblock %} Also note that you can't apply another type converter on a column declared with an enum converter. @@ -140,7 +142,7 @@ CREATE TABLE users ( ); ``` -When using type converters in moor files, we recommend the [`apply_converters_on_variables`]({{< relref "builder_options.md" >}}) +When using type converters in moor files, we recommend the [`apply_converters_on_variables`]({{ "builder_options.md" | pageUrl }}) build option. This will also apply the converter from Dart to SQL, for instance if used on variables: `SELECT * FROM users WHERE preferences = ?`. With that option, the variable will be inferred to `Preferences` instead of `String`. diff --git a/docs/content/en/docs/CLI.md b/docs/pages/docs/CLI.md similarity index 87% rename from docs/content/en/docs/CLI.md rename to docs/pages/docs/CLI.md index 6513b5602..760941a29 100644 --- a/docs/content/en/docs/CLI.md +++ b/docs/pages/docs/CLI.md @@ -1,12 +1,14 @@ --- -title: "Command line tools for moor" -description: A set of CLI tools to interact with moor files +data: + title: "Command line tools for moor" + description: A set of CLI tools to interact with moor files url: /cli/ +template: layouts/docs/single --- -{{% alert title="Experimental" %}} +{% block "blocks/alert" title="Experimental" %} The moor cli tool is experimental at the moment. Please report all issues you can find. -{{% /alert %}} +{% endblock %} ## Usage @@ -69,4 +71,4 @@ The generated file (`schema.json` in this case) contains information about all - dependecies thereof Exporting a schema can be used to generate test code for your schema migrations. For details, -see [the guide]({{< relref "Advanced Features/migrations.md#verifying-migrations" >}}). \ No newline at end of file +see [the guide]({{ "Advanced Features/migrations.md#verifying-migrations" | pageUrl }}). \ No newline at end of file diff --git a/docs/content/en/docs/Examples/existing_databases.md b/docs/pages/docs/Examples/existing_databases.md similarity index 93% rename from docs/content/en/docs/Examples/existing_databases.md rename to docs/pages/docs/Examples/existing_databases.md index 205cf2514..2a0940009 100644 --- a/docs/content/en/docs/Examples/existing_databases.md +++ b/docs/pages/docs/Examples/existing_databases.md @@ -1,6 +1,8 @@ --- -title: "Existing databases" -description: Using moor with an existing database +data: + title: "Existing databases" + description: Using moor with an existing database +template: layouts/docs/single --- You can use moor with a pre-propulated database that you ship with your app. diff --git a/docs/content/en/docs/Examples/_index.md b/docs/pages/docs/Examples/index.md similarity index 85% rename from docs/content/en/docs/Examples/_index.md rename to docs/pages/docs/Examples/index.md index 1e100c5a5..1f3842e78 100644 --- a/docs/content/en/docs/Examples/_index.md +++ b/docs/pages/docs/Examples/index.md @@ -1,8 +1,9 @@ --- -title: "Examples" -linkTitle: "Examples" -weight: 3 -description: Example apps using moor +data: + title: "Examples" + weight: 3 + description: Example apps using moor +template: layouts/docs/list --- diff --git a/docs/content/en/docs/Examples/relationships.md b/docs/pages/docs/Examples/relationships.md similarity index 96% rename from docs/content/en/docs/Examples/relationships.md rename to docs/pages/docs/Examples/relationships.md index 022033804..096427600 100644 --- a/docs/content/en/docs/Examples/relationships.md +++ b/docs/pages/docs/Examples/relationships.md @@ -1,6 +1,8 @@ --- -title: "Many to many relationships" -description: An example that models a shopping cart system with moor. +data: + title: "Many to many relationships" + description: An example that models a shopping cart system with moor. +template: layouts/docs/single --- ## Defining the model @@ -16,6 +18,7 @@ class BuyableItems extends Table { } ``` + We're going to define two tables for shopping carts: One for the cart itself, and another one to store the entries in the cart: ```dart @@ -115,7 +118,7 @@ Stream watchCart(int id) { }); // now, we can merge the two queries together in one stream - return Observable.combineLatest2(cartStream, contentStream, + return Rx.combineLatest2(cartStream, contentStream, (ShoppingCart cart, List items) { return CartWithItems(cart, items); }); diff --git a/docs/content/en/docs/Getting started/advanced_dart_tables.md b/docs/pages/docs/Getting started/advanced_dart_tables.md similarity index 94% rename from docs/content/en/docs/Getting started/advanced_dart_tables.md rename to docs/pages/docs/Getting started/advanced_dart_tables.md index e5309a4a7..0f708bb63 100644 --- a/docs/content/en/docs/Getting started/advanced_dart_tables.md +++ b/docs/pages/docs/Getting started/advanced_dart_tables.md @@ -1,15 +1,17 @@ --- -title: "Dart tables" -description: Further information on Dart tables -weight: 150 +data: + title: "Dart tables" + description: Further information on Dart tables + weight: 150 +template: layouts/docs/single --- -{{% pageinfo %}} +{% block "blocks/pageinfo" %} __Prefer sql?__ If you prefer, you can also declare tables via `CREATE TABLE` statements. -Moor's sql analyzer will generate matching Dart code. [Details]({{< ref "starting_with_sql.md" >}}). -{{% /pageinfo %}} +Moor's sql analyzer will generate matching Dart code. [Details]({{ "starting_with_sql.md" | pageUrl }}). +{% endblock %} -As shown in the [getting started guide]({{}}), sql tables can be written in Dart: +As shown in the [getting started guide]({{ "index.md" | pageUrl }}), sql tables can be written in Dart: ```dart class Todos extends Table { IntColumn get id => integer().autoIncrement()(); @@ -129,7 +131,7 @@ Note that the primary key must essentially be constant so that the generator can ## Supported column types Moor supports a variety of column types out of the box. You can store custom classes in columns by using -[type converters]({{}}). +[type converters]({{ "../Advanced Features/type_converters.md" | pageUrl }}). | Dart type | Column | Corresponding SQLite type | |--------------|---------------|-----------------------------------------------------| diff --git a/docs/content/en/docs/Getting started/_index.md b/docs/pages/docs/Getting started/index.md similarity index 93% rename from docs/content/en/docs/Getting started/_index.md rename to docs/pages/docs/Getting started/index.md index 6abc4389a..eaec3cbac 100644 --- a/docs/content/en/docs/Getting started/_index.md +++ b/docs/pages/docs/Getting started/index.md @@ -1,11 +1,11 @@ --- -title: "Getting Started" -linkTitle: "Getting Started" -weight: 2 -description: Simple guide to get a moor project up and running - +data: + title: Getting started + description: Simple guide to get a moor project up and running + weight: 1 +template: layouts/docs/list aliases: - - /getting-started/ # Used to have this url + - /Getting started/ # Used to have this url --- _Note:_ If you prefer a tutorial video, Reso Coder has made a detailed video explaining @@ -36,7 +36,7 @@ If you're wondering why so many packages are necessary, here's a quick overview - `moor_generator`: Generates query code based on your tables - `build_runner`: Common tool for code-generation, maintained by the Dart team -{{% changed_to_ffi %}} +{% include "partials/changed_to_ffi" %} ### Declaring tables Using moor, you can model the structure of your tables with simple dart code: @@ -118,5 +118,5 @@ class MyDatabase extends _$MyDatabase { ``` Congratulations! You're now ready to use all of moor. See the articles below for further reading. -The ["Writing queries"]({{< relref "writing_queries.md" >}}) article contains everything you need +The ["Writing queries"]({{ "writing_queries.md" | pageUrl }}) article contains everything you need to know to write selects, updates and inserts in moor! diff --git a/docs/content/en/docs/Getting started/starting_with_sql.md b/docs/pages/docs/Getting started/starting_with_sql.md similarity index 86% rename from docs/content/en/docs/Getting started/starting_with_sql.md rename to docs/pages/docs/Getting started/starting_with_sql.md index e0e67ef31..2cb12c855 100644 --- a/docs/content/en/docs/Getting started/starting_with_sql.md +++ b/docs/pages/docs/Getting started/starting_with_sql.md @@ -1,10 +1,12 @@ --- -title: "Getting started with sql" -weight: 5 -description: Learn how to get started with the SQL version of moor, or how to migrate an existing project to moor. +data: + title: "Getting started with sql" + weight: 5 + description: Learn how to get started with the SQL version of moor, or how to migrate an existing project to moor. +template: layouts/docs/single --- -The regular [getting started guide]({{< relref "_index.md" >}}) explains how to get started with moor by +The regular [getting started guide]({{ "index.md" | pageUrl }}) explains how to get started with moor by declaring both tables and queries in Dart. This version will focus on how to use moor with SQL instead. ## Adding the dependency @@ -32,7 +34,7 @@ If you're wondering why so many packages are necessary, here's a quick overview - `moor_generator`: Generates Dart apis for the sql queries and tables you wrote - `build_runner`: Common tool for code-generation, maintained by the Dart team -{{% changed_to_ffi %}} +{% include "partials/changed_to_ffi" %} ## Declaring tables and queries @@ -72,14 +74,14 @@ countEntries: SELECT null, (SELECT COUNT(*) FROM todos WHERE category IS NULL) ``` -{{% alert title="On that AS Category" %}} +{% block "blocks/alert" title="On that AS Category" %} Moor will generate Dart classes for your tables, and the name of those classes is based on the table name. By default, moor just strips away the trailing `s` from your table. That works for most cases, but in some (like the `categories` table above), it doesn't. We'd like to have a `Category` class (and not `Categorie`) generated, so we tell moor to generate a different name with the `AS ` declaration at the end. -{{% /alert %}} +{% endblock %} ## Generating matching code @@ -135,7 +137,7 @@ Let's take a look at what moor generated during the build: - Generated data classes (`Todo` and `Category`) - these hold a single row from the respective table. - Companion versions of these classes. Those are only relevant when - using the Dart apis of moor, you can [learn more here]({{< relref "writing_queries.md#inserts" >}}). + using the Dart apis of moor, you can [learn more here]({{ "writing_queries.md#inserts" | pageUrl }}). - A `CountEntriesResult` class, it holds the result rows when running the `countEntries` query. - A `_$AppDb` superclass. It takes care of creating the tables when @@ -159,10 +161,10 @@ a `.moor` file - moor will generate matching code for them as well. Now that you know how to use moor together with sql, here are some further guides to help you learn more: -- The [SQL IDE]({{< relref "../Using SQL/sql_ide.md" >}}) that provides feedback on sql queries right in your editor. -- [Transactions]({{< relref "../transactions.md" >}}) -- [Schema migrations]({{< relref "../Advanced Features/migrations.md" >}}) -- Writing [queries]({{< relref "writing_queries.md" >}}) and - [expressions]({{< relref "expressions.md" >}}) in Dart -- A more [in-depth guide]({{< relref "../Using SQL/moor_files.md" >}}) +- The [SQL IDE]({{ "../Using SQL/sql_ide.md" | pageUrl }}) that provides feedback on sql queries right in your editor. +- [Transactions]({{ "../transactions.md" | pageUrl }}) +- [Schema migrations]({{ "../Advanced Features/migrations.md" | pageUrl }}) +- Writing [queries]({{ "writing_queries.md" | pageUrl }}) and + [expressions]({{ "../Advanced Features/expressions.md" | pageUrl }}) in Dart +- A more [in-depth guide]({{ "../Using SQL/moor_files.md" | pageUrl }}) on `moor` files, which explains `import` statements and the Dart-SQL interop. \ No newline at end of file diff --git a/docs/content/en/docs/Getting started/writing_queries.md b/docs/pages/docs/Getting started/writing_queries.md similarity index 92% rename from docs/content/en/docs/Getting started/writing_queries.md rename to docs/pages/docs/Getting started/writing_queries.md index 9fea44c63..6bd154fb1 100644 --- a/docs/content/en/docs/Getting started/writing_queries.md +++ b/docs/pages/docs/Getting started/writing_queries.md @@ -1,15 +1,17 @@ --- -title: "Writing queries" -linkTitle: "Writing queries" -description: Learn how to write database queries in pure Dart with moor +data: + title: "Writing queries" + linkTitle: "Writing queries" + description: Learn how to write database queries in pure Dart with moor + weight: 100 aliases: - /queries/ -weight: 100 +template: layouts/docs/single --- -{{% pageinfo %}} -__Note__: This assumes that you already completed [the setup]({{< ref "_index.md" >}}). -{{% /pageinfo %}} +{% block "blocks/pageinfo" %} +__Note__: This assumes that you've already completed [the setup]({{ "index.md" | pageUrl }}). +{% endblock %} For each table you've specified in the `@UseMoor` annotation on your database class, a corresponding getter for a table will be generated. That getter can be used to @@ -43,7 +45,7 @@ You can apply filters to a query by calling `where()`. The where method takes a should map the given table to an `Expression` of boolean. A common way to create such expression is by using `equals` on expressions. Integer columns can also be compared with `isBiggerThan` and `isSmallerThan`. You can compose expressions using `a & b, a | b` and `a.not()`. For more -details on expressions, see [this guide]({{< relref "expressions.md" >}}). +details on expressions, see [this guide]({{ "../Advanced Features/expressions.md" | pageUrl }}). ### Limit You can limit the amount of results returned by calling `limit` on queries. The method accepts @@ -58,7 +60,7 @@ Future> limitTodos(int limit, {int offset}) { ### Ordering You can use the `orderBy` method on the select statement. It expects a list of functions that extract the individual ordering terms from the table. You can use any expression as an ordering term - for more details, see -[this guide]({{< relref "expressions.md" >}}). +[this guide]({{ "../Advanced Features/expressions.md" | pageUrl }}). ```dart Future> sortEntriesAlphabetically() { @@ -97,7 +99,7 @@ Stream> contentWithLongTitles() { ``` -If you need more complex queries with joins or custom columns, see [this site]({{< relref "../Advanced Features/joins.md" >}}). +If you need more complex queries with joins or custom columns, see [this site]({{ "../Advanced Features/joins.md" | pageUrl }}). ## Updates and deletes You can use the generated classes to update individual fields of any row: @@ -132,7 +134,7 @@ Future feelingLazy() { __⚠️ Caution:__ If you don't explicitly add a `where` clause on updates or deletes, the statement will affect all rows in the table! -{{% alert title="Entries, companions - why do we need all of this?" %}} +{% block "blocks/alert" title="Entries, companions - why do we need all of this?" %} You might have noticed that we used a `TodosCompanion` for the first update instead of just passing a `Todo`. Moor generates the `Todo` class (also called _data class_ for the table) to hold a __full__ row with all its data. For _partial_ data, @@ -145,7 +147,7 @@ Fields in the companions have a special `Value.absent()` state which makes this Companions also have a special constructor for inserts - all columns which don't have a default value and aren't nullable are marked `@required` on that constructor. This makes companions easier to use for inserts because you know which fields to set. -{{% /alert %}} +{% endblock %} ## Inserts You can very easily insert any valid object into tables. As some values can be absent @@ -246,14 +248,14 @@ Future trackWord(String word) { } ``` -{{% alert title="Unique constraints and conflict targets" %}} +{% block "blocks/alert" title="Unique constraints and conflict targets" %} > Both `insertOnConflictUpdate` and `onConflict: DoUpdate` use an `DO UPDATE` upsert in sql. This requires us to provide a so-called "conflict target", a set of columns to check for uniqueness violations. By default, moor will use the table's primary key as conflict target. That works in most cases, but if you have custom `UNIQUE` constraints on some columns, you'll need to use the `target` parameter on `DoUpdate` in Dart to include those columns. -{{% /alert %}} +{% endblock %} Note that this requires a fairly recent sqlite3 version (3.24.0) that might not be available on older Android devices when using `moor_flutter`. `moor_ffi` diff --git a/docs/content/en/docs/Internals/_index.md b/docs/pages/docs/Internals/index.md similarity index 82% rename from docs/content/en/docs/Internals/_index.md rename to docs/pages/docs/Internals/index.md index 0c723576d..c0741503c 100644 --- a/docs/content/en/docs/Internals/_index.md +++ b/docs/pages/docs/Internals/index.md @@ -1,7 +1,9 @@ --- -title: "Moor internals" -weight: 300000 -description: Work in progress documentation on moor internals +data: + title: "Moor internals" + weight: 300000 + description: Work in progress documentation on moor internals +template: layouts/docs/list --- ## Using an unreleased moor version @@ -34,4 +36,4 @@ dependency_overrides: ``` If you're using `moor_flutter`, just exchange `moor_ffi` with `moor_flutter` in the package name -and path. To use the bleeding edge of moor, change `ref: beta` to `ref: develop` for all packages. \ No newline at end of file +and path. To use the bleeding edge of moor, change `ref: beta` to `ref: develop` for all packages. diff --git a/docs/content/en/docs/Other engines/encryption.md b/docs/pages/docs/Other engines/encryption.md similarity index 95% rename from docs/content/en/docs/Other engines/encryption.md rename to docs/pages/docs/Other engines/encryption.md index e7b0213e3..dac1f7186 100644 --- a/docs/content/en/docs/Other engines/encryption.md +++ b/docs/pages/docs/Other engines/encryption.md @@ -1,6 +1,8 @@ --- -title: Encryption -description: Use moor on encrypted databases +data: + title: Encryption + description: Use moor on encrypted databases +template: layouts/docs/single --- There are two ways to use moor on encrypted databases. diff --git a/docs/pages/docs/Other engines/index.md b/docs/pages/docs/Other engines/index.md new file mode 100644 index 000000000..b13764879 --- /dev/null +++ b/docs/pages/docs/Other engines/index.md @@ -0,0 +1,7 @@ +--- +data: + title: "Other engines" + description: "Use moor on the web or other platforms" + weight: 100 +template: layouts/docs/list +--- diff --git a/docs/content/en/docs/Other engines/vm.md b/docs/pages/docs/Other engines/vm.md similarity index 95% rename from docs/content/en/docs/Other engines/vm.md rename to docs/pages/docs/Other engines/vm.md index 28cc56eb2..3e52036c9 100644 --- a/docs/content/en/docs/Other engines/vm.md +++ b/docs/pages/docs/Other engines/vm.md @@ -1,6 +1,7 @@ --- -title: moor ffi (Desktop support) -description: Run moor on both mobile and desktop +data: + title: moor ffi (Desktop support) + description: Run moor on both mobile and desktop --- ## Supported platforms @@ -108,7 +109,7 @@ moor. Important options are marked in bold. - __SQLITE_DQS=0__: This will make sqlite not accept double-quoted strings (and instead parse them as identifiers). This matches the behavior of moor and compiled queries - __SQLITE_THREADSAFE=0__: Since the majority of Flutter apps only use one isolate, thread safety is turned off. Note that you - can still use the [isolate api]({{}}) for background operations. As long as all + can still use the [isolate api]({{"../Advanced Features/isolates.md" | pageUrl}}) for background operations. As long as all database accesses happen from the same thread, there's no problem. - SQLITE_DEFAULT_MEMSTATUS=0: The `sqlite3_status()` interfaces are not exposed by moor_ffi, so there's no point of having them. - SQLITE_MAX_EXPR_DEPTH=0: Disables maximum depth when sqlite parses expressions, which can make the parser faster. @@ -137,7 +138,7 @@ For more details on sqlite compile options, see [their documentation](https://ww Note that `NaN`, `-infinity` or `+infinity` are represented as `NULL` in sql. -When enabling the `moor_ffi` module in your [build options]({{< relref "../Advanced Features/builder_options.md#available-extensions" >}}), +When enabling the `moor_ffi` module in your [build options]({{ "../Advanced Features/builder_options.md#available-extensions" | pageUrl }}), the generator will allow you to use those functions in moor files or compiled queries. To use those methods from Dart, you need to import `package:moor/extensions/moor_ffi.dart`. diff --git a/docs/content/en/docs/Other engines/web.md b/docs/pages/docs/Other engines/web.md similarity index 95% rename from docs/content/en/docs/Other engines/web.md rename to docs/pages/docs/Other engines/web.md index 43b4866a0..2aa3ecca5 100644 --- a/docs/content/en/docs/Other engines/web.md +++ b/docs/pages/docs/Other engines/web.md @@ -1,7 +1,9 @@ --- -title: Web support -url: /web -description: Experimental support for moor and webapps. +data: + title: Web + description: Experimental support for moor and webapps. +template: layouts/docs/single +path: web/ --- Starting from moor `1.6`, you can experimentally use moor in Dart webapps. Moor web supports @@ -9,7 +11,7 @@ Flutter Web, AngularDart, plain `dart:html` or any other web framework. ## Getting started Instead of depending on `moor_flutter` in your pubspec, you need to depend on on `moor` directly. Apart from that, you can -follow the [getting started guide]({{ site.common_links.getting_started | absolute_url }}). +follow the [getting started guide]({{ '../Getting started/index.md' | pageUrl }}). Also, instead of using a `FlutterQueryExecutor` in your database classes, you can use a `WebDatabase` executor: ```dart import 'package:moor/moor_web.dart'; @@ -151,7 +153,7 @@ DatabaseConnection connectToWorker() { You can pass that `DatabaseConnection` to your database by enabling the `generate_connect_constructor` build option. For more information on the `DatabaseConnection` class, see the documentation on -[isolates]({{< relref "../Advanced Features/isolates.md" >}}). +[isolates]({{ "../Advanced Features/isolates.md" | pageUrl }}). A small, but working example is available under [extras/web_worker_example](https://github.com/simolus3/moor/tree/develop/extras/web_worker_example) in the moor repository. \ No newline at end of file diff --git a/docs/content/en/docs/Using SQL/custom_queries.md b/docs/pages/docs/Using SQL/custom_queries.md similarity index 89% rename from docs/content/en/docs/Using SQL/custom_queries.md rename to docs/pages/docs/Using SQL/custom_queries.md index affda6a41..ee4017753 100644 --- a/docs/content/en/docs/Using SQL/custom_queries.md +++ b/docs/pages/docs/Using SQL/custom_queries.md @@ -1,17 +1,19 @@ --- -title: "Custom queries" -weight: 10 -description: Let moor generate Dart from your SQL statements +data: + title: "Custom queries" + weight: 10 + description: Let moor generate Dart from your SQL statements aliases: - /queries/custom +template: layouts/docs/single --- -{{% alert title="Moor files!" color="warning" %}} +{% block "blocks/alert" title="Moor files!" color="warning" %} With moor 2.0, we moved the new `.moor` files out of preview and added some powerful features to them. They are easier to use than the approaches described here. While these features will continue to be supported, moor files will get better tooling support in the future and we recommend to -migrate. See [their api]({{%relref "moor_files.md"%}}) for details. -{{% /alert %}} +migrate. See [their api]({{ "moor_files.md" | pageUrl }}) for details. +{% endblock %} Although moor includes a fluent api that can be used to model most statements, advanced features like `WITH` clauses or subqueries aren't supported yet. You can @@ -46,17 +48,17 @@ Queries can have parameters in them by using the `?` or `:name` syntax. When you moor will figure out an appropriate type for them and include them in the generated methods. For instance, `'categoryById': 'SELECT * FROM categories WHERE id = :id'` will generate the method `categoryById(int id)`. -{{% alert title="On table names" color="info" %}} +{% block "blocks/alert" title="On table names" color="info" %} To use this feature, it's helpful to know how Dart tables are named in sql. For tables that don't override `tableName`, the name in sql will be the `snake_case` of the class name. So a Dart table called `Categories` will be named `categories`, a table called `UserAddressInformation` would be called `user_address_information`. The same rule applies to column getters without an explicit name. -Tables and columns declared in [Moor files]({{< relref "moor_files.md" >}}) will always have the +Tables and columns declared in [Moor files]({{ "moor_files.md" | pageUrl }}) will always have the name you specified. -{{% /alert %}} +{% endblock %} You can also use `UPDATE` or `DELETE` statements here. Of course, this feature is also available for -[daos]({{< relref "../Advanced Features/daos.md" >}}), +[daos]({{ "../Advanced Features/daos.md" | pageUrl }}), and it perfectly integrates with auto-updating streams by analyzing what tables you're reading from or writing to. @@ -65,7 +67,7 @@ If you don't want to use the statements with an generated api, you can still send custom queries by calling `customSelect` for a one-time query or `customSelectStream` for a query stream that automatically emits a new set of items when the underlying data changes. Using the todo example introduced in the -[getting started guide]({{< ref "/docs/Getting started/_index.md" >}}), we can +[getting started guide]({{ "../Getting started/index.md" | pageUrl }}), we can write this query which will load the amount of todo entries in each category: ```dart class CategoryWithCount { diff --git a/docs/content/en/docs/Using SQL/extensions.md b/docs/pages/docs/Using SQL/extensions.md similarity index 87% rename from docs/content/en/docs/Using SQL/extensions.md rename to docs/pages/docs/Using SQL/extensions.md index 21029a5c4..ab4a62958 100644 --- a/docs/content/en/docs/Using SQL/extensions.md +++ b/docs/pages/docs/Using SQL/extensions.md @@ -1,7 +1,9 @@ --- -title: "Supported sqlite extensions" -weight: 10 -description: Information on json1 and fts5 support in the generator +data: + title: "Supported sqlite extensions" + weight: 10 + description: Information on json1 and fts5 support in the generator +template: layouts/docs/single --- _Note_: Since `moor_flutter` uses the sqlite version shipped on the device, these extensions might not @@ -11,7 +13,7 @@ This enables the extensions listed here on all Android devices and on iOS 11 and ## json1 To enable the json1 extension in moor files and compiled queries, modify your -[build options]({{}}) to include +[build options]({{ "../Advanced Features/builder_options.md" | pageUrl }}) to include `json1` in the `sqlite_module` section. The sqlite extension doesn't require any special tables and works on all text columns. In moor @@ -50,7 +52,7 @@ You can learn more about the json1 extension on [sqlite.org](https://www.sqlite. The fts5 extension provides full-text search capabilities in sqlite tables. To enable the fts5 extension in moor files and compiled queries, modify the -[build options]({{}}) to include +[build options]({{ "../Advanced Features/builder_options.md" | pageUrl }}) to include `fts5` in the `sqlite_module` section. Just like you'd expect when using sqlite, you can create a fts5 table in a moor file diff --git a/docs/content/en/docs/Using SQL/_index.md b/docs/pages/docs/Using SQL/index.md similarity index 75% rename from docs/content/en/docs/Using SQL/_index.md rename to docs/pages/docs/Using SQL/index.md index 931cd4693..74f594422 100644 --- a/docs/content/en/docs/Using SQL/_index.md +++ b/docs/pages/docs/Using SQL/index.md @@ -1,7 +1,9 @@ --- -title: "Using SQL" -weight: 30 -description: Write typesafe sql with moor +data: + title: "Using SQL" + weight: 30 + description: Write typesafe sql with moor +template: layouts/docs/list --- Moor let's you express a variety of queries in pure Dart. However, you don't have to miss out diff --git a/docs/content/en/docs/Using SQL/moor_files.md b/docs/pages/docs/Using SQL/moor_files.md similarity index 95% rename from docs/content/en/docs/Using SQL/moor_files.md rename to docs/pages/docs/Using SQL/moor_files.md index a3c764c97..81cfbc9a3 100644 --- a/docs/content/en/docs/Using SQL/moor_files.md +++ b/docs/pages/docs/Using SQL/moor_files.md @@ -1,10 +1,12 @@ --- -title: "Moor files" -weight: 1 -description: Learn everything about the new `.moor` files which can contain tables and queries +data: + title: "Moor files" + weight: 1 + description: Learn everything about the new `.moor` files which can contain tables and queries aliases: - /docs/using-sql/custom_tables/ # Redirect from outdated "custom tables" page which has been deleted +template: layouts/docs/single --- Moor files are a new feature that lets you write all your database code in SQL - moor will generate typesafe APIs for them. @@ -244,7 +246,7 @@ Stream> watchInCategory(int category) { This lets you write a single SQL query and dynamically apply a predicate at runtime! This feature works for -- [expressions]({{< relref "../Advanced Features/expressions.md" >}}), as you've seen in the example above +- [expressions]({{ "../Advanced Features/expressions.md" | pageUrl }}), as you've seen in the example above - single ordering terms: `SELECT * FROM todos ORDER BY $term, id ASC` will generate a method taking an `OrderingTerm`. - whole order-by clauses: `SELECT * FROM todos ORDER BY $order` @@ -259,7 +261,7 @@ _filterTodos ($predicate = TRUE): SELECT * FROM todos WHERE $predicate; This will make the `predicate` parameter optional in Dart. It will use the default SQL value (here, `TRUE`) when not explicitly set. -{{% alert title="Using column names in Dart" color="warning" %}} +{% block "blocks/alert" title="Using column names in Dart" color="warning" %} If your query uses table aliases, you'll need to account for that when embedding Dart expressions in your SQL query. Consider this for instance: @@ -279,11 +281,11 @@ Future> routesByStart(int startPointId) { return findRoutes(start.id.equals(startPointId)); } ``` -{{% /alert %}} +{% endblock %} ### Type converters -You can import and use [type converters]({{< relref "../Advanced Features/type_converters.md" >}}) +You can import and use [type converters]({{ "../Advanced Features/type_converters.md" | pageUrl }}) written in Dart in a moor file. Importing a Dart file works with a regular `import` statement. To apply a type converter on a column definition, you can use the `MAPPED BY` column constraints: ```sql @@ -295,9 +297,9 @@ CREATE TABLE users ( ``` More details on type converts in moor files are available -[here]({{< relref "../Advanced Features/type_converters.md#using-converters-in-moor" >}}). +[here]({{ "../Advanced Features/type_converters.md#using-converters-in-moor" | pageUrl }}). -When using type converters, we recommend the [`apply_converters_on_variables`]({{< relref "../Advanced Features/builder_options.md" >}}) +When using type converters, we recommend the [`apply_converters_on_variables`]({{ "../Advanced Features/builder_options.md" | pageUrl }}) build option. This will also apply the converter from Dart to SQL, for instance if used on variables: `SELECT * FROM users WHERE preferences = ?`. With that option, the variable will be inferred to `Preferences` instead of `String`. diff --git a/docs/content/en/docs/Using SQL/sql_ide.md b/docs/pages/docs/Using SQL/sql_ide.md similarity index 94% rename from docs/content/en/docs/Using SQL/sql_ide.md rename to docs/pages/docs/Using SQL/sql_ide.md index bb4b98211..274e65d14 100644 --- a/docs/content/en/docs/Using SQL/sql_ide.md +++ b/docs/pages/docs/Using SQL/sql_ide.md @@ -1,7 +1,9 @@ --- -title: "Experimental IDE" -weight: 5 -description: Get real-time feedback as you type sql +data: + title: "Experimental IDE" + weight: 5 + description: Get real-time feedback as you type sql +template: layouts/docs/single --- Moor ships with an experimental analyzer plugin that provides real-time feedback on errors, diff --git a/docs/content/en/docs/community_tools.md b/docs/pages/docs/community_tools.md similarity index 84% rename from docs/content/en/docs/community_tools.md rename to docs/pages/docs/community_tools.md index 0131073ce..15697987b 100644 --- a/docs/content/en/docs/community_tools.md +++ b/docs/pages/docs/community_tools.md @@ -1,13 +1,15 @@ --- -title: "Community" -description: Packages contributed by the community +data: + title: "Community" + description: Packages contributed by the community +template: layouts/docs/single --- -{{% pageinfo %}} +{% block "blocks/pageinfo" %} Do you have a moor-related package you want to share? Awesome, please let me know! Contact me on [Gitter](https://gitter.im/simolus3), [Twitter](https://twitter.com/dersimolus) or via email to oss <at>simonbinder<dot>eu. -{{% /pageinfo %}} +{% endblock %} ## Moor inspector diff --git a/docs/content/en/docs/faq.md b/docs/pages/docs/faq.md similarity index 92% rename from docs/content/en/docs/faq.md rename to docs/pages/docs/faq.md index bfa195b2a..41d1fb7fb 100644 --- a/docs/content/en/docs/faq.md +++ b/docs/pages/docs/faq.md @@ -1,11 +1,13 @@ --- -title: "Frequently asked questions" +data: + title: "Frequently asked questions" -url: /faq/ +path: faq/ +template: layouts/docs/single --- ## Using the database -If you've created a `MyDatabase` class by following the [getting started guide]({{}}), you +If you've created a `MyDatabase` class by following the [getting started guide]({{ "Getting started/index.md" | pageUrl }}), you still need to somehow obtain an instance of it. It's recommended to only have one (singleton) instance of your database, so you could store that instance in a global variable: @@ -43,7 +45,7 @@ in your favorite dependency injection framework for flutter hence solves this pr ## Why am I getting no such table errors? -If you add another table after your app has already been installed, you need to write a [migration]({{< relref "Advanced Features/migrations.md" >}}) +If you add another table after your app has already been installed, you need to write a [migration]({{ "Advanced Features/migrations.md" | pageUrl }}) that covers creating that table. If you're in the process of developing your app and want to use un- and reinstall your app instead of writing migrations, that's fine too. Please note that your apps data might be backed up on Android, so manually deleting your app's data instead of a reinstall is necessary on some devices. @@ -97,7 +99,7 @@ result of your queries. ## floor Floor also has a lot of convenience features like auto-updating queries and schema migrations. Similar to moor, you define the structure of your database in Dart. Then, you have write queries in sql - the mapping code if generated -by floor. Moor has a [similar feature]({{< relref "Using SQL/custom_queries.md" >}}), but it can also verify that your queries are valid at compile time. Moor +by floor. Moor has a [similar feature]({{ "Using SQL/custom_queries.md" | pageUrl }}), but it can also verify that your queries are valid at compile time. Moor additionally has an api that let's you write some queries in Dart instead of sql. A difference between these two is that Floor let's you write your own classes and generates mapping code around that. diff --git a/docs/content/en/docs/_index.md b/docs/pages/docs/index.md old mode 100755 new mode 100644 similarity index 90% rename from docs/content/en/docs/_index.md rename to docs/pages/docs/index.md index 4db7575ed..b85cd397d --- a/docs/content/en/docs/_index.md +++ b/docs/pages/docs/index.md @@ -1,14 +1,12 @@ --- -title: "Welcome to Moor" -linkTitle: "Documentation & Guides" -weight: 20 -menu: - main: - weight: 20 -description: Welcome to the moor documentation. This site shows you what moor can do and how to use it. +data: + title: "Documentation & Guides" + description: Welcome to moor's documentation. This site shows you what moor can do and how to use it. +template: layouts/docs/list --- -## So what's moor? +## Welcome to moor + Moor is a reactive persistence library for Dart and Flutter applications. It's built on top of database libraries like [sqflite](https://pub.dev/packages/sqflite) or [sql.js](https://github.com/sql-js/sql.js/) and provides additional features, like: diff --git a/docs/content/en/docs/platforms.md b/docs/pages/docs/platforms.md similarity index 93% rename from docs/content/en/docs/platforms.md rename to docs/pages/docs/platforms.md index 2292716e1..dd3090324 100644 --- a/docs/content/en/docs/platforms.md +++ b/docs/pages/docs/platforms.md @@ -1,6 +1,8 @@ --- -title: "Supported platforms" -description: All platforms supported by moor, and how to use them +data: + title: "Supported platforms" + description: All platforms supported by moor, and how to use them +template: layouts/docs/single --- Being built ontop of the sqlite3 database, moor can run on almost every Dart platform. @@ -30,12 +32,12 @@ is still maintained and suppported. ### using `moor/ffi` The new `package:moor/ffi.dart` implementation uses `dart:ffi` to bind to sqlite3 on Android and iOS. -This is the recommended approach for newer projects as described in the [getting started]({{}}) guide. +This is the recommended approach for newer projects as described in the [getting started]({{ "Getting started/index.md" | pageUrl }}) guide. To ensure that your app ships with the latest sqlite3 version, also add a dependency to the `sqlite3_flutter_libs` package when using `package:moor/ffi.dart`! -{{% alert title="A note on ffi and Android" %}} +{% block "blocks/alert" title="A note on ffi and Android" %} > `package:moor/ffi.dart` is the recommended moor implementation for new Android apps. However, there are some smaller issues on some devices that you should be aware of: @@ -49,11 +51,11 @@ package when using `package:moor/ffi.dart`! - Out of memory errors for very complex queries: Since the regular tmp directory isn't available on Android, you need to inform sqlite3 about the right directory to store temporary data. See [this comment](https://github.com/simolus3/moor/issues/876#issuecomment-710013503) for an example on how to do that. -{{% /alert %}} +{% endblock %} ## Web -_Main article: [Web]({{}})_ +_Main article: [Web]({{ "Other engines/web.md" | pageUrl }})_ For apps that run on the web, you can use moor's experimental web implementation, located in `package:moor/moor_web.dart`. diff --git a/docs/content/en/docs/testing.md b/docs/pages/docs/testing.md similarity index 90% rename from docs/content/en/docs/testing.md rename to docs/pages/docs/testing.md index bc96799c2..433688133 100644 --- a/docs/content/en/docs/testing.md +++ b/docs/pages/docs/testing.md @@ -1,10 +1,13 @@ --- -title: "Testing" -description: Guide on writing unit tests for moor databases +data: + title: "Testing" + description: Guide on writing unit tests for moor databases + +template: layouts/docs/single --- Flutter apps using moor can always be tested with [integration tests](https://flutter.dev/docs/cookbook/testing/integration/introduction) -running on a real device. This guide focusses on writing unit tests for a database written in moor. +running on a real device. This guide focuses on writing unit tests for a database written in moor. Those tests can be run and debugged on your computer without additional setup, you don't need a physical device to run them. @@ -49,7 +52,7 @@ class MyDatabase extends _$MyDatabase { } ``` -{{% alert title="Installing sqlite" %}} +{% block "blocks/alert" title="Installing sqlite" %} We can't distribute an sqlite installation as a pub package (at least not as something that works outside of a Flutter build), so you need to ensure that you have the sqlite3 shared library installed on your @@ -64,7 +67,7 @@ On Windows, you can [download 'Precompiled Binaries for Windows'](https://www.sq and extract `sqlite3.dll` into a folder that's in your `PATH` environment variable. Then restart your device to ensure that all apps will run with this `PATH` change. -{{% /alert %}} +{% endblock %} ## Writing tests @@ -115,4 +118,4 @@ test('stream emits a new user when the name updates', () async { ## Testing migrations Moor can help you generate code for schema migrations. For more details, see -[this guide]({{< relref "Advanced Features/migrations.md#verifying-migrations" >}}). +[this guide]({{ "Advanced Features/migrations.md#verifying-migrations" | pageUrl }}). diff --git a/docs/content/en/docs/transactions.md b/docs/pages/docs/transactions.md similarity index 93% rename from docs/content/en/docs/transactions.md rename to docs/pages/docs/transactions.md index 38ac1df01..be48abf36 100644 --- a/docs/content/en/docs/transactions.md +++ b/docs/pages/docs/transactions.md @@ -1,8 +1,10 @@ --- -title: "Transactions" -weight: 70 -description: Run multiple queries atomically +data: + title: "Transactions" + weight: 70 + description: Run multiple queries atomically +template: layouts/docs/single aliases: - /transactions/ --- @@ -14,6 +16,7 @@ To begin a transaction, call the `transaction` method on your database or a DAO. It takes a function as an argument that will be run transactionally. In the following example, which deals with deleting a category, we move all todo entries in that category back to the default category: + ```dart Future deleteCategory(Category category) { return transaction(() async { @@ -56,4 +59,4 @@ This behavior is useful if you're collapsing streams inside a transaction, for i calling `first` or `fold`. However, we recommend that streams created _inside_ a transaction are not listened to _outside_ of a transaction. While it's possible, it defeats the isolation principle -of transactions as its state is exposed through the stream. \ No newline at end of file +of transactions as its state is exposed through the stream. diff --git a/docs/pages/index.html b/docs/pages/index.html new file mode 100644 index 000000000..a29395c58 --- /dev/null +++ b/docs/pages/index.html @@ -0,0 +1,82 @@ +--- +page: + title: "Moor - Reactive, typesafe persistence library for Dart" +template: layouts/home.html +path: "" +--- + +{% block "blocks/cover.html" title="Moor: Persistence library for Dart" image_anchor="top" height="med" color="indigo" %} +
+ + Learn moor + + + Get fom pub + + +

+ With a fluent query api, a powerful sql analyzer, auto-updating streams and much more, + moor makes persistence fun. Scroll down to learn about moor's key features, or visit the + getting started guide for a step-by-step guide on using moor. +

+
+{% endblock %} + +{% block "blocks/lead.html" color="dark" %} +Moor is an easy to use, reactive persistence library for Flutter apps. Define tables in Dart or +SQL and enjoy a fluent query API, auto-updating streams and more! +{% endblock %} + +{% block "blocks/section.html" color="primary" %} + +{% block "blocks/feature.html" icon="fas fa-lightbulb" title="Declarative tables, fluent queries" %} +{% block "blocks/markdown.html" %} +With moor, you can write your database tables in pure Dart without having to miss out on +advanced sqlite features. Moor will take care of creating the tables and generate code +that allows you run fluent queries on your data. + +[Get started now]({{ "docs/Getting started/index.md" | pageUrl }}) +{% endblock %} +{% endblock %} + +{% block "blocks/feature.html" icon="fas fa-database" title="Prefer SQL? Moor got you covered!" %} +{% block "blocks/markdown.html" %} +Moor contains a powerful sql parser and analyzer, allowing it to create typesafe APIs for all your sql queries. All sql queries are +validated and analyzed during build-time, so moor can provide hints about potential errors quickly and generate efficient mapping +code. + +[Learn more]({{ 'docs/Using SQL/index.md' | pageUrl }}) +{% endblock %} +{% endblock %} + +{% block "blocks/feature.html" icon="fas fa-star" title="And much more!" %} +{% block "blocks/markdown.html" %} +Or should I say, much moor? Moor provides auto-updating straems for all your queries, makes dealing with transactions and migrations easy +and lets your write modular database code with DAOs. We even have a [sql IDE]({{ 'docs/Using SQL/sql_ide.md' | pageUrl }}) builtin to the project +When using moor, working with databases in Dart is fun! +{% endblock %} +{% endblock %} + +{% endblock %} + +{% block "blocks/section.html" color="light" type="section" %} +{% block "blocks/markdown.html" %} +## Key moor features + +Here are some of the many ways moor helps you write awesome database code: + + * __Auto-updating streams__: With moor, any query - no matter how complex - can be turned into a stream that emits new data as the underlying data changes. + * __Polyglot__: Moor lets you write queries in a fluent Dart api or directly in SQL - you can even embed Dart expressions in SQL. + * __Boilerplate-free__: Stop writing mapping code yourself - moor can take of that. Moor generates Dart code around your data so you can focus + on building great apps. + * __Flexible__: Want to write queries in SQL? Moor verifies them at compile time and generates Dart apis for them. Prefer to write them in Dart? + Moor will generate efficient SQL for Dart queries too. + * __Easy to learn__: Instead of having to learn yet another ORM, moor lets you write queries in SQL and generates typesafe wrappers. Queries and tables + can also be written in Dart that looks similar to SQL without loosing type-safety. + * __Fast _and_ powerful__: With the new `ffi` backend, moor can outperform key-value stores without putting any compromises on the integrity + and flexibility that relational databases provide. Moor is the only major persistence library with builtin support for multiple isolates. + * __Well tested and production ready__: Each component of moor is verified by a wide range of unit and integration tests. Moor powers many Flutter apps + in production. + * __Cross-Platform__: Moor works on iOS, Android, Linux, macOS, Windows and on the web. It doesn't even require Flutter. See [supported platforms]({{ "docs/platforms.md" | pageUrl }}). +{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/docs/pages/v2.html b/docs/pages/v2.html new file mode 100644 index 000000000..971529fe9 --- /dev/null +++ b/docs/pages/v2.html @@ -0,0 +1,116 @@ +--- +template: layouts/home.html +path: v2 +--- + +{% block "blocks/cover" title="Moor 2.0: Supercharged SQL for Dart" image_anchor="top" height="min" color="indigo" %} +
+

+ Learn everything about Dart-SQL interop, the SQL IDE, experimental ffi support and all things new in moor +

+ + + Get started + + + Migrate an existing project + +
+{% endblock %} + +{% block "blocks/lead" color="blue" %} +{% block "blocks/markdown" %} +## Generator overhaul + +The rewritten compiler is faster than ever, supports more SQL features and gives you +more flexibility when writing database code. + +[Check the updated documentation]({{ "docs/Using SQL/moor_files.md" | pageUrl }}) +{% endblock %} +{% endblock %} + +{% block "blocks/section" color="light" %} +{% block "blocks/feature" icon="fas fa-database" title="Pure SQL API" %} {% block "blocks/markdown" %} +The new `.moor` files have been updated and can now hold both `CREATE TABLE` statements +and queries you define. Moor will then generate typesafe Dart APIs based on your tables +and statements. + +[Get started with SQL and moor]({{ "docs/Getting started/starting_with_sql.md" | pageUrl }}) +{% endblock %} {% endblock %} +{% block "blocks/feature" icon="fas fa-plus" title="Analyzer improvements" %} {% block "blocks/markdown" %} +We now support more advanced features like compound select statements and window functions, +including detailed static analysis and lints. The updated type inference engine provides +better results on complex expressions. We also generate simpler methods for queries that only +return one column. +{% endblock %} {% endblock %} +{% block "blocks/feature" icon="fas fa-code-branch" title="Dart-SQL interop" %} {% block "blocks/markdown" %} +Declare tables in Dart, write your queries in SQL. Or do it the other way around. Or do it all in Dart. +Or all in SQL. Moor makes writing database code fun without taking control over your code. +For maximum flexibilty, moor lets you inline Dart expressions into SQL and use the best of both +worlds. +{% endblock %} {% endblock %} + +{% endblock %} + +{% block "blocks/lead" color="green" %} {% block "blocks/markdown" %} +## Builtin SQL IDE + +Moor 2.0 expands the previous sql parser and analyzer, providing real-time feedback on your +SQL queries as you type. Moor plugs right into the Dart analysis server, so you don't have +to install any additional extensions. + +[Learn more about the IDE]({{ "docs/Using SQL/sql_ide.md" | pageUrl }}) +{% endblock %} {% endblock %} + +{% block "blocks/section" color="dark" %} +{% block "blocks/feature" icon="fas fa-lightbulb" title="Quickfixes" %} {% block "blocks/markdown" %} +![](quickfix.png) + +Moor lets you write query code faster with helpful actions. +{% endblock %} {% endblock %} +{% block "blocks/feature" icon="fas fa-exclamation-circle" title="Smart warnings" %} {% block "blocks/markdown" %} +![](warning.png) + +Moor analyzes statements as you write them and reports errors right away. +This helps you identify problems fast, without having to open your app. +{% endblock %} {% endblock %} +{% block "blocks/feature" icon="fas fa-info-circle" title="Structure view" %} {% block "blocks/markdown" %} +![](outline.png) + +Moor provides an outline of your tables and queries for a better overview. +{% endblock %} {% endblock %} + +{% endblock %} + +{% block "blocks/lead" color="purple" %} {% block "blocks/markdown" %} +## And much, much more + +Moor 2.0 contains a set of optimizations and makes common tasks simpler +{% endblock %} {% endblock %} + +{% block "blocks/section" color="light" %} +{% block "blocks/feature" icon="fas fa-lightbulb" title="New database helpers" %} {% block "blocks/markdown" %} +New utils to load database from assets or to perform additional work before creating a database. +{% endblock %} {% endblock %} +{% block "blocks/feature" icon="fas fa-exclamation" title="Removed deprecated features" %} {% block "blocks/markdown" %} +We removed a whole bunch of deprecated apis that made it harder to develop new features. + +[Read the changelog for details](https://pub.dev/packages/moor#-changelog-tab-) +{% endblock %} {% endblock %} +{% block "blocks/feature" icon="fas fa-bolt" title="Experimental `dart:ffi` bindings" %} {% block "blocks/markdown" %} +The new [moor_ffi](https://pub.dev/packages/moor_ffi) package brings moor to the desktop and is up to 500x faster than the old +implementation. + +_Please not that the package is still in preview_ +{% endblock %} {% endblock %} + +{% endblock %} + +{% block "blocks/section" color="dark" type="section" %} {% block "blocks/markdown" %} +## Try moor now + +- To get started with moor, follow our [getting started guide]({{ "docs/Getting started/index.md" | pageUrl }}) here. +- To get started with SQL in moor, or to migrate an existing project to moor, follow our + [migration guide]({{ "docs/Getting started/starting_with_sql.md" | pageUrl }}) + +{% endblock %} {% endblock %} \ No newline at end of file diff --git a/docs/pubspec.yaml b/docs/pubspec.yaml new file mode 100644 index 000000000..d4804a6b3 --- /dev/null +++ b/docs/pubspec.yaml @@ -0,0 +1,34 @@ +name: moor_documentation +description: Documentation of the moor packages +publish_to: none + +environment: + sdk: '>=2.12.0 <3.0.0' + +dependencies: + docsy: + hosted: + url: https://simonbinder.eu + name: docsy + version: ^0.1.0 + +dev_dependencies: + build_runner: ^1.11.1 + build_web_compilers: ^2.16.3 + built_site: + hosted: + url: https://simonbinder.eu + name: built_site + version: ^0.1.0 + webdev: ^2.7.1 + sass_builder: ^2.1.3 + +dependency_overrides: + args: ^2.0.0 + yaml: ^3.0.0 + crypto: ^3.0.0 + # todo: Remove after https://github.com/dart-lang/mime/pull/43 + mime: + git: + url: https://github.com/simolus3/mime.git + ref: woff2 diff --git a/docs/layouts/shortcodes/changed_to_ffi.md b/docs/templates/partials/changed_to_ffi.html similarity index 100% rename from docs/layouts/shortcodes/changed_to_ffi.md rename to docs/templates/partials/changed_to_ffi.html diff --git a/docs/templates/partials/hooks/head-end.html b/docs/templates/partials/hooks/head-end.html new file mode 100644 index 000000000..c78846f6a --- /dev/null +++ b/docs/templates/partials/hooks/head-end.html @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/docs/themes/docsy b/docs/themes/docsy deleted file mode 160000 index c2039d632..000000000 --- a/docs/themes/docsy +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c2039d632295dd42364994bc3c04f75dcdc07a26 diff --git a/docs/web/main.dart b/docs/web/main.dart new file mode 100644 index 000000000..41d6b95a2 --- /dev/null +++ b/docs/web/main.dart @@ -0,0 +1,5 @@ +import 'package:docsy/main.dart' as docsy; + +void main() { + docsy.built_site_main(); +} diff --git a/docs/web/main.scss b/docs/web/main.scss new file mode 100644 index 000000000..4c450fc9f --- /dev/null +++ b/docs/web/main.scss @@ -0,0 +1,3 @@ +@import "package:moor_documentation/_variables"; +@import "package:docsy/style"; +@import "package:moor_documentation/_highlight"; diff --git a/docs/content/en/v2/background.png b/docs/web/v2/background.png similarity index 100% rename from docs/content/en/v2/background.png rename to docs/web/v2/background.png diff --git a/docs/content/en/v2/outline.png b/docs/web/v2/outline.png similarity index 100% rename from docs/content/en/v2/outline.png rename to docs/web/v2/outline.png diff --git a/docs/content/en/v2/quickfix.png b/docs/web/v2/quickfix.png similarity index 100% rename from docs/content/en/v2/quickfix.png rename to docs/web/v2/quickfix.png diff --git a/docs/content/en/v2/warning.png b/docs/web/v2/warning.png similarity index 100% rename from docs/content/en/v2/warning.png rename to docs/web/v2/warning.png diff --git a/docs/website.yaml b/docs/website.yaml new file mode 100644 index 000000000..5a242d9b1 --- /dev/null +++ b/docs/website.yaml @@ -0,0 +1,42 @@ +themes: + - docsy + +site: + title: "Moor" + language: "en" + copyright: "Simon Binder" + github_repo: "https://github.com/simolus3/moor" + github_subdir: "docs/" + github_branch: master +# gcs_engine_id: "002567324444333206795:_yptu7lact8" + + links: + user: + - name: "Contact me via e-mail" + url: "mailto:oss@simonbinder.eu" + icon: "fa fa-envelope" + - name: "Room in gitter" + url: "https://gitter.im/moor-dart/community" + icon: "fab fa-gitter" + - name: "Project on GitHub" + url: "https://github.com/simolus3/moor" + icon: "fab fa-github" + desc: "Development takes place here" + menu: + main: + - name: "Documentation & Guides" + url: "/docs/" + - name: "Pub" + url: "https://pub.dev/packages/moor" + - name: "GitHub" + url: "https://github.com/simolus3/moor/" + - name: "API docs" + url: "https://pub.dev/documentation/moor/latest/" + +environments: + dev: + minify: false + base_url: "http://localhost:8080/" + prod: + minify: true + base_url: "https://moor.simonbinder.eu/" diff --git a/netlify.toml b/netlify.toml index 4109888b8..386648ec8 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,18 +1,18 @@ # We use netlify to deploy the documentation. [build] - base = "docs" - publish = "docs/public" - command = 'git submodule update --init --recursive && npm i && hugo' + base = "" + publish = "docs/deploy" + command = 'tool/netlify_build.sh' [[redirects]] - from = "https://moor.netlify.com/*" + from = "https://moor.netlify.app/*" to = "https://moor.simonbinder.eu/:splat" status = 301 force = true [context.production] - environment = { HUGO_ENV="production", HUGO_VERSION="0.74.3" } + environment = { BUILD_RELEASE="release" } [context.deploy-preview] - environment = { HUGO_VERSION="0.74.3" } \ No newline at end of file + environment = { } diff --git a/tool/netlify_build.sh b/tool/netlify_build.sh new file mode 100755 index 000000000..3ffd85bbe --- /dev/null +++ b/tool/netlify_build.sh @@ -0,0 +1,16 @@ +curl https://storage.googleapis.com/dart-archive/channels/stable/release/latest/linux_packages/dart_2.12.1-1_amd64.deb --output /tmp/dart.deb +dpkg -i /tmp/dart.deb + +cd docs +dart pub get + +if [[ -v BUILD_RELEASE ]] +then + dart run build_runner build --release + dart run build_runner build --release --output web:deploy +else + dart run build_runner build + dart run build_runner build --output web:deploy +fi + +rm -r deploy/packages