From 8edbfa37c98e115a1bf49567e80eaf02f316f969 Mon Sep 17 00:00:00 2001 From: Paul Copplestone Date: Tue, 20 Jul 2021 12:08:42 +0800 Subject: [PATCH] Starts the dart reference docs --- web/package.json | 1 + web/sidebar_spec_dart.js | 10 +++++++ web/sidebars.js | 7 +++++ web/spec/dart.yml | 56 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+) create mode 100644 web/sidebar_spec_dart.js create mode 100644 web/spec/dart.yml diff --git a/web/package.json b/web/package.json index ce47953e32d..671571b7d7d 100644 --- a/web/package.json +++ b/web/package.json @@ -8,6 +8,7 @@ "swizzle": "docusaurus swizzle", "traction": "node traction.js", "gen:all": "npm run gen:supabase && npm run gen:gotrue && npm run gen:postgrest && npm run gen:realtime && npm run gen:postgres && npm run gen:cli", + "gen:dart": "ts-node ReferenceGenerator.ts -o docs/reference/dart spec/dart.yml", "gen:gotrue": "ts-node ReferenceGenerator.ts -o docs/gotrue/client spec/gotrue.yml", "gen:postgrest": "ts-node ReferenceGenerator.ts -o docs/postgrest/client spec/postgrest.yml", "gen:realtime": "ts-node ReferenceGenerator.ts -o docs/realtime/client spec/realtime.yml", diff --git a/web/sidebar_spec_dart.js b/web/sidebar_spec_dart.js new file mode 100644 index 00000000000..0a145370861 --- /dev/null +++ b/web/sidebar_spec_dart.js @@ -0,0 +1,10 @@ +module.exports = { + docs: [ + { + type: 'category', + label: 'About', + items: ['reference/dart/index', 'reference/dart/installing', 'reference/dart/initializing'], + collapsed: true, + } + ], +} \ No newline at end of file diff --git a/web/sidebars.js b/web/sidebars.js index 3e4c4533af6..ec4b0ee18fb 100755 --- a/web/sidebars.js +++ b/web/sidebars.js @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +const dartClient = require('./sidebar_spec_dart') const goTrueClient = require('./sidebar_spec_gotrue') const postgrestClient = require('./sidebar_spec_postgrest') const realtimeClient = require('./sidebar_spec_realtime') @@ -44,6 +45,12 @@ module.exports = { collapsed: false, items: supabaseClient.docs, }, + { + type: 'category', + label: 'Dart', + collapsed: false, + items: dartClient.docs, + }, { type: 'category', label: 'Postgres', diff --git a/web/spec/dart.yml b/web/spec/dart.yml new file mode 100644 index 00000000000..d8138dde4db --- /dev/null +++ b/web/spec/dart.yml @@ -0,0 +1,56 @@ +openref: 0.1 + +info: + id: reference/dart + title: Getting started + description: | + + Supabase Dart. + + definition: spec/combined.json + libraries: + - name: 'Dart' + id: 'dart' + version: '0.0.1' + docs: + path: reference/dart/ + sidebar: + - name: 'About' + items: + - index + - Installing + - Initializing + +pages: + Installing: + description: | + Dart libraries are built and suppported by the community. + + ```bash + # TODO + ``` + + Find the source code on [GitHub](https://github.com/supabase/supabase-dart). + + ## Flutter + + TODO: Some notes about flutter + + Initializing: + description: | + You can initialize a new Supabase client using the `createClient()` method. + + The Supabase client is your entrypoint to the rest of the Supabase functionality + and is the easiest way to interact with everything we offer within the Supabase ecosystem. + + examples: + - name: example() + dart: | + ```dart + TODO + ``` + - name: example() + dart: | + ```dart + TODO + ```