From aa6fea6caaf12469951d106e8ea6c1ca5fe6b338 Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Thu, 1 Aug 2019 20:14:42 +0200 Subject: [PATCH 2/9] Fix wrong double primary key on generated tables --- .../tests/lib/suite/transactions.dart | 1 - moor/lib/src/dsl/table.dart | 7 +- moor/lib/src/runtime/migration.dart | 10 +- moor/lib/src/runtime/structure/columns.dart | 8 +- .../lib/src/runtime/structure/table_info.dart | 11 +- moor/test/data/tables/custom_tables.g.dart | 165 +++++++++++++++++- moor/test/data/tables/tables.moor | 7 +- .../moor_files_integration_test.dart | 43 +++++ .../lib/src/model/specified_column.dart | 5 - .../lib/src/model/specified_table.dart | 7 +- .../lib/src/parser/column_parser.dart | 7 - .../lib/src/parser/moor/parsed_moor_file.dart | 11 +- .../lib/src/writer/table_writer.dart | 13 +- 13 files changed, 268 insertions(+), 27 deletions(-) create mode 100644 moor/test/parsed_sql/moor_files_integration_test.dart diff --git a/extras/integration_tests/tests/lib/suite/transactions.dart b/extras/integration_tests/tests/lib/suite/transactions.dart index fa10bfb8..93b55eef 100644 --- a/extras/integration_tests/tests/lib/suite/transactions.dart +++ b/extras/integration_tests/tests/lib/suite/transactions.dart @@ -10,7 +10,6 @@ void transactionTests(TestExecutor executor) { await db.transaction((_) async { final florianId = await db.writeUser(People.florian); - print(florianId); final dash = await db.getUserById(People.dashId); final florian = await db.getUserById(florianId); diff --git a/moor/lib/src/dsl/table.dart b/moor/lib/src/dsl/table.dart index c405cf43..e576ea69 100644 --- a/moor/lib/src/dsl/table.dart +++ b/moor/lib/src/dsl/table.dart @@ -20,9 +20,14 @@ abstract class Table { String get tableName => null; /// Whether to append a `WITHOUT ROWID` clause in the `CREATE TABLE` - /// statement. + /// statement. This is intended to be used by generated code only. bool get withoutRowId => false; + /// Moor will write some table constraints automatically, for instance when + /// you override [primaryKey]. You can turn this behavior off if you want to. + /// This is intended to be used by generated code only. + bool get dontWriteConstraints => false; + /// Override this to specify custom primary keys: /// ```dart /// class IngredientInRecipes extends Table { diff --git a/moor/lib/src/runtime/migration.dart b/moor/lib/src/runtime/migration.dart index 6c676e62..d1ad8224 100644 --- a/moor/lib/src/runtime/migration.dart +++ b/moor/lib/src/runtime/migration.dart @@ -95,8 +95,15 @@ class Migrator { if (i < table.$columns.length - 1) context.buffer.write(', '); } + final dslTable = table.asDslTable; + + // we're in a bit of a hacky situation where we don't write the primary + // as table constraint if it has already been written on a primary key + // column, even though that column appears in table.$primaryKey because we + // need to know all primary keys for the update(table).replace(row) API final hasPrimaryKey = table.$primaryKey?.isNotEmpty ?? false; - if (hasPrimaryKey && !hasAutoIncrement) { + final dontWritePk = dslTable.dontWriteConstraints || hasAutoIncrement; + if (hasPrimaryKey && !dontWritePk) { context.buffer.write(', PRIMARY KEY ('); final pkList = table.$primaryKey.toList(growable: false); for (var i = 0; i < pkList.length; i++) { @@ -109,7 +116,6 @@ class Migrator { context.buffer.write(')'); } - final dslTable = table.asDslTable; final constraints = dslTable.customConstraints ?? []; for (var i = 0; i < constraints.length; i++) { diff --git a/moor/lib/src/runtime/structure/columns.dart b/moor/lib/src/runtime/structure/columns.dart index f221eb80..4ad576fb 100644 --- a/moor/lib/src/runtime/structure/columns.dart +++ b/moor/lib/src/runtime/structure/columns.dart @@ -43,10 +43,10 @@ abstract class GeneratedColumn> extends Column { /// [here](https://www.sqlite.org/syntax/column-def.html), into the given /// buffer. void writeColumnDefinition(GenerationContext into) { - into.buffer.write('$escapedName $typeName '); + into.buffer.write('$escapedName $typeName'); if ($customConstraints == null) { - into.buffer.write($nullable ? 'NULL' : 'NOT NULL'); + into.buffer.write($nullable ? ' NULL' : ' NOT NULL'); if (defaultValue != null) { into.buffer.write(' DEFAULT '); @@ -62,8 +62,8 @@ abstract class GeneratedColumn> extends Column { // these custom constraints refer to builtin constraints from moor writeCustomConstraints(into.buffer); - } else { - into.buffer.write($customConstraints); + } else if ($customConstraints?.isNotEmpty == true) { + into.buffer..write(' ')..write($customConstraints); } } diff --git a/moor/lib/src/runtime/structure/table_info.dart b/moor/lib/src/runtime/structure/table_info.dart index a6d26eb3..ef8d7ed4 100644 --- a/moor/lib/src/runtime/structure/table_info.dart +++ b/moor/lib/src/runtime/structure/table_info.dart @@ -4,7 +4,7 @@ import 'package:moor/src/runtime/expressions/variables.dart'; /// Base class for generated classes. [TableDsl] is the type specified by the /// user that extends [Table], [D] is the type of the data class /// generated from the table. -mixin TableInfo { +mixin TableInfo on Table { /// Type system sugar. Implementations are likely to inherit from both /// [TableInfo] and [TableDsl] and can thus just return their instance. TableDsl get asDslTable; @@ -13,6 +13,15 @@ mixin TableInfo { /// key has been specified. Set get $primaryKey => null; + // The "primaryKey" is what users define on their table classes, the + // "$primaryKey" is what moor generates in the implementation table info + // classes. Having two of them is pretty pointless, we're going to remove + // the "$primaryKey$ getter in Moor 2.0. Until then, let's make sure they're + // consistent for classes from CREATE TABLE statements, where the info class + // and the table class is the same thing but primaryKey isn't overriden. + @override + Set get primaryKey => $primaryKey; + /// The table name in the sql table. This can be an alias for the actual table /// name. See [actualTableName] for a table name that is not aliased. String get $tableName; diff --git a/moor/test/data/tables/custom_tables.g.dart b/moor/test/data/tables/custom_tables.g.dart index 3e7463bb..499f6808 100644 --- a/moor/test/data/tables/custom_tables.g.dart +++ b/moor/test/data/tables/custom_tables.g.dart @@ -122,6 +122,8 @@ class NoIds extends Table with TableInfo { @override final bool withoutRowId = true; + @override + final bool dontWriteConstraints = true; } class WithDefault extends DataClass implements Insertable { @@ -263,6 +265,9 @@ class WithDefaults extends Table with TableInfo { WithDefaults createAlias(String alias) { return WithDefaults(_db, alias); } + + @override + final bool dontWriteConstraints = true; } class WithConstraint extends DataClass implements Insertable { @@ -434,6 +439,161 @@ class WithConstraints extends Table final List customConstraints = const [ 'FOREIGN KEY (a, b) REFERENCES with_defaults (a, b)' ]; + @override + final bool dontWriteConstraints = true; +} + +class ConfigData extends DataClass implements Insertable { + final String configKey; + final String configValue; + ConfigData({@required this.configKey, this.configValue}); + factory ConfigData.fromData(Map data, GeneratedDatabase db, + {String prefix}) { + final effectivePrefix = prefix ?? ''; + final stringType = db.typeSystem.forDartType(); + return ConfigData( + configKey: stringType + .mapFromDatabaseResponse(data['${effectivePrefix}config_key']), + configValue: stringType + .mapFromDatabaseResponse(data['${effectivePrefix}config_value']), + ); + } + factory ConfigData.fromJson(Map json, + {ValueSerializer serializer = const ValueSerializer.defaults()}) { + return ConfigData( + configKey: serializer.fromJson(json['configKey']), + configValue: serializer.fromJson(json['configValue']), + ); + } + @override + Map toJson( + {ValueSerializer serializer = const ValueSerializer.defaults()}) { + return { + 'configKey': serializer.toJson(configKey), + 'configValue': serializer.toJson(configValue), + }; + } + + @override + T createCompanion>(bool nullToAbsent) { + return ConfigCompanion( + configKey: configKey == null && nullToAbsent + ? const Value.absent() + : Value(configKey), + configValue: configValue == null && nullToAbsent + ? const Value.absent() + : Value(configValue), + ) as T; + } + + ConfigData copyWith({String configKey, String configValue}) => ConfigData( + configKey: configKey ?? this.configKey, + configValue: configValue ?? this.configValue, + ); + @override + String toString() { + return (StringBuffer('ConfigData(') + ..write('configKey: $configKey, ') + ..write('configValue: $configValue') + ..write(')')) + .toString(); + } + + @override + int get hashCode => $mrjf($mrjc(configKey.hashCode, configValue.hashCode)); + @override + bool operator ==(other) => + identical(this, other) || + (other is ConfigData && + other.configKey == configKey && + other.configValue == configValue); +} + +class ConfigCompanion extends UpdateCompanion { + final Value configKey; + final Value configValue; + const ConfigCompanion({ + this.configKey = const Value.absent(), + this.configValue = const Value.absent(), + }); +} + +class Config extends Table with TableInfo { + final GeneratedDatabase _db; + final String _alias; + Config(this._db, [this._alias]); + final VerificationMeta _configKeyMeta = const VerificationMeta('configKey'); + GeneratedTextColumn _configKey; + GeneratedTextColumn get configKey => _configKey ??= _constructConfigKey(); + GeneratedTextColumn _constructConfigKey() { + return GeneratedTextColumn('config_key', $tableName, false, + $customConstraints: 'not null primary key'); + } + + final VerificationMeta _configValueMeta = + const VerificationMeta('configValue'); + GeneratedTextColumn _configValue; + GeneratedTextColumn get configValue => + _configValue ??= _constructConfigValue(); + GeneratedTextColumn _constructConfigValue() { + return GeneratedTextColumn('config_value', $tableName, true, + $customConstraints: ''); + } + + @override + List get $columns => [configKey, configValue]; + @override + Config get asDslTable => this; + @override + String get $tableName => _alias ?? 'config'; + @override + final String actualTableName = 'config'; + @override + VerificationContext validateIntegrity(ConfigCompanion d, + {bool isInserting = false}) { + final context = VerificationContext(); + if (d.configKey.present) { + context.handle(_configKeyMeta, + configKey.isAcceptableValue(d.configKey.value, _configKeyMeta)); + } else if (configKey.isRequired && isInserting) { + context.missing(_configKeyMeta); + } + if (d.configValue.present) { + context.handle(_configValueMeta, + configValue.isAcceptableValue(d.configValue.value, _configValueMeta)); + } else if (configValue.isRequired && isInserting) { + context.missing(_configValueMeta); + } + return context; + } + + @override + Set get $primaryKey => {configKey}; + @override + ConfigData map(Map data, {String tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : null; + return ConfigData.fromData(data, _db, prefix: effectivePrefix); + } + + @override + Map entityToSql(ConfigCompanion d) { + final map = {}; + if (d.configKey.present) { + map['config_key'] = Variable(d.configKey.value); + } + if (d.configValue.present) { + map['config_value'] = Variable(d.configValue.value); + } + return map; + } + + @override + Config createAlias(String alias) { + return Config(_db, alias); + } + + @override + final bool dontWriteConstraints = true; } abstract class _$CustomTablesDb extends GeneratedDatabase { @@ -446,6 +606,9 @@ abstract class _$CustomTablesDb extends GeneratedDatabase { WithConstraints _withConstraints; WithConstraints get withConstraints => _withConstraints ??= WithConstraints(this); + Config _config; + Config get config => _config ??= Config(this); @override - List get allTables => [noIds, withDefaults, withConstraints]; + List get allTables => + [noIds, withDefaults, withConstraints, config]; } diff --git a/moor/test/data/tables/tables.moor b/moor/test/data/tables/tables.moor index 59ee6c39..87bf471e 100644 --- a/moor/test/data/tables/tables.moor +++ b/moor/test/data/tables/tables.moor @@ -13,4 +13,9 @@ CREATE TABLE with_constraints ( c FLOAT(10, 2), FOREIGN KEY (a, b) REFERENCES with_defaults (a, b) -) \ No newline at end of file +) + +create table config ( + config_key TEXT not null primary key, + config_value TEXT +); diff --git a/moor/test/parsed_sql/moor_files_integration_test.dart b/moor/test/parsed_sql/moor_files_integration_test.dart new file mode 100644 index 00000000..d29a6953 --- /dev/null +++ b/moor/test/parsed_sql/moor_files_integration_test.dart @@ -0,0 +1,43 @@ +import 'package:moor/moor.dart'; +import 'package:test_api/test_api.dart'; + +import '../data/tables/custom_tables.dart'; +import '../data/utils/mocks.dart'; + +const _createNoIds = + 'CREATE TABLE IF NOT EXISTS no_ids (payload BLOB NOT NULL) WITHOUT ROWID;'; + +const _createWithDefaults = 'CREATE TABLE IF NOT EXISTS with_defaults (' + "a VARCHAR DEFAULT 'something', b INTEGER UNIQUE);"; + +const _createWithConstraints = 'CREATE TABLE IF NOT EXISTS with_constraints (' + 'a VARCHAR, b INTEGER NOT NULL, c REAL, ' + 'FOREIGN KEY (a, b) REFERENCES with_defaults (a, b)' + ');'; + +const _createConfig = 'CREATE TABLE IF NOT EXISTS config (' + 'config_key VARCHAR not null primary key, ' + 'config_value VARCHAR);'; + +void main() { + // see ../data/tables/tables.moor + test('creates tables as specified in .moor files', () async { + final mockExecutor = MockExecutor(); + final mockQueryExecutor = MockQueryExecutor(); + final db = CustomTablesDb(mockExecutor); + await Migrator(db, mockQueryExecutor).createAllTables(); + + verify(mockQueryExecutor.call(_createNoIds, [])); + verify(mockQueryExecutor.call(_createWithDefaults, [])); + verify(mockQueryExecutor.call(_createWithConstraints, [])); + verify(mockQueryExecutor.call(_createConfig, [])); + }); + + test('infers primary keys correctly', () async { + final db = CustomTablesDb(null); + + expect(db.noIds.primaryKey, isEmpty); + expect(db.withDefaults.primaryKey, isEmpty); + expect(db.config.primaryKey, [db.config.configKey]); + }); +} diff --git a/moor_generator/lib/src/model/specified_column.dart b/moor_generator/lib/src/model/specified_column.dart index d95325ef..913781ac 100644 --- a/moor_generator/lib/src/model/specified_column.dart +++ b/moor_generator/lib/src/model/specified_column.dart @@ -93,10 +93,6 @@ class SpecifiedColumn { /// Whether this column has auto increment. bool get hasAI => features.any((f) => f is AutoIncrement); - /// Whether this column has been declared as the primary key via the - /// column builder. The `primaryKey` field in the table class is unrelated to - /// this. - final bool declaredAsPrimaryKey; final List features; /// If this columns has custom constraints that should be used instead of the @@ -157,7 +153,6 @@ class SpecifiedColumn { this.name, this.overriddenJsonName, this.customConstraints, - this.declaredAsPrimaryKey = false, this.nullable = false, this.features = const [], this.defaultArgument, diff --git a/moor_generator/lib/src/model/specified_table.dart b/moor_generator/lib/src/model/specified_table.dart index 298fb8d2..2a99fc7c 100644 --- a/moor_generator/lib/src/model/specified_table.dart +++ b/moor_generator/lib/src/model/specified_table.dart @@ -52,6 +52,10 @@ class SpecifiedTable { /// getter on the table class with this value. final bool overrideWithoutRowId; + /// When non-null, the generated table class will override the + /// `dontWriteConstraint` getter on the table class with this value. + final bool overrideDontWriteConstraints; + /// When non-null, the generated table class will override the /// `customConstraints` getter in the table class with this value. final List overrideTableConstraints; @@ -64,7 +68,8 @@ class SpecifiedTable { this.primaryKey, String overriddenName, this.overrideWithoutRowId, - this.overrideTableConstraints}) + this.overrideTableConstraints, + this.overrideDontWriteConstraints}) : _overriddenName = overriddenName; /// Finds all type converters used in this tables. diff --git a/moor_generator/lib/src/parser/column_parser.dart b/moor_generator/lib/src/parser/column_parser.dart index 3848cbdf..412c4929 100644 --- a/moor_generator/lib/src/parser/column_parser.dart +++ b/moor_generator/lib/src/parser/column_parser.dart @@ -26,7 +26,6 @@ final Set starters = { }; const String _methodNamed = 'named'; -const String _methodPrimaryKey = 'primaryKey'; const String _methodReferences = 'references'; const String _methodAutoIncrement = 'autoIncrement'; const String _methodWithLength = 'withLength'; @@ -74,7 +73,6 @@ class ColumnParser extends ParserBase { Expression foundDefaultExpression; Expression createdTypeConverter; DartType typeConverterRuntime; - var wasDeclaredAsPrimaryKey = false; var nullable = false; final foundFeatures = []; @@ -114,9 +112,6 @@ class ColumnParser extends ParserBase { ); }); break; - case _methodPrimaryKey: - wasDeclaredAsPrimaryKey = true; - break; case _methodReferences: break; case _methodWithLength: @@ -130,7 +125,6 @@ class ColumnParser extends ParserBase { )); break; case _methodAutoIncrement: - wasDeclaredAsPrimaryKey = true; foundFeatures.add(AutoIncrement()); break; case _methodNullable: @@ -195,7 +189,6 @@ class ColumnParser extends ParserBase { dartGetterName: getter.name.name, name: name, overriddenJsonName: _readJsonKey(getterElement), - declaredAsPrimaryKey: wasDeclaredAsPrimaryKey, customConstraints: foundCustomConstraint, nullable: nullable, features: foundFeatures, diff --git a/moor_generator/lib/src/parser/moor/parsed_moor_file.dart b/moor_generator/lib/src/parser/moor/parsed_moor_file.dart index 0fecc384..a91fd353 100644 --- a/moor_generator/lib/src/parser/moor/parsed_moor_file.dart +++ b/moor_generator/lib/src/parser/moor/parsed_moor_file.dart @@ -75,7 +75,6 @@ class CreateTable { nullable: column.type.nullable, dartGetterName: dartName, name: ColumnName.implicitly(sqlName), - declaredAsPrimaryKey: isPrimaryKey, features: features, customConstraints: constraintWriter.toString(), defaultArgument: defaultValue, @@ -92,6 +91,14 @@ class CreateTable { final constraints = table.tableConstraints.map((c) => c.span.text).toList(); + for (var keyConstraint in table.tableConstraints.whereType()) { + if (keyConstraint.isPrimaryKey) { + primaryKey.addAll(keyConstraint.indexedColumns + .map((r) => foundColumns[r.columnName]) + .where((c) => c != null)); + } + } + return SpecifiedTable( fromClass: null, columns: foundColumns.values.toList(), @@ -101,6 +108,8 @@ class CreateTable { primaryKey: primaryKey, overrideWithoutRowId: table.withoutRowId ? true : null, overrideTableConstraints: constraints.isNotEmpty ? constraints : null, + // we take care of writing the primary key ourselves + overrideDontWriteConstraints: true, ); } diff --git a/moor_generator/lib/src/writer/table_writer.dart b/moor_generator/lib/src/writer/table_writer.dart index 6927f7cb..79d3eba1 100644 --- a/moor_generator/lib/src/writer/table_writer.dart +++ b/moor_generator/lib/src/writer/table_writer.dart @@ -264,7 +264,9 @@ class TableWriter { void _overrideFieldsIfNeeded(StringBuffer buffer) { if (table.overrideWithoutRowId != null) { final value = table.overrideWithoutRowId ? 'true' : 'false'; - buffer..write('@override\n')..write('final bool withoutRowId = $value;'); + buffer + ..write('@override\n') + ..write('final bool withoutRowId = $value;\n'); } if (table.overrideTableConstraints != null) { @@ -273,7 +275,14 @@ class TableWriter { buffer ..write('@override\n') - ..write('final List customConstraints = const [$value];'); + ..write('final List customConstraints = const [$value];\n'); + } + + if (table.overrideDontWriteConstraints != null) { + final value = table.overrideDontWriteConstraints ? 'true' : 'false'; + buffer + ..write('@override\n') + ..write('final bool dontWriteConstraints = $value;\n'); } } } From 03eaae4a60e98d56c3b2c65b444a311fab92652a Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Thu, 1 Aug 2019 20:56:23 +0200 Subject: [PATCH 3/9] Replace jekyll docs with docsy example --- .gitmodules | 4 + docs/.gitignore | 10 +- docs/404.html | 32 - docs/CNAME | 1 - docs/Gemfile | 24 - docs/Gemfile.lock | 256 -- docs/README.md | 12 + docs/_config.yml | 47 - docs/_includes/content/getting_started.md | 76 - docs/_includes/head.html | 22 - docs/_includes/nav.html | 44 - docs/_layouts/default.html | 85 - docs/_layouts/feature.html | 8 - docs/_layouts/guide.html | 5 - docs/_sass/base.scss | 110 - docs/_sass/buttons.scss | 118 - docs/_sass/code.scss | 114 - docs/_sass/color_schemes/dark.scss | 14 - docs/_sass/content.scss | 114 - docs/_sass/custom/custom.scss | 120 - docs/_sass/labels.scss | 36 - docs/_sass/layout.scss | 147 - docs/_sass/navigation.scss | 152 - docs/_sass/search.scss | 114 - docs/_sass/support/_functions.scss | 10 - docs/_sass/support/_variables.scss | 130 - docs/_sass/support/mixins/_buttons.scss | 27 - docs/_sass/support/mixins/_layout.scss | 36 - docs/_sass/support/mixins/_typography.scss | 81 - docs/_sass/support/mixins/mixins.scss | 3 - docs/_sass/support/support.scss | 3 - docs/_sass/tables.scss | 78 - docs/_sass/typography.scss | 58 - docs/_sass/utilities/_colors.scss | 239 -- docs/_sass/utilities/_layout.scss | 38 - docs/_sass/utilities/_lists.scss | 11 - docs/_sass/utilities/_spacing.scss | 121 - docs/_sass/utilities/_typography.scss | 91 - docs/_sass/utilities/utilities.scss | 5 - docs/_sass/vendor/normalize.scss/README.md | 78 - .../vendor/normalize.scss/normalize.scss | 427 --- docs/_sass/vendor/normalize.scss/package.json | 70 - docs/assets/js/search-data.json | 12 - docs/assets/scss/_variables_project.scss | 6 + docs/config.toml | 136 + docs/content/en/_index.html | 83 + docs/content/en/about/_index.html | 38 + docs/content/en/docs/Examples/_index.md | 17 + .../content/en/docs/Getting started/_index.md | 36 + .../en/docs/Getting started/example-page.md | 239 ++ docs/content/en/docs/Overview/_index.md | 38 + docs/content/en/docs/_index.md | 24 + docs/content/en/search.md | 6 + docs/docs/daos.md | 35 - docs/docs/faq.md | 41 - docs/docs/getting_started.md | 20 - docs/docs/migrations.md | 82 - docs/docs/transactions.md | 47 - docs/docs/type_converters.md | 75 - docs/docs/web.md | 82 - docs/docs/writing_queries/custom_queries.md | 85 - docs/docs/writing_queries/joins.md | 117 - docs/docs/writing_queries/writing_queries.md | 109 - docs/index.md | 74 - docs/layouts/404.html | 10 + docs/package-lock.json | 2843 +++++++++++++++++ docs/package.json | 24 + docs/themes/docsy | 1 + 68 files changed, 3524 insertions(+), 3927 deletions(-) create mode 100644 .gitmodules delete mode 100644 docs/404.html delete mode 100644 docs/CNAME delete mode 100644 docs/Gemfile delete mode 100644 docs/Gemfile.lock create mode 100644 docs/README.md delete mode 100644 docs/_config.yml delete mode 100644 docs/_includes/content/getting_started.md delete mode 100644 docs/_includes/head.html delete mode 100644 docs/_includes/nav.html delete mode 100644 docs/_layouts/default.html delete mode 100644 docs/_layouts/feature.html delete mode 100644 docs/_layouts/guide.html delete mode 100644 docs/_sass/base.scss delete mode 100644 docs/_sass/buttons.scss delete mode 100644 docs/_sass/code.scss delete mode 100644 docs/_sass/color_schemes/dark.scss delete mode 100644 docs/_sass/content.scss delete mode 100644 docs/_sass/custom/custom.scss delete mode 100644 docs/_sass/labels.scss delete mode 100644 docs/_sass/layout.scss delete mode 100644 docs/_sass/navigation.scss delete mode 100644 docs/_sass/search.scss delete mode 100644 docs/_sass/support/_functions.scss delete mode 100644 docs/_sass/support/_variables.scss delete mode 100644 docs/_sass/support/mixins/_buttons.scss delete mode 100644 docs/_sass/support/mixins/_layout.scss delete mode 100644 docs/_sass/support/mixins/_typography.scss delete mode 100644 docs/_sass/support/mixins/mixins.scss delete mode 100644 docs/_sass/support/support.scss delete mode 100644 docs/_sass/tables.scss delete mode 100644 docs/_sass/typography.scss delete mode 100644 docs/_sass/utilities/_colors.scss delete mode 100644 docs/_sass/utilities/_layout.scss delete mode 100644 docs/_sass/utilities/_lists.scss delete mode 100644 docs/_sass/utilities/_spacing.scss delete mode 100644 docs/_sass/utilities/_typography.scss delete mode 100644 docs/_sass/utilities/utilities.scss delete mode 100644 docs/_sass/vendor/normalize.scss/README.md delete mode 100644 docs/_sass/vendor/normalize.scss/normalize.scss delete mode 100644 docs/_sass/vendor/normalize.scss/package.json delete mode 100644 docs/assets/js/search-data.json create mode 100644 docs/assets/scss/_variables_project.scss create mode 100644 docs/config.toml create mode 100644 docs/content/en/_index.html create mode 100644 docs/content/en/about/_index.html create mode 100755 docs/content/en/docs/Examples/_index.md create mode 100644 docs/content/en/docs/Getting started/_index.md create mode 100644 docs/content/en/docs/Getting started/example-page.md create mode 100644 docs/content/en/docs/Overview/_index.md create mode 100755 docs/content/en/docs/_index.md create mode 100644 docs/content/en/search.md delete mode 100644 docs/docs/daos.md delete mode 100644 docs/docs/faq.md delete mode 100644 docs/docs/getting_started.md delete mode 100644 docs/docs/migrations.md delete mode 100644 docs/docs/transactions.md delete mode 100644 docs/docs/type_converters.md delete mode 100644 docs/docs/web.md delete mode 100644 docs/docs/writing_queries/custom_queries.md delete mode 100644 docs/docs/writing_queries/joins.md delete mode 100644 docs/docs/writing_queries/writing_queries.md delete mode 100644 docs/index.md create mode 100644 docs/layouts/404.html create mode 100644 docs/package-lock.json create mode 100644 docs/package.json create mode 160000 docs/themes/docsy diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..e1c003a6 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ + +[submodule "docs/themes/docsy"] + path = docs/themes/docsy + url = https://github.com/google/docsy.git diff --git a/docs/.gitignore b/docs/.gitignore index 45c15053..0065c8c2 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,3 +1,7 @@ -_site -.sass-cache -.jekyll-metadata + +public/ +resources/ +node_modules/ +tech-doc-hugo + +.vscode/ \ No newline at end of file diff --git a/docs/404.html b/docs/404.html deleted file mode 100644 index 582bad3e..00000000 --- a/docs/404.html +++ /dev/null @@ -1,32 +0,0 @@ ---- -layout: default -title: Page not found -permalink: /404 -nav_exclude: true -search_exclude: true -sitemap: false -exclude: true ---- - -

Page not found

- -

The page you requested could not be found. Try using the navigation {% if site.search_enabled %}or search {% endif %}to find what you're looking for or go to this site's home page.

- -

Check out these features

-{% assign posts = site.pages | sort:"nav_order" %} -
    - {% for post in posts %} - {% if post.layout == "feature" %} -
  • {{post.title}}
  • - {% endif %} - {% endfor %} -
- -

Or these in-depth guides

-
    - {% for post in posts %} - {% if post.layout == "guide" %} -
  • {{post.title}}
  • - {% endif %} - {% endfor %} -
\ No newline at end of file diff --git a/docs/CNAME b/docs/CNAME deleted file mode 100644 index fc9a9dd2..00000000 --- a/docs/CNAME +++ /dev/null @@ -1 +0,0 @@ -moor.simonbinder.eu \ No newline at end of file diff --git a/docs/Gemfile b/docs/Gemfile deleted file mode 100644 index 6b622ee3..00000000 --- a/docs/Gemfile +++ /dev/null @@ -1,24 +0,0 @@ -source "https://rubygems.org" - -# Hello! This is where you manage which Jekyll version is used to run. -# When you want to use a different version, change it below, save the -# file and run `bundle install`. Run Jekyll with `bundle exec`, like so: -# -# bundle exec jekyll serve -# -# This will help ensure the proper Jekyll version is running. -# Happy Jekylling! - -gem "just-the-docs" - -# If you want to use GitHub Pages, remove the "gem "jekyll"" above and -# uncomment the line below. To upgrade, run `bundle update github-pages`. -gem "github-pages", group: :jekyll_plugins - -# Windows does not include zoneinfo files, so bundle the tzinfo-data gem -gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby] - -# Performance-booster for watching directories on Windows -gem "wdm", "~> 0.1.0" if Gem.win_platform? - -gem 'jekyll-sitemap' \ No newline at end of file diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock deleted file mode 100644 index 0201033e..00000000 --- a/docs/Gemfile.lock +++ /dev/null @@ -1,256 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - activesupport (4.2.11.1) - i18n (~> 0.7) - minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) - tzinfo (~> 1.1) - addressable (2.6.0) - public_suffix (>= 2.0.2, < 4.0) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.11.1) - colorator (1.1.0) - commonmarker (0.17.13) - ruby-enum (~> 0.5) - concurrent-ruby (1.1.5) - dnsruby (1.61.2) - addressable (~> 2.5) - em-websocket (0.5.1) - eventmachine (>= 0.12.9) - http_parser.rb (~> 0.6.0) - ethon (0.12.0) - ffi (>= 1.3.0) - eventmachine (1.2.7) - execjs (2.7.0) - faraday (0.15.4) - multipart-post (>= 1.2, < 3) - ffi (1.11.1) - forwardable-extended (2.6.0) - gemoji (3.0.1) - github-pages (198) - activesupport (= 4.2.11.1) - github-pages-health-check (= 1.16.1) - jekyll (= 3.8.5) - jekyll-avatar (= 0.6.0) - jekyll-coffeescript (= 1.1.1) - jekyll-commonmark-ghpages (= 0.1.5) - jekyll-default-layout (= 0.1.4) - jekyll-feed (= 0.11.0) - jekyll-gist (= 1.5.0) - jekyll-github-metadata (= 2.12.1) - jekyll-mentions (= 1.4.1) - jekyll-optional-front-matter (= 0.3.0) - jekyll-paginate (= 1.1.0) - jekyll-readme-index (= 0.2.0) - jekyll-redirect-from (= 0.14.0) - jekyll-relative-links (= 0.6.0) - jekyll-remote-theme (= 0.3.1) - jekyll-sass-converter (= 1.5.2) - jekyll-seo-tag (= 2.5.0) - jekyll-sitemap (= 1.2.0) - jekyll-swiss (= 0.4.0) - jekyll-theme-architect (= 0.1.1) - jekyll-theme-cayman (= 0.1.1) - jekyll-theme-dinky (= 0.1.1) - jekyll-theme-hacker (= 0.1.1) - jekyll-theme-leap-day (= 0.1.1) - jekyll-theme-merlot (= 0.1.1) - jekyll-theme-midnight (= 0.1.1) - jekyll-theme-minimal (= 0.1.1) - jekyll-theme-modernist (= 0.1.1) - jekyll-theme-primer (= 0.5.3) - jekyll-theme-slate (= 0.1.1) - jekyll-theme-tactile (= 0.1.1) - jekyll-theme-time-machine (= 0.1.1) - jekyll-titles-from-headings (= 0.5.1) - jemoji (= 0.10.2) - kramdown (= 1.17.0) - liquid (= 4.0.0) - listen (= 3.1.5) - mercenary (~> 0.3) - minima (= 2.5.0) - nokogiri (>= 1.8.5, < 2.0) - rouge (= 2.2.1) - terminal-table (~> 1.4) - github-pages-health-check (1.16.1) - addressable (~> 2.3) - dnsruby (~> 1.60) - octokit (~> 4.0) - public_suffix (~> 3.0) - typhoeus (~> 1.3) - html-pipeline (2.11.0) - activesupport (>= 2) - nokogiri (>= 1.4) - http_parser.rb (0.6.0) - i18n (0.9.5) - concurrent-ruby (~> 1.0) - jekyll (3.8.5) - addressable (~> 2.4) - colorator (~> 1.0) - em-websocket (~> 0.5) - i18n (~> 0.7) - jekyll-sass-converter (~> 1.0) - jekyll-watch (~> 2.0) - kramdown (~> 1.14) - liquid (~> 4.0) - mercenary (~> 0.3.3) - pathutil (~> 0.9) - rouge (>= 1.7, < 4) - safe_yaml (~> 1.0) - jekyll-avatar (0.6.0) - jekyll (~> 3.0) - jekyll-coffeescript (1.1.1) - coffee-script (~> 2.2) - coffee-script-source (~> 1.11.1) - jekyll-commonmark (1.3.1) - commonmarker (~> 0.14) - jekyll (>= 3.7, < 5.0) - jekyll-commonmark-ghpages (0.1.5) - commonmarker (~> 0.17.6) - jekyll-commonmark (~> 1) - rouge (~> 2) - jekyll-default-layout (0.1.4) - jekyll (~> 3.0) - jekyll-feed (0.11.0) - jekyll (~> 3.3) - jekyll-gist (1.5.0) - octokit (~> 4.2) - jekyll-github-metadata (2.12.1) - jekyll (~> 3.4) - octokit (~> 4.0, != 4.4.0) - jekyll-mentions (1.4.1) - html-pipeline (~> 2.3) - jekyll (~> 3.0) - jekyll-optional-front-matter (0.3.0) - jekyll (~> 3.0) - jekyll-paginate (1.1.0) - jekyll-readme-index (0.2.0) - jekyll (~> 3.0) - jekyll-redirect-from (0.14.0) - jekyll (~> 3.3) - jekyll-relative-links (0.6.0) - jekyll (~> 3.3) - jekyll-remote-theme (0.3.1) - jekyll (~> 3.5) - rubyzip (>= 1.2.1, < 3.0) - jekyll-sass-converter (1.5.2) - sass (~> 3.4) - jekyll-seo-tag (2.5.0) - jekyll (~> 3.3) - jekyll-sitemap (1.2.0) - jekyll (~> 3.3) - jekyll-swiss (0.4.0) - jekyll-theme-architect (0.1.1) - jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) - jekyll-theme-cayman (0.1.1) - jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) - jekyll-theme-dinky (0.1.1) - jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) - jekyll-theme-hacker (0.1.1) - jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) - jekyll-theme-leap-day (0.1.1) - jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) - jekyll-theme-merlot (0.1.1) - jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) - jekyll-theme-midnight (0.1.1) - jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) - jekyll-theme-minimal (0.1.1) - jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) - jekyll-theme-modernist (0.1.1) - jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) - jekyll-theme-primer (0.5.3) - jekyll (~> 3.5) - jekyll-github-metadata (~> 2.9) - jekyll-seo-tag (~> 2.0) - jekyll-theme-slate (0.1.1) - jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) - jekyll-theme-tactile (0.1.1) - jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) - jekyll-theme-time-machine (0.1.1) - jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) - jekyll-titles-from-headings (0.5.1) - jekyll (~> 3.3) - jekyll-watch (2.2.1) - listen (~> 3.0) - jemoji (0.10.2) - gemoji (~> 3.0) - html-pipeline (~> 2.2) - jekyll (~> 3.0) - just-the-docs (0.2.5) - jekyll (~> 3.8.5) - jekyll-seo-tag (~> 2.0) - rake (~> 12.3.1) - kramdown (1.17.0) - liquid (4.0.0) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) - mercenary (0.3.6) - mini_portile2 (2.4.0) - minima (2.5.0) - jekyll (~> 3.5) - jekyll-feed (~> 0.9) - jekyll-seo-tag (~> 2.1) - minitest (5.11.3) - multipart-post (2.1.1) - nokogiri (1.10.3) - mini_portile2 (~> 2.4.0) - octokit (4.14.0) - sawyer (~> 0.8.0, >= 0.5.3) - pathutil (0.16.2) - forwardable-extended (~> 2.6) - public_suffix (3.1.1) - rake (12.3.2) - rb-fsevent (0.10.3) - rb-inotify (0.10.0) - ffi (~> 1.0) - rouge (2.2.1) - ruby-enum (0.7.2) - i18n - ruby_dep (1.5.0) - rubyzip (1.2.3) - safe_yaml (1.0.5) - sass (3.7.4) - sass-listen (~> 4.0.0) - sass-listen (4.0.0) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - sawyer (0.8.2) - addressable (>= 2.3.5) - faraday (> 0.8, < 2.0) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) - thread_safe (0.3.6) - typhoeus (1.3.1) - ethon (>= 0.9.0) - tzinfo (1.2.5) - thread_safe (~> 0.1) - unicode-display_width (1.6.0) - -PLATFORMS - ruby - -DEPENDENCIES - github-pages - jekyll-sitemap - just-the-docs - tzinfo-data - -BUNDLED WITH - 2.0.1 diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..4e184b47 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,12 @@ +# 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` an `npm install`. + +## Running the website locally +After the setup, it's just a simple +``` +hugo server +``` diff --git a/docs/_config.yml b/docs/_config.yml deleted file mode 100644 index 059a98b6..00000000 --- a/docs/_config.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Welcome to Jekyll! -# -# This config file is meant for settings that affect your whole blog, values -# which you are expected to set up once and rarely edit after that. If you find -# yourself editing this file very often, consider using Jekyll's data files -# feature for the data you need to update frequently. -# -# For technical reasons, this file is *NOT* reloaded automatically when you use -# 'bundle exec jekyll serve'. If you change this file, please restart the server process. - -# Site settings -# These are used to personalize your new site. If you look in the HTML files, -# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. -# You can create any custom variable you would like, and they will be accessible -# in the templates via {{ site.myvariable }}. -title: Moor -#email: your-email@example.com -description: >- # this means to ignore newlines until "baseurl:" - Moor is an easy to use, reactive, typesafe persistence library for Flutter apps. -baseurl: "/" # the subpath of your site, e.g. /blog -url: "https://moor.simonbinder.eu" # the base hostname & protocol for your site, e.g. http://example.com -#twitter_username: jekyllrb -github_link: https://github.com/simolus3/moor - -search_enabled: true - -common_links: - getting_started: "/getting-started" - -# Build settings -markdown: kramdown -theme: just-the-docs -plugins: - - jekyll-feed - - jekyll-sitemap - -# Exclude from processing. -# The following items will not be processed, by default. Create a custom list -# to override the default setting. -# exclude: -# - Gemfile -# - Gemfile.lock -# - node_modules -# - vendor/bundle/ -# - vendor/cache/ -# - vendor/gems/ -# - vendor/ruby/ diff --git a/docs/_includes/content/getting_started.md b/docs/_includes/content/getting_started.md deleted file mode 100644 index f604f143..00000000 --- a/docs/_includes/content/getting_started.md +++ /dev/null @@ -1,76 +0,0 @@ -### Adding the dependency -First, let's add moor to your project's `pubspec.yaml`. -At the moment, the current version of `moor_flutter` is [![Flutter version](https://img.shields.io/pub/v/moor_flutter.svg)](https://pub.dartlang.org/packages/moor_flutter) and the current version of `moor_generator` is [![Generator version](https://img.shields.io/pub/v/moor_generator.svg)](https://pub.dartlang.org/packages/moor_generator) - -```yaml -dependencies: - moor_flutter: # use the latest version - -dev_dependencies: - moor_generator: # use the latest version - build_runner: -``` -We're going to use the `moor_flutter` library to specify tables and access the database. The -`moor_generator` library will take care of generating the necessary code so the -library knows what your table structure looks like. - -### Declaring tables -Using moor, you can model the structure of your tables with simple dart code: -```dart -import 'package:moor_flutter/moor_flutter.dart'; - -// assuming that your file is called filename.dart. This will give an error at first, -// but it's needed for moor to know about the generated code -part 'filename.g.dart'; - -// this will generate a table called "todos" for us. The rows of that table will -// be represented by a class called "Todo". -class Todos extends Table { - IntColumn get id => integer().autoIncrement()(); - TextColumn get title => text().withLength(min: 6, max: 32)(); - TextColumn get content => text().named('body')(); - IntColumn get category => integer().nullable()(); -} - -// This will make moor generate a class called "Category" to represent a row in this table. -// By default, "Categorie" would have been used because it only strips away the trailing "s" -// in the table name. -@DataClassName("Category") -class Categories extends Table { - - IntColumn get id => integer().autoIncrement()(); - TextColumn get description => text()(); -} - -// this annotation tells moor to prepare a database class that uses both of the -// tables we just defined. We'll see how to use that database class in a moment. -@UseMoor(tables: [Todos, Categories]) -class MyDatabase { - -} -``` - -__⚠️ Note:__ The column definitions, the table name and the primary key must be known at -compile time. For column definitions and the primary key, the function must use the `=>` -operator and can't contain anything more than what's included in the documentation and the -examples. Otherwise, the generator won't be able to know what's going on. - -### Generating the code -Moor integrates with Dart's `build` system, so you can generate all the code needed with -`flutter packages pub run build_runner build`. If you want to continuously rebuild the generated code -whever you change your code, run `flutter packages pub run build_runner watch` instead. -After running either command once, the moor generator will have created a class for your -database and data classes for your entities. To use it, change the `MyDatabase` class as -follows: -```dart -@UseMoor(tables: [Todos, Categories]) -class MyDatabase extends _$MyDatabase { - // we tell the database where to store the data with this constructor - MyDatabase() : super(FlutterQueryExecutor.inDatabaseFolder(path: 'db.sqlite')); - - // you should bump this number whenever you change or add a table definition. Migrations - // are covered later in this readme. - @override - int get schemaVersion => 1; -} -``` \ No newline at end of file diff --git a/docs/_includes/head.html b/docs/_includes/head.html deleted file mode 100644 index 7c96b731..00000000 --- a/docs/_includes/head.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - {% if page.meta_title != nil %} - {{ page.meta_title }} - {% else %} - {{ page.title }} - {{ site.title }} - {% endif %} - - {% if page.description %} - - {% endif %} - - - - {% if site.search_enabled != nil %} - - {% endif %} - - - - \ No newline at end of file diff --git a/docs/_includes/nav.html b/docs/_includes/nav.html deleted file mode 100644 index 2c4bf1ea..00000000 --- a/docs/_includes/nav.html +++ /dev/null @@ -1,44 +0,0 @@ - diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html deleted file mode 100644 index ac58fba6..00000000 --- a/docs/_layouts/default.html +++ /dev/null @@ -1,85 +0,0 @@ - - - -{% include head.html %} - - -
- -
- -
- {% unless page.url == "/" %} - {% if page.parent %} - - {% endif %} - {% endunless %} -
- {{ content }} - - {% if page.has_children == true and page.has_toc != false %} -
-

Table of contents

- {% assign children_list = site.pages | sort:"nav_order" %} -
    - {% for child in children_list %} - {% if child.parent == page.title and child.title != page.title %} -
  • - {{ child.title }} -
  • - {% endif %} - {% endfor %} -
- {% endif %} - -
- - Was this page helpful? Please - {% assign url = page.url | absolute_url %} - {% assign body = 'Refers to the documentation: ' | append: url %} - report an issue - if you have questions or run into problems. - -
-
-
-
- - - diff --git a/docs/_layouts/feature.html b/docs/_layouts/feature.html deleted file mode 100644 index e24f1c95..00000000 --- a/docs/_layouts/feature.html +++ /dev/null @@ -1,8 +0,0 @@ ---- -layout: default ---- -{% if page.since != nil %} -Available from {{page.since}} -{% endif %} - -{{ content }} \ No newline at end of file diff --git a/docs/_layouts/guide.html b/docs/_layouts/guide.html deleted file mode 100644 index 84f03f7f..00000000 --- a/docs/_layouts/guide.html +++ /dev/null @@ -1,5 +0,0 @@ ---- -layout: default ---- - -{{ content }} \ No newline at end of file diff --git a/docs/_sass/base.scss b/docs/_sass/base.scss deleted file mode 100644 index 1ea39036..00000000 --- a/docs/_sass/base.scss +++ /dev/null @@ -1,110 +0,0 @@ -// -// Base element style overrides -// -// stylelint-disable selector-no-type, selector-max-type - -* { - box-sizing: border-box; -} - -::selection { - color: $white; - background: $link-color; -} - -html { - @include fs-4; -} - -body { - font-family: $body-font-family; - font-size: inherit; - line-height: $body-line-height; - color: $body-text-color; - background-color: $body-background-color; -} - -p, -h1, -h2, -h3, -h4, -h5, -h6, -ol, -ul, -pre, -address, -blockquote, -dl, -div, -fieldset, -form, -hr, -noscript, -table { - margin-top: 0; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - margin-top: 1.2em; - margin-bottom: 0.8em; - font-weight: 500; - line-height: $body-heading-line-height; - color: $body-heading-color; -} - -p { - margin-bottom: 1em; -} - -a { - color: $link-color; - text-decoration: none; -} - -a:not([class]) { - text-decoration: none; - background-image: linear-gradient($border-color 0%, $border-color 100%); - background-repeat: repeat-x; - background-position: 0 100%; - background-size: 1px 1px; - - &:hover { - background-image: linear-gradient(rgba($link-color, 0.45) 0%, rgba($link-color, 0.45) 100%); - background-size: 1px 1px; - - } -} - -code { - font-family: $mono-font-family; - font-size: 12px; - line-height: $body-line-height; -} - -figure { - margin: 0; -} - -li { - margin: 0.25em 0; -} - -img { - max-width: 100%; - height: auto; -} - -hr { - height: 1px; - padding: 0; - margin: $sp-6 0; - background-color: $border-color; - border: 0; -} diff --git a/docs/_sass/buttons.scss b/docs/_sass/buttons.scss deleted file mode 100644 index 05db0ed9..00000000 --- a/docs/_sass/buttons.scss +++ /dev/null @@ -1,118 +0,0 @@ -// -// Buttons and things that look like buttons -// -// stylelint-disable color-named - -.btn { - display: inline-block; - box-sizing: border-box; - padding-top: 0.3em; - padding-right: 1em; - padding-bottom: 0.3em; - padding-left: 1em; - margin: 0; - font-family: inherit; - font-size: inherit; - font-weight: 500; - line-height: 1.5; - color: $link-color; - text-decoration: none; - vertical-align: baseline; - cursor: pointer; - background-color: $base-button-color; - border-width: 0; - border-radius: 3px; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08); - appearance: none; - - &:focus { - text-decoration: none; - outline: none; - box-shadow: 0 0 0 3px rgba(blue, 0.25); - } - - &:focus:hover, - &.selected:focus { - box-shadow: 0 0 0 3px rgba(blue, 0.25); - } - - &:hover, - &.zeroclipboard-is-hover { - color: darken($link-color, 2%); - } - - &:hover, - &:active, - &.zeroclipboard-is-hover, - &.zeroclipboard-is-active { - text-decoration: none; - background-color: darken($base-button-color, 1%); - } - - &:active, - &.selected, - &.zeroclipboard-is-active { - background-color: darken($base-button-color, 3%); - background-image: none; - box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15); - } - - &.selected:hover { - background-color: darken(#dcdcdc, 5%); - } - - &:disabled, - &.disabled { - &, - &:hover { - color: rgba(102, 102, 102, 0.5); - cursor: default; - background-color: rgba(229, 229, 229, 0.5); - background-image: none; - box-shadow: none; - } - } -} - -.btn-outline { - color: $link-color; - background: transparent; - box-shadow: inset 0 0 0 2px $grey-lt-300; - - &:hover, - &:active, - &.zeroclipboard-is-hover, - &.zeroclipboard-is-active { - color: darken($link-color, 4%); - text-decoration: none; - background-color: transparent; - box-shadow: inset 0 0 0 3px $grey-lt-300; - } - - &:focus { - text-decoration: none; - outline: none; - box-shadow: inset 0 0 0 2px $grey-dk-100, 0 0 0 3px rgba(blue, 0.25); - } - - &:focus:hover, - &.selected:focus { - box-shadow: inset 0 0 0 2px $grey-dk-100; - } -} - -.btn-primary { - @include btn-color($white, $btn-primary-color); -} - -.btn-purple { - @include btn-color($white, $purple-100); -} - -.btn-blue { - @include btn-color($white, $blue-000); -} - -.btn-green { - @include btn-color($white, $green-100); -} diff --git a/docs/_sass/code.scss b/docs/_sass/code.scss deleted file mode 100644 index c308c7b5..00000000 --- a/docs/_sass/code.scss +++ /dev/null @@ -1,114 +0,0 @@ -// -// Code and syntax highlighting -// -// stylelint-disable selector-no-qualifying-type, declaration-block-semicolon-newline-after,declaration-block-single-line-max-declarations, selector-no-type, selector-max-type - -code { - padding: 0.2em 0.15em; - font-weight: 400; - background-color: $code-background-color; - border: $border $border-color; - border-radius: $border-radius; -} - -pre.highlight { - padding: $sp-3; - margin-bottom: 0; - -webkit-overflow-scrolling: touch; - background-color: $code-background-color; - - code { - padding: 0; - border: 0; - } -} - -.highlighter-rouge { - margin-bottom: $sp-3; - overflow: hidden; - border-radius: $border-radius; -} - -.highlight .c { color: #999988; font-style: italic } /* Comment */ -.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ -.highlight .k { color: #000000; font-weight: bold } /* Keyword */ -.highlight .o { color: #000000; font-weight: bold } /* Operator */ -.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ -.highlight .cp { color: #999999; font-weight: bold; font-style: italic } /* Comment.Preproc */ -.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ -.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ -.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ -.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */ -.highlight .gr { color: #aa0000 } /* Generic.Error */ -.highlight .gh { color: #999999 } /* Generic.Heading */ -.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ -.highlight .go { color: #888888 } /* Generic.Output */ -.highlight .gp { color: #555555 } /* Generic.Prompt */ -.highlight .gs { font-weight: bold } /* Generic.Strong */ -.highlight .gu { color: #aaaaaa } /* Generic.Subheading */ -.highlight .gt { color: #aa0000 } /* Generic.Traceback */ -.highlight .kc { color: #000000; font-weight: bold } /* Keyword.Constant */ -.highlight .kd { color: #000000; font-weight: bold } /* Keyword.Declaration */ -.highlight .kn { color: #000000; font-weight: bold } /* Keyword.Namespace */ -.highlight .kp { color: #000000; font-weight: bold } /* Keyword.Pseudo */ -.highlight .kr { color: #000000; font-weight: bold } /* Keyword.Reserved */ -.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */ -.highlight .m { color: #009999 } /* Literal.Number */ -.highlight .s { color: #d01040 } /* Literal.String */ -.highlight .na { color: #008080 } /* Name.Attribute */ -.highlight .nb { color: #0086B3 } /* Name.Builtin */ -.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */ -.highlight .no { color: #008080 } /* Name.Constant */ -.highlight .nd { color: #3c5d5d; font-weight: bold } /* Name.Decorator */ -.highlight .ni { color: #800080 } /* Name.Entity */ -.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */ -.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */ -.highlight .nl { color: #990000; font-weight: bold } /* Name.Label */ -.highlight .nn { color: #555555 } /* Name.Namespace */ -.highlight .nt { color: #000080 } /* Name.Tag */ -.highlight .nv { color: #008080 } /* Name.Variable */ -.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ -.highlight .w { color: #bbbbbb } /* Text.Whitespace */ -.highlight .mf { color: #009999 } /* Literal.Number.Float */ -.highlight .mh { color: #009999 } /* Literal.Number.Hex */ -.highlight .mi { color: #009999 } /* Literal.Number.Integer */ -.highlight .mo { color: #009999 } /* Literal.Number.Oct */ -.highlight .sb { color: #d01040 } /* Literal.String.Backtick */ -.highlight .sc { color: #d01040 } /* Literal.String.Char */ -.highlight .sd { color: #d01040 } /* Literal.String.Doc */ -.highlight .s2 { color: #d01040 } /* Literal.String.Double */ -.highlight .se { color: #d01040 } /* Literal.String.Escape */ -.highlight .sh { color: #d01040 } /* Literal.String.Heredoc */ -.highlight .si { color: #d01040 } /* Literal.String.Interpol */ -.highlight .sx { color: #d01040 } /* Literal.String.Other */ -.highlight .sr { color: #009926 } /* Literal.String.Regex */ -.highlight .s1 { color: #d01040 } /* Literal.String.Single */ -.highlight .ss { color: #990073 } /* Literal.String.Symbol */ -.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ -.highlight .vc { color: #008080 } /* Name.Variable.Class */ -.highlight .vg { color: #008080 } /* Name.Variable.Global */ -.highlight .vi { color: #008080 } /* Name.Variable.Instance */ -.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ - -// -// Code examples (rendered) -// - -.code-example { - padding: $sp-3; - margin-bottom: $sp-3; - overflow: auto; - border: 1px solid $border-color; - border-radius: $border-radius; - - + .highlighter-rouge, - + figure.highlight { - position: relative; - margin-top: -$sp-4; - border-right: 1px solid $border-color; - border-bottom: 1px solid $border-color; - border-left: 1px solid $border-color; - border-top-left-radius: 0; - border-top-right-radius: 0; - } -} diff --git a/docs/_sass/color_schemes/dark.scss b/docs/_sass/color_schemes/dark.scss deleted file mode 100644 index 6c2e8a9c..00000000 --- a/docs/_sass/color_schemes/dark.scss +++ /dev/null @@ -1,14 +0,0 @@ - -$body-background-color: $grey-dk-300; -$sidebar-color: $grey-dk-300; -$border-color: $grey-dk-200; - -$body-text-color: $grey-lt-300; -$body-heading-color: $grey-lt-000; -$nav-child-link-color: $grey-dk-000; - -$link-color: $blue-000; -$btn-primary-color: $blue-200; -$base-button-color: $grey-dk-250; - -$code-background-color: $grey-dk-250; diff --git a/docs/_sass/content.scss b/docs/_sass/content.scss deleted file mode 100644 index 7361bfc5..00000000 --- a/docs/_sass/content.scss +++ /dev/null @@ -1,114 +0,0 @@ -@charset "UTF-8"; - -// -// Styles for rendered markdown in the .main-content container -// -// stylelint-disable selector-no-type, max-nesting-depth, selector-max-compound-selectors, selector-max-type - -.page-content { - a { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - - ul, - ol { - padding-left: 1.5em; - } - - ol { - list-style-type: none; - counter-reset: step-counter; - - > li { - position: relative; - - &::before { - position: absolute; - top: 0.2em; - left: -1.6em; - color: $grey-dk-000; - content: counter(step-counter); - counter-increment: step-counter; - @include fs-3; - - @include mq(sm) { - top: 0.11em; - } - } - - ol { - counter-reset: sub-counter; - - li { - &::before { - content: counter(sub-counter, lower-alpha); - counter-increment: sub-counter; - } - } - } - } - } - - ul { - list-style: none; - - > li { - &::before { - position: absolute; - margin-left: -1.4em; - color: $grey-dk-000; - content: "•"; - } - } - } - - .task-list { - padding-left: 0; - } - - .task-list-item { - display: flex; - align-items: center; - - &::before { - content: ""; - } - } - - .task-list-item-checkbox { - margin-right: 0.6em; - } - - hr + * { - margin-top: 0; - } - - h1:first-of-type { - margin-top: 0.5em; - } - - dl { - display: grid; - grid-template-columns: max-content 1fr; - } - - dt, - dd { - margin: 0.25em 0; - } - - dt { - text-align: right; - - &::after { - content: ":"; - } - } - - dd { - margin-left: 1em; - font-weight: 500; - } -} diff --git a/docs/_sass/custom/custom.scss b/docs/_sass/custom/custom.scss deleted file mode 100644 index 82064a55..00000000 --- a/docs/_sass/custom/custom.scss +++ /dev/null @@ -1,120 +0,0 @@ -// // -// // Typography -// // -// -// $body-font-family: -apple-system, BlinkMacSystemFont, "helvetica neue", helvetica, roboto, noto, "segoe ui", arial, sans-serif; -// $mono-font-family: "SFMono-Regular", Menlo, Consolas, Monospace; -// $root-font-size: 16px; // Base font-size for rems -// $body-line-height: 1.4; -// $body-heading-line-height: 1.15; -// -// // -// // Colors -// // -// -// $white: #fff; -// -// $grey-dk-000: #959396; -// $grey-dk-100: #5c5962; -// $grey-dk-200: #44434d; -// $grey-dk-250: #302d36 !default; -// $grey-dk-300: #27262b; -// -// $grey-lt-000: #f5f6fa; -// $grey-lt-100: #eeebee; -// $grey-lt-200: #ecebed; -// $grey-lt-300: #e6e1e8; -// -// $purple-000: #7253ed; -// $purple-100: #5e41d0; -// $purple-200: #4e26af; -// $purple-300: #381885; -// -// $blue-000: #2c84fa; -// $blue-100: #2869e6; -// $blue-200: #264caf; -// $blue-300: #183385; -// -// $green-000: #41d693; -// $green-100: #11b584; -// $green-200: #009c7b; -// $green-300: #026e57; -// -// $body-background-color: $white !default; -// $sidebar-color: $grey-lt-000 !default; -// $code-background-color: $grey-lt-000 !default; - -// $body-text-color: $grey-dk-100 !default; -// $body-heading-color: $grey-dk-300 !default; -// $nav-child-link-color: $grey-dk-100 !default; -// $link-color: $purple-000 !default; -// $btn-primary-color: $purple-100 !default; -// $base-button-color: #f7f7f7 !default; -// -// // -// // Media queries in pixels -// // -// -// $media-queries: ( -// xs: 320px, -// sm: 500px, -// md: 740px, -// lg: 1120px, -// xl: 1400px -// ); -// -// // -// // Spacing -// // -// -// $spacing-unit: 1rem; // 1rem == 16px -// -// $spacers: ( -// sp-0: 0, -// sp-1: $spacing-unit * 0.25, -// sp-2: $spacing-unit * 0.5, -// sp-3: $spacing-unit * 0.75, -// sp-4: $spacing-unit, -// sp-5: $spacing-unit * 1.5, -// sp-6: $spacing-unit * 2, -// sp-7: $spacing-unit * 2.5, -// sp-8: $spacing-unit * 3, -// sp-9: $spacing-unit * 3.5, -// sp-10: $spacing-unit * 4 -// ); -// -// $sp-1: map-get($spacers, sp-1); // 0.25 rem == 4px -// $sp-2: map-get($spacers, sp-2); // 0.5 rem == 8px -// $sp-3: map-get($spacers, sp-3); // 0.75 rem == 12px -// $sp-4: map-get($spacers, sp-4); // 1 rem == 16px -// $sp-5: map-get($spacers, sp-5); // 1.5 rem == 24px -// $sp-6: map-get($spacers, sp-6); // 2 rem == 32px -// $sp-7: map-get($spacers, sp-7); // 2.5 rem == 40px -// $sp-8: map-get($spacers, sp-8); // 3 rem == 48px -// $sp-9: map-get($spacers, sp-9); // 4 rem == 48px -// $sp-10: map-get($spacers, sp-10); // 4.5 rem == 48px -// -// // -// // Borders -// // -// -// $border: 1px solid; -// $border-radius: 4px; -// $border-color: $grey-lt-100; -// -// // -// // Grid system -// // -// -// $gutter-spacing: $sp-6; -// $gutter-spacing-sm: $sp-4; -// $nav-width: 232px; -// $content-width: 800px; -// -// $media-queries: ( -// xs: 320px, -// sm: 500px, -// md: 740px, -// lg: 800px, -// xl: 1316px -// ); diff --git a/docs/_sass/labels.scss b/docs/_sass/labels.scss deleted file mode 100644 index 23cc5101..00000000 --- a/docs/_sass/labels.scss +++ /dev/null @@ -1,36 +0,0 @@ -// -// Labels (not the form kind) -// - -.label, -.label-blue { - display: inline-block; - padding-top: 0.16em; - padding-right: 0.42em; - padding-bottom: 0.16em; - padding-left: 0.42em; - margin-right: $sp-1; - margin-left: $sp-1; - color: $white; - text-transform: uppercase; - vertical-align: middle; - background-color: $blue-100; - @include fs-2; -} - -.label-green { - background-color: $green-200; -} - -.label-purple { - background-color: $purple-100; -} - -.label-red { - background-color: $red-200; -} - -.label-yellow { - color: $grey-dk-200; - background-color: $yellow-200; -} diff --git a/docs/_sass/layout.scss b/docs/_sass/layout.scss deleted file mode 100644 index 11be435c..00000000 --- a/docs/_sass/layout.scss +++ /dev/null @@ -1,147 +0,0 @@ -// -// The basic two column layout -// - -.page-wrap { - @include mq(md) { - position: absolute; - top: 0; - left: 0; - display: flex; - width: 100%; - height: 100%; - overflow-x: hidden; - overflow-y: hidden; - } -} - -.side-bar { - z-index: 100; - display: flex; - flex-wrap: wrap; - padding-top: $gutter-spacing-sm; - padding-bottom: $gutter-spacing-sm; - background-color: $sidebar-color; - - @include mq(md) { - flex-wrap: nowrap; - position: absolute; - width: $nav-width + 16px; - height: 100%; - padding-top: $gutter-spacing * 2; - padding-bottom: 0; - flex-direction: column; - border-right: $border $border-color; - align-items: flex-end; - } - - @include mq(lg) { - width: calc((100% - #{$nav-width + $content-width}) / 2 + #{$nav-width}); - min-width: $nav-width; - } -} - -.main-content-wrap { - @include mq(md) { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - min-height: 600px; - -webkit-overflow-scrolling: touch; - overflow-x: hidden; - overflow-y: scroll; - } -} - -.main-content { - padding-top: $gutter-spacing-sm; - @include container; - - @include mq(md) { - position: relative; - max-width: $content-width; - padding-top: $gutter-spacing; - padding-bottom: $gutter-spacing; - padding-left: $gutter-spacing * 1.5; - margin-left: $nav-width; - } - - @include mq(lg) { - padding-left: $gutter-spacing; - margin-left: calc((100% - #{$nav-width + $content-width}) / 2 + #{$nav-width}); - } -} - -.js-main-content:focus { - outline: none; -} - -.page-header { - background-color: $sidebar-color; - - @include mq(md) { - background-color: $body-background-color; - } - - .main-content { - padding-top: 0; - - @include mq(md) { - display: flex; - justify-content: flex-end; - height: 60px; - padding-top: $sp-4; - padding-bottom: $sp-4; - border-bottom: $border $border-color; - } - } -} - -.navigation, -.site-title, -.site-footer { - - @include container; - - width: 100%; - - @include mq(lg) { - width: $nav-width + 32px; - } -} - -.navigation { - @include mq(md) { - padding-top: $sp-8; - overflow-y: auto; - flex: 1 1 auto; - } -} - -// stylelint-disable selector-no-type -body { - position: relative; - padding-bottom: $sp-10; - - @include mq(md) { - position: static; - padding-bottom: 0; - } -} -// stylelint-enable selector-no-type - -.site-footer { - position: absolute; - bottom: 0; - padding-top: $sp-4; - padding-bottom: $sp-4; - - @include mq(md) { - position: static; - align-self: flex-end; - justify-self: end; - background-color: $sidebar-color; - } -} diff --git a/docs/_sass/navigation.scss b/docs/_sass/navigation.scss deleted file mode 100644 index 200b886f..00000000 --- a/docs/_sass/navigation.scss +++ /dev/null @@ -1,152 +0,0 @@ -// -// Main nav, breadcrumb, etc... -// - -.site-title { - display: block; - flex: 1 1 auto; - color: $body-heading-color; - background-color: $sidebar-color; - - @include mq(md) { - position: absolute; - top: 0; - right: 0; - z-index: 101; - height: 60px; - padding-top: $sp-4; - border-bottom: $border $border-color; - } -} - -.navigation-list { - padding: 0; - margin-top: $sp-4; - margin-bottom: 0; - list-style: none; - - @include mq(md) { - margin-top: 0; - } -} - -.navigation-list-child-list { - padding-left: $sp-3; - list-style: none; - - .navigation-list-link { - color: $nav-child-link-color; - } - - .navigation-list-item { - position: relative; - - &::before { - position: absolute; - margin-top: 0.3em; - margin-left: -0.8em; - color: rgba($body-text-color, 0.3); - content: "- "; - } - - &.active { - &::before { - color: $body-text-color; - } - } - } -} - -.navigation-list-item { - @include fs-4; - margin: 0; - - @include mq(md) { - @include fs-3; - } - - .navigation-list-child-list { - display: none; - } - - &.active { - .navigation-list-child-list { - display: block; - } - } -} - -.navigation-list-link { - display: block; - padding-top: $sp-1; - padding-bottom: $sp-1; - - &.active { - font-weight: 600; - color: $body-heading-color; - text-decoration: none; - } -} - -// Small screen nav - -.main-nav, -.aux-nav { - display: none; - - &.nav-open { - display: block; - } - @include mq(md) { - display: block; - } -} - -.aux-nav li { - display: inline-block; -} - -.navigation-list-toggle { - position: absolute; - right: $sp-4; - - @include mq(md) { - display: none !important; - } -} - -// Breadcrumb nav -.breadcrumb-nav { - @include mq(md) { - margin-top: -$sp-4; - } -} - -.breadcrumb-nav-list { - padding-left: 0; - margin-bottom: $sp-3; - list-style: none; -} - -.breadcrumb-nav-list-item { - display: table-cell; - @include fs-2; - - &::before { - display: none; - } - - &::after { - display: inline-block; - margin-right: $sp-2; - margin-left: $sp-2; - color: $grey-dk-000; - content: "/"; - } - - &:last-child { - &::after { - content: ""; - } - } -} diff --git a/docs/_sass/search.scss b/docs/_sass/search.scss deleted file mode 100644 index 32ec1dbe..00000000 --- a/docs/_sass/search.scss +++ /dev/null @@ -1,114 +0,0 @@ -// -// Search input and autocomplete -// - -.search { - position: relative; - z-index: 99; - display: none; - flex-grow: 1; - padding: $sp-2; - margin-bottom: $sp-3; - background-color: $white; - border-radius: 3px; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07), 0 3px 10px rgba(0, 0, 0, 0.05); - - @include mq(md) { - display: block; - padding-top: $sp-1; - padding-right: 0; - padding-bottom: 0; - padding-left: 0; - margin-bottom: 0; - background-color: transparent; - box-shadow: none; - } - - &.nav-open { - display: block; - } -} - -.search-results-wrap { - display: none; - - &.active { - position: absolute; - top: $sp-1; - z-index: 100; - display: block; - width: 300px; - margin-top: $gutter-spacing; - background: lighten($body-background-color, 1%); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 4px 14px rgba(0, 0, 0, 0.05); - } -} - -.search-input-wrap { - display: flex; - background-color: $body-background-color; -} - -.search-input { - width: 100%; - padding-top: $sp-1; - padding-bottom: $sp-1; - background-color: $body-background-color; - border-top: 0; - border-right: 0; - border-bottom: 0; - border-left: 0; - order: 2; - - &:focus { - outline: 0; - box-shadow: none; - - + .search-icon { - fill: $link-color; - } - } - - @include fs-5; - - @include mq(sm) { - @include fs-3; - } - - @include mq(md) { - @include fs-2; - } -} - -.search-icon { - align-self: center; - margin-right: $sp-2; - fill: $grey-dk-000; - order: 1; -} - -.search-results-list { - padding-left: 0; - margin-top: $sp-1; - margin-bottom: $sp-1; - list-style: none; - @include fs-3; -} - -.search-results-list-item { - padding: 0; - margin: 0; -} - -.search-results-link { - display: block; - padding-top: $sp-1; - padding-right: $sp-3; - padding-bottom: $sp-1; - padding-left: $sp-3; - - &:hover { - color: $body-heading-color; - background-color: darken($body-background-color, 2%); - } -} diff --git a/docs/_sass/support/_functions.scss b/docs/_sass/support/_functions.scss deleted file mode 100644 index e9885f62..00000000 --- a/docs/_sass/support/_functions.scss +++ /dev/null @@ -1,10 +0,0 @@ -@function rem($size, $unit:"") { - $remSize: $size / $root-font-size; - - @if ($unit == false) { - @return #{$remSize}; - } - @else { - @return #{$remSize}rem; - } -} diff --git a/docs/_sass/support/_variables.scss b/docs/_sass/support/_variables.scss deleted file mode 100644 index 8a09eda3..00000000 --- a/docs/_sass/support/_variables.scss +++ /dev/null @@ -1,130 +0,0 @@ -// -// Typography -// - -$body-font-family: -apple-system, BlinkMacSystemFont, "helvetica neue", helvetica, roboto, noto, "segoe ui", arial, sans-serif !default; -$mono-font-family: "SFMono-Regular", Menlo, Consolas, Monospace !default; -$root-font-size: 16px !default; // Base font-size for rems -$body-line-height: 1.4 !default; -$body-heading-line-height: 1.15 !default !default; - -// -// Colors -// - -$white: #fff !default; - -$grey-dk-000: #959396 !default; -$grey-dk-100: #5c5962 !default; -$grey-dk-200: #44434d !default; -$grey-dk-250: #302d36 !default; -$grey-dk-300: #27262b !default; - -$grey-lt-000: #f5f6fa !default; -$grey-lt-100: #eeebee !default; -$grey-lt-200: #ecebed !default; -$grey-lt-300: #e6e1e8 !default; - -$purple-000: #7253ed !default; -$purple-100: #5e41d0 !default; -$purple-200: #4e26af !default; -$purple-300: #381885 !default; - -$blue-000: #2c84fa !default; -$blue-100: #2869e6 !default; -$blue-200: #264caf !default; -$blue-300: #183385 !default; - -$green-000: #41d693 !default; -$green-100: #11b584 !default; -$green-200: #009c7b !default; -$green-300: #026e57 !default; - -$yellow-000: #ffeb82 !default; -$yellow-100: #fadf50 !default; -$yellow-200: #f7d12e !default; -$yellow-300: #e7af06 !default; - -$red-000: #f77e7e !default; -$red-100: #f96e65 !default; -$red-200: #e94c4c !default; -$red-300: #dd2e2e !default; - -$body-background-color: $white !default; -$sidebar-color: $grey-lt-000 !default; -$code-background-color: $grey-lt-000 !default; - -$body-text-color: $grey-dk-100 !default; -$body-heading-color: $grey-dk-300 !default; -$nav-child-link-color: $grey-dk-100 !default; -$link-color: $purple-000 !default; -$btn-primary-color: $purple-100 !default; -$base-button-color: #f7f7f7 !default; - -// -// Media queries in pixels -// - -$media-queries: ( - xs: 320px, - sm: 500px, - md: 740px, - lg: 1120px, - xl: 1400px -) !default; - -// -// Spacing -// - -$spacing-unit: 1rem; // 1rem == 16px - -$spacers: ( - sp-0: 0, - sp-1: $spacing-unit * 0.25, - sp-2: $spacing-unit * 0.5, - sp-3: $spacing-unit * 0.75, - sp-4: $spacing-unit, - sp-5: $spacing-unit * 1.5, - sp-6: $spacing-unit * 2, - sp-7: $spacing-unit * 2.5, - sp-8: $spacing-unit * 3, - sp-9: $spacing-unit * 3.5, - sp-10: $spacing-unit * 4 -) !default; - -$sp-1: map-get($spacers, sp-1) !default; // 0.25 rem == 4px -$sp-2: map-get($spacers, sp-2) !default; // 0.5 rem == 8px -$sp-3: map-get($spacers, sp-3) !default; // 0.75 rem == 12px -$sp-4: map-get($spacers, sp-4) !default; // 1 rem == 16px -$sp-5: map-get($spacers, sp-5) !default; // 1.5 rem == 24px -$sp-6: map-get($spacers, sp-6) !default; // 2 rem == 32px -$sp-7: map-get($spacers, sp-7) !default; // 2.5 rem == 40px -$sp-8: map-get($spacers, sp-8) !default; // 3 rem == 48px -$sp-9: map-get($spacers, sp-9) !default; // 4 rem == 48px -$sp-10: map-get($spacers, sp-10) !default; // 4.5 rem == 48px - -// -// Borders -// - -$border: 1px solid !default; -$border-radius: 4px !default; -$border-color: $grey-lt-100 !default; - -// -// Grid system -// - -$gutter-spacing: $sp-6 !default; -$gutter-spacing-sm: $sp-4 !default; -$nav-width: 232px !default; -$content-width: 800px !default; - -$media-queries: ( - xs: 320px, - sm: 500px, - md: 740px, - lg: 800px, - xl: 1316px -) !default; diff --git a/docs/_sass/support/mixins/_buttons.scss b/docs/_sass/support/mixins/_buttons.scss deleted file mode 100644 index e3e6c4fb..00000000 --- a/docs/_sass/support/mixins/_buttons.scss +++ /dev/null @@ -1,27 +0,0 @@ -// Colored button - -@mixin btn-color($fg, $bg) { - color: $fg; - background-color: darken($bg, 2%); - background-image: linear-gradient(lighten($bg, 5%), darken($bg, 2%)); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), 0 4px 10px rgba(0, 0, 0, 0.12); - - &:hover, - &.zeroclipboard-is-hover { - color: $fg; - background-color: darken($bg, 4%); - background-image: linear-gradient((lighten($bg, 2%), darken($bg, 4%))); - } - - &:active, - &.selected, - &.zeroclipboard-is-active { - background-color: darken($bg, 5%); - background-image: none; - box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15); - } - - &.selected:hover { - background-color: darken($bg, 10%); - } -} diff --git a/docs/_sass/support/mixins/_layout.scss b/docs/_sass/support/mixins/_layout.scss deleted file mode 100644 index 7e7967e4..00000000 --- a/docs/_sass/support/mixins/_layout.scss +++ /dev/null @@ -1,36 +0,0 @@ -// Media query - -// Media query mixin -// Usage: -// @include mq(md) { -// ..medium and up styles -// } -@mixin mq($name) { - // Retrieves the value from the key - $value: map-get($media-queries, $name); - - // If the key exists in the map - @if $value != null { - // Prints a media query based on the value - @media (min-width: rem($value)) { - @content; - } - } - - @else { - @warn "No value could be retrieved from `#{$media-query}`. " - + "Please make sure it is defined in `$media-queries` map."; - } -} - -// Responsive container - -@mixin container { - padding-right: $gutter-spacing-sm; - padding-left: $gutter-spacing-sm; - - @include mq(md) { - padding-right: $gutter-spacing; - padding-left: $gutter-spacing; - } -} diff --git a/docs/_sass/support/mixins/_typography.scss b/docs/_sass/support/mixins/_typography.scss deleted file mode 100644 index e6d85bea..00000000 --- a/docs/_sass/support/mixins/_typography.scss +++ /dev/null @@ -1,81 +0,0 @@ -// Font size - -@mixin fs-1 { - font-size: 9px !important; - - @include mq(sm) { - font-size: 10px !important; - } -} - -@mixin fs-2 { - font-size: 11px !important; - - @include mq(sm) { - font-size: 12px !important; - } -} - -@mixin fs-3 { - font-size: 12px !important; - - @include mq(sm) { - font-size: 14px !important; - } -} - -@mixin fs-4 { - font-size: 14px !important; - - @include mq(sm) { - font-size: 16px !important; - } -} - -@mixin fs-5 { - font-size: 16px !important; - - @include mq(sm) { - font-size: 18px !important; - } -} - -@mixin fs-6 { - font-size: 18px !important; - - @include mq(sm) { - font-size: 24px !important; - } -} - -@mixin fs-7 { - font-size: 24px !important; - - @include mq(sm) { - font-size: 32px !important; - } -} - -@mixin fs-8 { - font-size: 32px !important; - - @include mq(sm) { - font-size: 36px !important; - } -} - -@mixin fs-9 { - font-size: 36px !important; - - @include mq(sm) { - font-size: 42px !important; - } -} - -@mixin fs-10 { - font-size: 42px !important; - - @include mq(sm) { - font-size: 48px !important; - } -} diff --git a/docs/_sass/support/mixins/mixins.scss b/docs/_sass/support/mixins/mixins.scss deleted file mode 100644 index 0506fbf5..00000000 --- a/docs/_sass/support/mixins/mixins.scss +++ /dev/null @@ -1,3 +0,0 @@ -@import "./layout"; -@import "./buttons"; -@import "./typography"; diff --git a/docs/_sass/support/support.scss b/docs/_sass/support/support.scss deleted file mode 100644 index 8131a320..00000000 --- a/docs/_sass/support/support.scss +++ /dev/null @@ -1,3 +0,0 @@ -@import "./variables"; -@import "./functions"; -@import "./mixins/mixins"; diff --git a/docs/_sass/tables.scss b/docs/_sass/tables.scss deleted file mode 100644 index 39bc0dc3..00000000 --- a/docs/_sass/tables.scss +++ /dev/null @@ -1,78 +0,0 @@ -// -// Tables -// -// stylelint-disable max-nesting-depth, selector-no-type, selector-max-type - -table { - display: block; - width: 100%; - max-width: 100%; - margin-bottom: $sp-5; - overflow-x: auto; - border-collapse: separate; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 4px 14px rgba(0, 0, 0, 0.05); - - @include mq(sm) { - display: table; - } -} - -th, -td { - @include fs-3; - min-width: 120px; - padding-top: $sp-2; - padding-right: $sp-3; - padding-bottom: $sp-2; - padding-left: $sp-3; - background-color: lighten($body-background-color, 2%); - border-bottom: $border rgba($border-color, 0.5); - border-left: $border $border-color; - - &:first-of-type { - border-left: 0; - } -} - -thead, -tbody:first-child { - tr { - &:first-of-type { - th, - td { - &:first-of-type { - border-top-left-radius: $border-radius; - } - - &:last-of-type { - border-top-right-radius: $border-radius; - } - } - } - } -} - -tbody { - tr { - &:last-of-type { - th, - td { - border-bottom: 0; - - &:first-of-type { - border-bottom-left-radius: $border-radius; - } - - &:last-of-type { - border-bottom-right-radius: $border-radius; - } - } - } - } -} - -thead { - th { - border-bottom: 1px solid $border-color; - } -} diff --git a/docs/_sass/typography.scss b/docs/_sass/typography.scss deleted file mode 100644 index ac1eed98..00000000 --- a/docs/_sass/typography.scss +++ /dev/null @@ -1,58 +0,0 @@ -// -// Typography -// -// stylelint-disable primer/selector-no-utility, selector-no-type, selector-max-type - -h1, -.text-alpha { - @include fs-8; - font-weight: 300; -} - -h2, -.text-beta { - @include fs-6; -} - -h3, -.text-gamma { - @include fs-5; -} - -h4, -.text-delta { - @include fs-2; - font-weight: 300; - text-transform: uppercase; - letter-spacing: 0.1em; -} - -h5, -.text-epsilon { - @include fs-3; - color: $grey-dk-200; -} - -h6, -.text-zeta { - @include fs-2; - color: $grey-dk-200; -} - -li { - .highlight { - margin-top: $sp-2; - } -} - -.text-small { - @include fs-2; -} - -.text-mono { - font-family: $mono-font-family !important; -} - -.text-center { - text-align: center !important; -} diff --git a/docs/_sass/utilities/_colors.scss b/docs/_sass/utilities/_colors.scss deleted file mode 100644 index f3607ab8..00000000 --- a/docs/_sass/utilities/_colors.scss +++ /dev/null @@ -1,239 +0,0 @@ -// -// Utility classes for colors -// - -// Text colors - -.text-grey-dk-000 { - color: $grey-dk-000 !important; -} - -.text-grey-dk-100 { - color: $grey-dk-100 !important; -} - -.text-grey-dk-200 { - color: $grey-dk-200 !important; -} - -.text-grey-dk-250 { - color: $grey-dk-250 !important; -} - -.text-grey-dk-300 { - color: $grey-dk-300 !important; -} - -.text-grey-lt-000 { - color: $grey-lt-000 !important; -} - -.text-grey-lt-100 { - color: $grey-lt-100 !important; -} - -.text-grey-lt-200 { - color: $grey-lt-200 !important; -} - -.text-grey-lt-300 { - color: $grey-lt-300 !important; -} - -.text-blue-000 { - color: $blue-000 !important; -} - -.text-blue-100 { - color: $blue-100 !important; -} - -.text-blue-200 { - color: $blue-200 !important; -} - -.text-blue-300 { - color: $blue-300 !important; -} - -.text-green-000 { - color: $green-000 !important; -} - -.text-green-100 { - color: $green-100 !important; -} - -.text-green-200 { - color: $green-200 !important; -} - -.text-green-300 { - color: $green-300 !important; -} - -.text-purple-000 { - color: $purple-000 !important; -} - -.text-purple-100 { - color: $purple-100 !important; -} - -.text-purple-200 { - color: $purple-200 !important; -} - -.text-purple-300 { - color: $purple-300 !important; -} - -.text-yellow-000 { - color: $yellow-000 !important; -} - -.text-yellow-100 { - color: $yellow-100 !important; -} - -.text-yellow-200 { - color: $yellow-200 !important; -} - -.text-yellow-300 { - color: $yellow-300 !important; -} - -.text-red-000 { - color: $red-000 !important; -} - -.text-red-100 { - color: $red-100 !important; -} - -.text-red-200 { - color: $red-200 !important; -} - -.text-red-300 { - color: $red-300 !important; -} - -// Background colors - -.bg-grey-dk-000 { - background-color: $grey-dk-000 !important; -} - -.bg-grey-dk-100 { - background-color: $grey-dk-100 !important; -} - -.bg-grey-dk-200 { - background-color: $grey-dk-200 !important; -} - -.bg-grey-dk-250 { - background-color: $grey-dk-250 !important; -} - -.bg-grey-dk-300 { - background-color: $grey-dk-300 !important; -} - -.bg-grey-lt-000 { - background-color: $grey-lt-000 !important; -} - -.bg-grey-lt-100 { - background-color: $grey-lt-100 !important; -} - -.bg-grey-lt-200 { - background-color: $grey-lt-200 !important; -} - -.bg-grey-lt-300 { - background-color: $grey-lt-300 !important; -} - -.bg-blue-000 { - background-color: $blue-000 !important; -} - -.bg-blue-100 { - background-color: $blue-100 !important; -} - -.bg-blue-200 { - background-color: $blue-200 !important; -} - -.bg-blue-300 { - background-color: $blue-300 !important; -} - -.bg-green-000 { - background-color: $green-000 !important; -} - -.bg-green-100 { - background-color: $green-100 !important; -} - -.bg-green-200 { - background-color: $green-200 !important; -} - -.bg-green-300 { - background-color: $green-300 !important; -} - -.bg-purple-000 { - background-color: $purple-000 !important; -} - -.bg-purple-100 { - background-color: $purple-100 !important; -} - -.bg-purple-200 { - background-color: $purple-200 !important; -} - -.bg-purple-300 { - background-color: $purple-300 !important; -} - -.bg-yellow-000 { - background-color: $yellow-000 !important; -} - -.bg-yellow-100 { - background-color: $yellow-100 !important; -} - -.bg-yellow-200 { - background-color: $yellow-200 !important; -} - -.bg-yellow-300 { - background-color: $yellow-300 !important; -} - -.bg-red-000 { - background-color: $red-000 !important; -} - -.bg-red-100 { - background-color: $red-100 !important; -} - -.bg-red-200 { - background-color: $red-200 !important; -} - -.bg-red-300 { - background-color: $red-300 !important; -} diff --git a/docs/_sass/utilities/_layout.scss b/docs/_sass/utilities/_layout.scss deleted file mode 100644 index d16ed5a9..00000000 --- a/docs/_sass/utilities/_layout.scss +++ /dev/null @@ -1,38 +0,0 @@ -// stylelint-disable primer/selector-no-utility -// -// Utility classes for layout -// - -// Display - -.d-block { display: block !important; } -.d-flex { display: flex !important; } -.d-inline { display: inline !important; } -.d-inline-block { display: inline-block !important; } -.d-none { display: none !important; } - -@each $media-query in map-keys($media-queries) { - @for $i from 1 through length($spacers) { - @include mq($media-query) { - $size: #{map-get($spacers, sp-#{$i - 1})}; - $scale: #{$i - 1}; - - // .d-sm-block, .d-md-none, .d-lg-inline - .d-#{$media-query}-block { display: block !important; } - .d-#{$media-query}-flex { display: flex !important; } - .d-#{$media-query}-inline { display: inline !important; } - .d-#{$media-query}-inline-block { display: inline-block !important; } - .d-#{$media-query}-none { display: none !important; } - - } - } -} - -// Vertical alignment - -.v-align-baseline { vertical-align: baseline !important; } -.v-align-bottom { vertical-align: bottom !important; } -.v-align-middle { vertical-align: middle !important; } -.v-align-text-bottom { vertical-align: text-bottom !important; } -.v-align-text-top { vertical-align: text-top !important; } -.v-align-top { vertical-align: top !important; } diff --git a/docs/_sass/utilities/_lists.scss b/docs/_sass/utilities/_lists.scss deleted file mode 100644 index 0c5bcad7..00000000 --- a/docs/_sass/utilities/_lists.scss +++ /dev/null @@ -1,11 +0,0 @@ -// -// Utility classes for lists -// - -// stylelint-disable primer/selector-no-utility - -.list-style-none { - padding: 0 !important; - margin: 0 !important; - list-style: none !important; -} diff --git a/docs/_sass/utilities/_spacing.scss b/docs/_sass/utilities/_spacing.scss deleted file mode 100644 index 9b428169..00000000 --- a/docs/_sass/utilities/_spacing.scss +++ /dev/null @@ -1,121 +0,0 @@ -// -// Utility classes for margins and padding -// - -// scss-lint:disable SpaceAfterPropertyName -// stylelint-disable block-opening-brace-space-after, block-opening-brace-space-before, primer/selector-no-utility - -// Margin spacer utilities - -@for $i from 1 through length($spacers) { - $size: #{map-get($spacers, sp-#{$i - 1})}; - $scale: #{$i - 1}; - - // .m-0, .m-1, .m-2... - .m-#{$scale} { margin: #{$size} !important; } - .mt-#{$scale} { margin-top: #{$size} !important; } - .mr-#{$scale} { margin-right: #{$size} !important; } - .mb-#{$scale} { margin-bottom: #{$size} !important; } - .ml-#{$scale} { margin-left: #{$size} !important; } - - .mx-#{$scale} { - margin-right: #{$size} !important; - margin-left: #{$size} !important; - } - - .my-#{$scale} { - margin-top: #{$size} !important; - margin-bottom: #{$size} !important; - } - - .mxn-#{$scale} { - margin-right: -#{$size} !important; - margin-left: -#{$size} !important; - } -} - -.mx-auto { - margin-right: auto !important; - margin-left: auto !important; -} - -@each $media-query in map-keys($media-queries) { - @for $i from 1 through length($spacers) { - @include mq($media-query) { - $size: #{map-get($spacers, sp-#{$i - 1})}; - $scale: #{$i - 1}; - - // .m-sm-0, .m-md-1, .m-lg-2... - .m-#{$media-query}-#{$scale} { margin: #{$size} !important; } - .mt-#{$media-query}-#{$scale} { margin-top: #{$size} !important; } - .mr-#{$media-query}-#{$scale} { margin-right: #{$size} !important; } - .mb-#{$media-query}-#{$scale} { margin-bottom: #{$size} !important; } - .ml-#{$media-query}-#{$scale} { margin-left: #{$size} !important; } - - .mx-#{$media-query}-#{$scale} { - margin-right: #{$size} !important; - margin-left: #{$size} !important; - } - - .my-#{$media-query}-#{$scale} { - margin-top: #{$size} !important; - margin-bottom: #{$size} !important; - } - - .mxn-#{$media-query}-#{$scale} { - margin-right: -#{$size} !important; - margin-left: -#{$size} !important; - } - } - } -} - -// Padding spacer utilities - -@for $i from 1 through length($spacers) { - $size: #{map-get($spacers, sp-#{$i - 1})}; - $scale: #{$i - 1}; - - // .p-0, .p-1, .p-2... - .p-#{$scale} { padding: #{$size} !important; } - .pt-#{$scale} { padding-top: #{$size} !important; } - .pr-#{$scale} { padding-right: #{$size} !important; } - .pb-#{$scale} { padding-bottom: #{$size} !important; } - .pl-#{$scale} { padding-left: #{$size} !important; } - - .px-#{$scale} { - padding-right: #{$size} !important; - padding-left: #{$size} !important; - } - - .py-#{$scale} { - padding-top: #{$size} !important; - padding-bottom: #{$size} !important; - } -} - -@each $media-query in map-keys($media-queries) { - @include mq($media-query) { - @for $i from 1 through length($spacers) { - $size: #{map-get($spacers, sp-#{$i - 1})}; - $scale: #{$i - 1}; - - // .p-sm-0, .p-md-1, .p-lg-2... - .p-#{$media-query}-#{$scale} { padding: #{$size} !important; } - .pt-#{$media-query}-#{$scale} { padding-top: #{$size} !important; } - .pr-#{$media-query}-#{$scale} { padding-right: #{$size} !important; } - .pb-#{$media-query}-#{$scale} { padding-bottom: #{$size} !important; } - .pl-#{$media-query}-#{$scale} { padding-left: #{$size} !important; } - - .px-#{$media-query}-#{$scale} { - padding-right: #{$size} !important; - padding-left: #{$size} !important; - } - - .py-#{$media-query}-#{$scale} { - padding-top: #{$size} !important; - padding-bottom: #{$size} !important; - } - } - } -} diff --git a/docs/_sass/utilities/_typography.scss b/docs/_sass/utilities/_typography.scss deleted file mode 100644 index 7206deff..00000000 --- a/docs/_sass/utilities/_typography.scss +++ /dev/null @@ -1,91 +0,0 @@ -// -// Utility classes for typography -// - -// stylelint-disable primer/selector-no-utility - -.fs-1 { - @include fs-1; -} - -.fs-2 { - @include fs-2; -} - -.fs-3 { - @include fs-3; -} - -.fs-4 { - @include fs-4; -} - -.fs-5 { - @include fs-5; -} - -.fs-6 { - @include fs-6; -} - -.fs-7 { - @include fs-7; -} - -.fs-8 { - @include fs-8; -} - -.fs-9 { - @include fs-9; -} - -.fs-10 { - @include fs-10; -} - -.fw-300 { - font-weight: 300 !important; -} - -.fw-400 { - font-weight: 400 !important; -} - -.fw-500 { - font-weight: 500 !important; -} - -.fw-700 { - font-weight: 700 !important; -} - -.lh-0 { - line-height: 0 !important; -} - -.lh-default { - line-height: $body-line-height; -} - -.lh-tight { - line-height: $body-heading-line-height; -} - -.ls-5 { - letter-spacing: 0.05em !important; -} - -.ls-10 { - letter-spacing: 0.1em !important; -} - -.ls-0 { - letter-spacing: 0 !important; -} - -.text-uppercase { - text-transform: uppercase !important; -} - -// stylelint-enable primer/selector-no-utility diff --git a/docs/_sass/utilities/utilities.scss b/docs/_sass/utilities/utilities.scss deleted file mode 100644 index 6c25bdfa..00000000 --- a/docs/_sass/utilities/utilities.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import "./colors"; -@import "./layout"; -@import "./typography"; -@import "./lists"; -@import "./spacing"; diff --git a/docs/_sass/vendor/normalize.scss/README.md b/docs/_sass/vendor/normalize.scss/README.md deleted file mode 100644 index 36cc1c6a..00000000 --- a/docs/_sass/vendor/normalize.scss/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# normalize.scss v0.1.0 - -Normalize.scss is the SCSS version of [normalize.css](http://necolas.github.io/normalize.css), a customisable CSS file that makes browsers render all elements more consistently and in line with modern standards. - -[View the normalize.css test file](http://necolas.github.io/normalize.css/latest/test.html) - -## Install - -* [npm](http://npmjs.org/): `npm install --save normalize.scss` -* [Component(1)](https://github.com/component/component/): `component install guerrero/normalize.scss` -* [Bower](http://bower.io/): `bower install --save normalize.scss` -* Download: Go to [this link](https://raw.githubusercontent.com/guerrero/normalize.scss/master/normalize.scss), press right-click on the page and choose "Save as..." - -No other styles should come before Normalize.scss. - -It's recommendable to modify `normalize.scss` to suit it to your project - -## What does it do? - -* Preserves useful defaults, unlike many CSS resets. -* Normalizes styles for a wide range of elements. -* Corrects bugs and common browser inconsistencies. -* Improves usability with subtle improvements. -* Explains what code does using detailed comments. - -## Browser support - -* Google Chrome (latest) -* Mozilla Firefox (latest) -* Mozilla Firefox 4 -* Opera (latest) -* Apple Safari 6+ -* Internet Explorer 8+ - -[Normalize.css v1 provides legacy browser -support](https://github.com/necolas/normalize.css/tree/v1) (IE 6+, Safari 4+), -but is no longer actively developed. - -## Extended details - -Additional detail and explanation of the esoteric parts of normalize.css. - -#### `pre, code, kbd, samp` - -The `font-family: monospace, monospace` hack fixes the inheritance and scaling -of font-size for preformated text. The duplication of `monospace` is -intentional. [Source](http://en.wikipedia.org/wiki/User:Davidgothberg/Test59). - -#### `sub, sup` - -Normally, using `sub` or `sup` affects the line-box height of text in all -browsers. [Source](http://gist.github.com/413930). - -#### `svg:not(:root)` - -Adding `overflow: hidden` fixes IE9's SVG rendering. Earlier versions of IE -don't support SVG, so we can safely use the `:not()` and `:root` selectors that -modern browsers use in the default UA stylesheets to apply this style. [SVG -Mailing List discussion](http://lists.w3.org/Archives/Public/public-svg-wg/2008JulSep/0339.html) - -#### `input[type="search"]` - -The search input is not fully stylable by default. In Chrome and Safari on -OSX/iOS you can't control `font`, `padding`, `border`, or `background`. In -Chrome and Safari on Windows you can't control `border` properly. It will apply -`border-width` but will only show a border color (which cannot be controlled) -for the outer 1px of that border. Applying `-webkit-appearance: textfield` -addresses these issues without removing the benefits of search inputs (e.g. -showing past searches). - -#### `legend` - -Adding `border: 0` corrects an IE 8–11 bug where `color` (yes, `color`) is not -inherited by `legend`. - -## Acknowledgements - -Normalize.scss is a project by [Alex Guerrero](https://github.com/guerrero) based on [normalize.css](http://necolas.github.io/normalize.css) from [Nicolas Gallagher](https://github.com/necolas), co-created with [Jonathan Neal](https://github.com/jonathantneal). diff --git a/docs/_sass/vendor/normalize.scss/normalize.scss b/docs/_sass/vendor/normalize.scss/normalize.scss deleted file mode 100644 index ce38a4fa..00000000 --- a/docs/_sass/vendor/normalize.scss/normalize.scss +++ /dev/null @@ -1,427 +0,0 @@ -/*! normalize.scss v0.1.0 | MIT License | based on git.io/normalize */ - -/** - * 1. Set default font family to sans-serif. - * 2. Prevent iOS text size adjust after orientation change, without disabling - * user zoom. - */ - -html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/** - * Remove default margin. - */ - -body { - margin: 0; -} - -/* HTML5 display definitions - ========================================================================== */ - -/** - * Correct `block` display not defined for any HTML5 element in IE 8/9. - * Correct `block` display not defined for `details` or `summary` in IE 10/11 - * and Firefox. - * Correct `block` display not defined for `main` in IE 11. - */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -menu, -nav, -section, -summary { - display: block; -} - -/** - * 1. Correct `inline-block` display not defined in IE 8/9. - * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. - */ - -audio, -canvas, -progress, -video { - display: inline-block; /* 1 */ - vertical-align: baseline; /* 2 */ -} - -/** - * Prevent modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Address `[hidden]` styling not present in IE 8/9/10. - * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. - */ - -[hidden], -template { - display: none; -} - -/* Links - ========================================================================== */ - -/** - * Remove the gray background color from active links in IE 10. - */ - -a { - background-color: transparent; -} - -/** - * Improve readability when focused and also mouse hovered in all browsers. - */ - -a:active, -a:hover { - outline: 0; -} - -/* Text-level semantics - ========================================================================== */ - -/** - * Address styling not present in IE 8/9/10/11, Safari, and Chrome. - */ - -abbr[title] { - border-bottom: 1px dotted; -} - -/** - * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. - */ - -b, -strong { - font-weight: bold; -} - -/** - * Address styling not present in Safari and Chrome. - */ - -dfn { - font-style: italic; -} - -/** - * Address variable `h1` font-size and margin within `section` and `article` - * contexts in Firefox 4+, Safari, and Chrome. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -/** - * Address styling not present in IE 8/9. - */ - -mark { - background: #ff0; - color: #000; -} - -/** - * Address inconsistent and variable font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` affecting `line-height` in all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -/* Embedded content - ========================================================================== */ - -/** - * Remove border when inside `a` element in IE 8/9/10. - */ - -img { - border: 0; -} - -/** - * Correct overflow not hidden in IE 9/10/11. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* Grouping content - ========================================================================== */ - -/** - * Address margin not present in IE 8/9 and Safari. - */ - -figure { - margin: 1em 40px; -} - -/** - * Address differences between Firefox and other browsers. - */ - -hr { - -moz-box-sizing: content-box; - box-sizing: content-box; - height: 0; -} - -/** - * Contain overflow in all browsers. - */ - -pre { - overflow: auto; -} - -/** - * Address odd `em`-unit font size rendering in all browsers. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; -} - -/* Forms - ========================================================================== */ - -/** - * Known limitation: by default, Chrome and Safari on OS X allow very limited - * styling of `select`, unless a `border` property is set. - */ - -/** - * 1. Correct color not being inherited. - * Known issue: affects color of disabled elements. - * 2. Correct font properties not being inherited. - * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. - */ - -button, -input, -optgroup, -select, -textarea { - color: inherit; /* 1 */ - font: inherit; /* 2 */ - margin: 0; /* 3 */ -} - -/** - * Address `overflow` set to `hidden` in IE 8/9/10/11. - */ - -button { - overflow: visible; -} - -/** - * Address inconsistent `text-transform` inheritance for `button` and `select`. - * All other form control elements do not inherit `text-transform` values. - * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. - * Correct `select` style inheritance in Firefox. - */ - -button, -select { - text-transform: none; -} - -/** - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Correct inability to style clickable `input` types in iOS. - * 3. Improve usability and consistency of cursor style between image-type - * `input` and others. - */ - -button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ -} - -/** - * Re-set default cursor for disabled elements. - */ - -button[disabled], -html input[disabled] { - cursor: default; -} - -/** - * Remove inner padding and border in Firefox 4+. - */ - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/** - * Address Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - */ - -input { - line-height: normal; -} - -/** - * It's recommended that you don't attempt to style these elements. - * Firefox's implementation doesn't respect box-sizing, padding, or width. - * - * 1. Address box sizing set to `content-box` in IE 8/9/10. - * 2. Remove excess padding in IE 8/9/10. - */ - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Fix the cursor style for Chrome's increment/decrement buttons. For certain - * `font-size` values of the `input`, it causes the cursor style of the - * decrement button to change from `default` to `text`. - */ - -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Address `appearance` set to `searchfield` in Safari and Chrome. - * 2. Address `box-sizing` set to `border-box` in Safari and Chrome - * (include `-moz` to future-proof). - */ - -input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; /* 2 */ - box-sizing: content-box; -} - -/** - * Remove inner padding and search cancel button in Safari and Chrome on OS X. - * Safari (but not Chrome) clips the cancel button when the search input has - * padding (and `textfield` appearance). - */ - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * Define consistent border, margin, and padding. - */ - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -/** - * 1. Correct `color` not being inherited in IE 8/9/10/11. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. - */ - -legend { - border: 0; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Remove default vertical scrollbar in IE 8/9/10/11. - */ - -textarea { - overflow: auto; -} - -/** - * Don't inherit the `font-weight` (applied by a rule above). - * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. - */ - -optgroup { - font-weight: bold; -} - -/* Tables - ========================================================================== */ - -/** - * Remove most spacing between table cells. - */ - -table { - border-collapse: collapse; - border-spacing: 0; -} - -td, -th { - padding: 0; -} diff --git a/docs/_sass/vendor/normalize.scss/package.json b/docs/_sass/vendor/normalize.scss/package.json deleted file mode 100644 index 2d051c27..00000000 --- a/docs/_sass/vendor/normalize.scss/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_args": [ - [ - "normalize.scss", - "/Users/pmarsceill/_projects/just-the-docs" - ] - ], - "_from": "normalize.scss@*", - "_id": "normalize.scss@0.1.0", - "_inCache": true, - "_installable": true, - "_location": "/normalize.scss", - "_nodeVersion": "0.10.32", - "_npmUser": { - "email": "alexguerrero1092@gmail.com", - "name": "alexguerrero" - }, - "_npmVersion": "2.0.2", - "_phantomChildren": {}, - "_requested": { - "name": "normalize.scss", - "raw": "normalize.scss", - "rawSpec": "", - "scope": null, - "spec": "*", - "type": "range" - }, - "_requiredBy": [ - "#DEV:/" - ], - "_resolved": "https://registry.npmjs.org/normalize.scss/-/normalize.scss-0.1.0.tgz", - "_shasum": "4a21dc25bd4c019c857785f829b658aba2a8f9ab", - "_shrinkwrap": null, - "_spec": "normalize.scss", - "_where": "/Users/pmarsceill/_projects/just-the-docs", - "author": "", - "bugs": { - "url": "https://github.com/guerrero/normalize.scss/issues" - }, - "dependencies": {}, - "description": "Normalize.scss as a node packaged module", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "4a21dc25bd4c019c857785f829b658aba2a8f9ab", - "tarball": "https://registry.npmjs.org/normalize.scss/-/normalize.scss-0.1.0.tgz" - }, - "files": [ - "normalize.scss" - ], - "gitHead": "d67d517e28615a873066438af1d4845c157c9baf", - "homepage": "https://github.com/guerrero/normalize.scss", - "license": "MIT", - "maintainers": [ - { - "name": "alexguerrero", - "email": "alexguerrero1092@gmail.com" - } - ], - "name": "normalize.scss", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/guerrero/normalize.scss.git" - }, - "scripts": {}, - "style": "normalize.scss", - "version": "0.1.0" -} diff --git a/docs/assets/js/search-data.json b/docs/assets/js/search-data.json deleted file mode 100644 index 50a4b9f4..00000000 --- a/docs/assets/js/search-data.json +++ /dev/null @@ -1,12 +0,0 @@ ---- ---- -{ - {% for page in site.html_pages %}"{{ forloop.index0 }}": { - "id": "{{ forloop.index0 }}", - "title": "{{ page.title | xml_escape }}", - "content": "{{ page.content | markdownify | strip_html | xml_escape | remove: 'Table of contents' | strip_newlines | replace: '\', ' ' }}", - "url": "{{ page.url | absolute_url | xml_escape }}", - "relUrl": "{{ page.url | xml_escape }}" - }{% if forloop.last %}{% else %}, - {% endif %}{% endfor %} -} diff --git a/docs/assets/scss/_variables_project.scss b/docs/assets/scss/_variables_project.scss new file mode 100644 index 00000000..25690273 --- /dev/null +++ b/docs/assets/scss/_variables_project.scss @@ -0,0 +1,6 @@ +/* + +Add styles or override variables from the theme here. + +*/ + diff --git a/docs/config.toml b/docs/config.toml new file mode 100644 index 00000000..be0f1af6 --- /dev/null +++ b/docs/config.toml @@ -0,0 +1,136 @@ +baseURL = "/" +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 = "tango" + + # 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 = true +angledQuotes = false +latexDashes = true + +# 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 = "Goldydocs" +description = "A Docsy example site" +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" + + +# 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 = "User mailing list" + url = "https://example.org/mail" + icon = "fa fa-envelope" + desc = "Discussion and help from your fellow users" +[[params.links.user]] + name ="Twitter" + url = "https://example.org/twitter" + icon = "fab fa-twitter" + desc = "Follow us on Twitter to get the latest news!" +[[params.links.user]] + name = "Stack Overflow" + url = "https://example.org/stack" + icon = "fab fa-stack-overflow" + desc = "Practical questions and curated answers" +# Developer relevant links. These will show up on right side of footer and in the community page if you have one. +[[params.links.developer]] + name = "GitHub" + url = "https://github.com/google/docsy" + icon = "fab fa-github" + desc = "Development takes place here!" +[[params.links.developer]] + name = "Slack" + url = "https://example.org/slack" + icon = "fab fa-slack" + desc = "Chat with other project developers" +[[params.links.developer]] + name = "Developer mailing list" + url = "https://example.org/mail" + icon = "fa fa-envelope" + desc = "Discuss development issues around the project" + diff --git a/docs/content/en/_index.html b/docs/content/en/_index.html new file mode 100644 index 00000000..c3c0da56 --- /dev/null +++ b/docs/content/en/_index.html @@ -0,0 +1,83 @@ ++++ +title = "Goldydocs" +linkTitle = "Goldydocs" + ++++ + +{{< blocks/cover title="Welcome to Goldydocs: A Docsy Example Project!" image_anchor="top" height="full" color="orange" >}} +
+ }}"> + Learn More + + + Download + +

Porridge temperature assessment - in the cloud!

+
+ {{< blocks/link-down color="info" >}} +
+
+{{< /blocks/cover >}} + + +{{% blocks/lead color="primary" %}} +Goldydocs provides a single web UI providing visibility into porridge temperature, chair size, and bed softness metrics! You can even find out who's been eating **your** porridge. + +(Sadly, Goldydocs isn't a real project, but you can use this site as an example to create your own real websites with [Docsy](http://docsy.dev)) +{{% /blocks/lead %}} + +{{< blocks/section color="dark" >}} +{{% blocks/feature icon="fa-lightbulb" title="New chair metrics!" %}} +The Goldydocs UI now shows chair size metrics by default. + +Please follow this space for updates! +{{% /blocks/feature %}} + + +{{% blocks/feature icon="fab fa-github" title="Contributions welcome!" url="https://github.com/google/docsy-example" %}} +We do a [Pull Request](https://github.com/gohugoio/hugo/pulls) contributions workflow on **GitHub**. New users are always welcome! +{{% /blocks/feature %}} + + +{{% blocks/feature icon="fab fa-twitter" title="Follow us on Twitter!" url="https://twitter.com/docsydocs" %}} +For announcement of latest features etc. +{{% /blocks/feature %}} + + +{{< /blocks/section >}} + + +{{< blocks/section >}} +
+

This is the second Section

+
+ +{{< /blocks/section >}} + + + +{{< blocks/section >}} +{{% blocks/feature icon="fab fa-app-store-ios" title="Download **from AppStore**" %}} +Get the Goldydocs app! +{{% /blocks/feature %}} + + +{{% blocks/feature icon="fab fa-github" title="Contributions welcome!" url="https://github.com/gohugoio/hugo" %}} +We do a [Pull Request](https://github.com/gohugoio/hugo/pulls) contributions workflow on **GitHub**. New users are always welcome! +{{% /blocks/feature %}} + + +{{% blocks/feature icon="fab fa-twitter" title="Follow us on Twitter!" url="https://twitter.com/GoHugoIO" %}} +For announcement of latest features etc. +{{% /blocks/feature %}} + + +{{< /blocks/section >}} + +{{< blocks/section >}} + +
+

This is another Section

+
+ +{{< /blocks/section >}} diff --git a/docs/content/en/about/_index.html b/docs/content/en/about/_index.html new file mode 100644 index 00000000..c2644363 --- /dev/null +++ b/docs/content/en/about/_index.html @@ -0,0 +1,38 @@ +--- +title: About Goldydocs +linkTitle: About +menu: + main: + weight: 10 + +--- + + +{{< blocks/cover title="About Goldydocs" image_anchor="bottom" height="min" >}} + +

A sample site using the Docsy Hugo theme. +

+ +{{< /blocks/cover >}} + +{{% blocks/lead %}} +Goldydocs is a sample site using the Docsy Hugo theme that shows what it can do and provides you with a template site structure. It’s designed for you to clone and edit as much as you like. See the different sections of the documentation and site for more ideas. +{{% /blocks/lead %}} + + +{{< blocks/section >}} +
+

This is another section

+
+ +{{< /blocks/section >}} + + + +{{< blocks/section >}} + +
+

This is another section

+
+ +{{< /blocks/section >}} diff --git a/docs/content/en/docs/Examples/_index.md b/docs/content/en/docs/Examples/_index.md new file mode 100755 index 00000000..efc8cc8e --- /dev/null +++ b/docs/content/en/docs/Examples/_index.md @@ -0,0 +1,17 @@ + +--- +title: "Examples" +linkTitle: "Examples" +weight: 3 +date: 2017-01-05 +description: > + See your project in action! +--- + +{{% pageinfo %}} +This is a placeholder page that shows you how to use this template site. +{{% /pageinfo %}} + +Do you have any example **applications** or **code** for your users in your repo or elsewhere? Link to your examples here. + + diff --git a/docs/content/en/docs/Getting started/_index.md b/docs/content/en/docs/Getting started/_index.md new file mode 100644 index 00000000..d785bf2b --- /dev/null +++ b/docs/content/en/docs/Getting started/_index.md @@ -0,0 +1,36 @@ +--- +title: "Getting Started" +linkTitle: "Getting Started" +weight: 2 +description: > + What does your user need to know to try your project? +--- + +{{% pageinfo %}} +This is a placeholder page that shows you how to use this template site. +{{% /pageinfo %}} + +Information in this section helps your user try your project themselves. + +* What do your users need to do to start using your project? This could include downloading/installation instructions, including any prerequisites or system requirements. + +* Introductory “Hello World” example, if appropriate. More complex tutorials should live in the Tutorials section. + +Consider using the headings below for your getting started page. You can delete any that are not applicable to your project. + +## Prerequisites + +Are there any system requirements for using your project? What languages are supported (if any)? Do users need to already have any software or tools installed? + +## Installation + +Where can your user find your project code? How can they install it (binaries, installable package, build from source)? Are there multiple options/versions they can install and how should they choose the right one for them? + +## Setup + +Is there any initial setup users need to do after installation to try your project? + +## Try it out! + +Can your users test their installation, for example by running a commmand or deploying a Hello World example? + diff --git a/docs/content/en/docs/Getting started/example-page.md b/docs/content/en/docs/Getting started/example-page.md new file mode 100644 index 00000000..46301af4 --- /dev/null +++ b/docs/content/en/docs/Getting started/example-page.md @@ -0,0 +1,239 @@ +--- +title: "Example Page" +linkTitle: "Example Page" +date: 2017-01-05 +description: > + A short lead descripton about this content page. It can be **bold** or _italic_ and can be split over multiple paragraphs. +--- + +{{% pageinfo %}} +This is a placeholder page. Replace it with your own content. +{{% /pageinfo %}} + + +Text can be **bold**, _italic_, or ~~strikethrough~~. [Links](https://gohugo.io) should be blue with no underlines (unless hovered over). + +There should be whitespace between paragraphs. Vape migas chillwave sriracha poutine try-hard distillery. Tattooed shabby chic small batch, pabst art party heirloom letterpress air plant pop-up. Sustainable chia skateboard art party banjo cardigan normcore affogato vexillologist quinoa meggings man bun master cleanse shoreditch readymade. Yuccie prism four dollar toast tbh cardigan iPhone, tumblr listicle live-edge VHS. Pug lyft normcore hot chicken biodiesel, actually keffiyeh thundercats photo booth pour-over twee fam food truck microdosing banh mi. Vice activated charcoal raclette unicorn live-edge post-ironic. Heirloom vexillologist coloring book, beard deep v letterpress echo park humblebrag tilde. + +90's four loko seitan photo booth gochujang freegan tumeric listicle fam ugh humblebrag. Bespoke leggings gastropub, biodiesel brunch pug fashion axe meh swag art party neutra deep v chia. Enamel pin fanny pack knausgaard tofu, artisan cronut hammock meditation occupy master cleanse chartreuse lumbersexual. Kombucha kogi viral truffaut synth distillery single-origin coffee ugh slow-carb marfa selfies. Pitchfork schlitz semiotics fanny pack, ugh artisan vegan vaporware hexagon. Polaroid fixie post-ironic venmo wolf ramps **kale chips**. + +> There should be no margin above this first sentence. +> +> Blockquotes should be a lighter gray with a border along the left side in the secondary color. +> +> There should be no margin below this final sentence. + +## First Header 2 + +This is a normal paragraph following a header. Knausgaard kale chips snackwave microdosing cronut copper mug swag synth bitters letterpress glossier **craft beer**. Mumblecore bushwick authentic gochujang vegan chambray meditation jean shorts irony. Viral farm-to-table kale chips, pork belly palo santo distillery activated charcoal aesthetic jianbing air plant woke lomo VHS organic. Tattooed locavore succulents heirloom, small batch sriracha echo park DIY af. Shaman you probably haven't heard of them copper mug, crucifix green juice vape *single-origin coffee* brunch actually. Mustache etsy vexillologist raclette authentic fam. Tousled beard humblebrag asymmetrical. I love turkey, I love my job, I love my friends, I love Chardonnay! + +Deae legum paulatimque terra, non vos mutata tacet: dic. Vocant docuique me plumas fila quin afuerunt copia haec o neque. + +On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width. + +Scenester tumeric pickled, authentic crucifix post-ironic fam freegan VHS pork belly 8-bit yuccie PBR&B. **I love this life we live in**. + + +## Second Header 2 + +> This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. + +### Header 3 + +``` +This is a code block following a header. +``` + +Next level leggings before they sold out, PBR&B church-key shaman echo park. Kale chips occupy godard whatever pop-up freegan pork belly selfies. Gastropub Belinda subway tile woke post-ironic seitan. Shabby chic man bun semiotics vape, chia messenger bag plaid cardigan. + +#### Header 4 + +* This is an unordered list following a header. +* This is an unordered list following a header. +* This is an unordered list following a header. + +##### Header 5 + +1. This is an ordered list following a header. +2. This is an ordered list following a header. +3. This is an ordered list following a header. + +###### Header 6 + +| What | Follows | +|-----------|-----------------| +| A table | A header | +| A table | A header | +| A table | A header | + +---------------- + +There's a horizontal rule above and below this. + +---------------- + +Here is an unordered list: + +* Liverpool F.C. +* Chelsea F.C. +* Manchester United F.C. + +And an ordered list: + +1. Michael Brecker +2. Seamus Blake +3. Branford Marsalis + +And an unordered task list: + +- [x] Create a Hugo theme +- [x] Add task lists to it +- [ ] Take a vacation + +And a "mixed" task list: + +- [ ] Pack bags +- ? +- [ ] Travel! + +And a nested list: + +* Jackson 5 + * Michael + * Tito + * Jackie + * Marlon + * Jermaine +* TMNT + * Leonardo + * Michelangelo + * Donatello + * Raphael + +Definition lists can be used with Markdown syntax. Definition headers are bold. + +Name +: Godzilla + +Born +: 1952 + +Birthplace +: Japan + +Color +: Green + + +---------------- + +Tables should have bold headings and alternating shaded rows. + +| Artist | Album | Year | +|-------------------|-----------------|------| +| Michael Jackson | Thriller | 1982 | +| Prince | Purple Rain | 1984 | +| Beastie Boys | License to Ill | 1986 | + +If a table is too wide, it should scroll horizontally. + +| Artist | Album | Year | Label | Awards | Songs | +|-------------------|-----------------|------|-------------|----------|-----------| +| Michael Jackson | Thriller | 1982 | Epic Records | Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical | Wanna Be Startin' Somethin', Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life | +| Prince | Purple Rain | 1984 | Warner Brothers Records | Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal | Let's Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I'm a Star, Purple Rain | +| Beastie Boys | License to Ill | 1986 | Mercury Records | noawardsbutthistablecelliswide | Rhymin & Stealin, The New Style, She's Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill | + +---------------- + +Code snippets like `var foo = "bar";` can be shown inline. + +Also, `this should vertically align` ~~`with this`~~ ~~and this~~. + +Code can also be shown in a block element. + +``` +foo := "bar"; +bar := "foo"; +``` + +Code can also use syntax highlighting. + +```go +func main() { + input := `var foo = "bar";` + + lexer := lexers.Get("javascript") + iterator, _ := lexer.Tokenise(nil, input) + style := styles.Get("github") + formatter := html.New(html.WithLineNumbers()) + + var buff bytes.Buffer + formatter.Format(&buff, style, iterator) + + fmt.Println(buff.String()) +} +``` + +``` +Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this. +``` + +Inline code inside table cells should still be distinguishable. + +| Language | Code | +|-------------|--------------------| +| Javascript | `var foo = "bar";` | +| Ruby | `foo = "bar"{` | + +---------------- + +Small images should be shown at their actual size. + +![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg/240px-Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg) + +Large images should always scale down and fit in the content container. + +![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg/1024px-Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg) + +_The photo above of the Spruce Picea abies shoot with foliage buds: Bjørn Erik Pedersen, CC-BY-SA._ + + +## Components + +### Alerts + +{{< alert >}}This is an alert.{{< /alert >}} +{{< alert title="Note" >}}This is an alert with a title.{{< /alert >}} +{{% alert title="Note" %}}This is an alert with a title and **Markdown**.{{% /alert %}} +{{< alert color="success" >}}This is a successful alert.{{< /alert >}} +{{< alert color="warning" >}}This is a warning.{{< /alert >}} +{{< alert color="warning" title="Warning" >}}This is a warning with a title.{{< /alert >}} + + +## Another Heading + +Add some sections here to see how the ToC looks like. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. + +### This Document + +Inguina genus: Anaphen post: lingua violente voce suae meus aetate diversi. Orbis unam nec flammaeque status deam Silenum erat et a ferrea. Excitus rigidum ait: vestro et Herculis convicia: nitidae deseruit coniuge Proteaque adiciam *eripitur*? Sitim noceat signa *probat quidem*. Sua longis *fugatis* quidem genae. + + +### Pixel Count + +Tilde photo booth wayfarers cliche lomo intelligentsia man braid kombucha vaporware farm-to-table mixtape portland. PBR&B pickled cornhole ugh try-hard ethical subway tile. Fixie paleo intelligentsia pabst. Ennui waistcoat vinyl gochujang. Poutine salvia authentic affogato, chambray lumbersexual shabby chic. + +### Contact Info + +Plaid hell of cred microdosing, succulents tilde pour-over. Offal shabby chic 3 wolf moon blue bottle raw denim normcore poutine pork belly. + + +### External Links + +Stumptown PBR&B keytar plaid street art, forage XOXO pitchfork selvage affogato green juice listicle pickled everyday carry hashtag. Organic sustainable letterpress sartorial scenester intelligentsia swag bushwick. Put a bird on it stumptown neutra locavore. IPhone typewriter messenger bag narwhal. Ennui cold-pressed seitan flannel keytar, single-origin coffee adaptogen occupy yuccie williamsburg chillwave shoreditch forage waistcoat. + + + +``` +This is the final element on the page and there should be no margin below this. +``` diff --git a/docs/content/en/docs/Overview/_index.md b/docs/content/en/docs/Overview/_index.md new file mode 100644 index 00000000..c70053f7 --- /dev/null +++ b/docs/content/en/docs/Overview/_index.md @@ -0,0 +1,38 @@ +--- +title: "Overview" +linkTitle: "Overview" +weight: 1 +description: > + Here's where your user finds out if your project is for them. +--- + +{{% pageinfo %}} +This is a placeholder page that shows you how to use this template site. +{{% /pageinfo %}} + + +The Overview is where your users find out about your project. Depending on the size of your docset, you can have a separate overview page (like this one) or put your overview contents in the Documentation landing page (like in the Docsy User Guide). + +Try answering these questions for your user in this page: + +## What is it? + +Introduce your project, including what it does or lets you do, why you would use it, and its primary goal (and how it achieves it). This should be similar to your README description, though you can go into a little more detail here if you want. + +## Why do I want it? + +Help your user know if your project will help them. Useful information can include: + +* **What is it good for?**: What types of problems does your project solve? What are the benefits of using it? + +* **What is it not good for?**: For example, point out situations that might intuitively seem suited for your project, but aren't for some reason. Also mention known limitations, scaling issues, or anything else that might let your users know if the project is not for them. + +* **What is it *not yet* good for?**: Highlight any useful features that are coming soon. + +## Where should I go next? + +Give your users next steps from the Overview. For example: + +* [Getting Started](/getting-started/): Get started with $project +* [Examples](/examples/): Check out some example code! + diff --git a/docs/content/en/docs/_index.md b/docs/content/en/docs/_index.md new file mode 100755 index 00000000..d5ec96a1 --- /dev/null +++ b/docs/content/en/docs/_index.md @@ -0,0 +1,24 @@ + +--- +title: "Documentation" +linkTitle: "Documentation" +weight: 20 +menu: + main: + weight: 20 +--- + +{{% pageinfo %}} +This is a placeholder page that shows you how to use this template site. +{{% /pageinfo %}} + + +This section is where the user documentation for your project lives - all the information your users need to understand and successfully use your project. + +For large documentation sets we recommend adding content under the headings in this section, though if some or all of them don’t apply to your project feel free to remove them or add your own. You can see an example of a smaller Docsy documentation site in the [Docsy User Guide](https://docsy.dev/docs/), which lives in the [Docsy theme repo](https://github.com/google/docsy/tree/master/userguide) if you'd like to copy its docs section. + +Other content such as marketing material, case studies, and community updates should live in the [About](/about/) and [Community](/community/) pages. + +Find out how to use the Docsy theme in the [Docsy User Guide](https://docsy.dev/docs/). You can learn more about how to organize your documentation (and how we organized this site) in [Organizing Your Content](https://docsy.dev/docs/best-practices/organizing-content/). + + diff --git a/docs/content/en/search.md b/docs/content/en/search.md new file mode 100644 index 00000000..e3690fd5 --- /dev/null +++ b/docs/content/en/search.md @@ -0,0 +1,6 @@ +--- +title: Search Results +layout: search + +--- + diff --git a/docs/docs/daos.md b/docs/docs/daos.md deleted file mode 100644 index a18cf6f3..00000000 --- a/docs/docs/daos.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -layout: guide -title: Modularity with DAOs -nav_order: 5 -permalink: /daos/ ---- - -# Extracting functionality with DAOs -When you have a lot of queries, putting them all into one class might become -tedious. You can avoid this by extracting some queries into classes that are -available from your main database class. Consider the following code: -```dart -part 'todos_dao.g.dart'; - -// the _TodosDaoMixin will be created by moor. It contains all the necessary -// fields for the tables. The type annotation is the database class -// that should use this dao. -@UseDao(tables: [Todos]) -class TodosDao extends DatabaseAccessor with _$TodosDaoMixin { - // this constructor is required so that the main database can create an instance - // of this object. - TodosDao(MyDatabase db) : super(db); - - Stream> todosInCategory(Category category) { - if (category == null) { - return (select(todos)..where((t) => isNull(t.category))).watch(); - } else { - return (select(todos)..where((t) => t.category.equals(category.id))) - .watch(); - } - } -} -``` -If we now change the annotation on the `MyDatabase` class to `@UseMoor(tables: [Todos, Categories], daos: [TodosDao])` -and re-run the code generation, a generated getter `todosDao` can be used to access the instance of that dao. diff --git a/docs/docs/faq.md b/docs/docs/faq.md deleted file mode 100644 index 6d9fec9b..00000000 --- a/docs/docs/faq.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: Frequently asked questions -nav_order: 6 -permalink: /faq/ ---- - -## Using the database -If you've created a `MyDatabase` class by following the [getting started guide]({{site.url}}/getting-started/), 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: - -### Vanilla flutter -```dart -MyDatabase database; - -void main() { - database = MyDatabase(); - runApp(MyFlutterApp()); -} -``` -It would be cleaner to use `InheritedWidgets` for that, and the `provider` package helps here: - -### Provider -If you're using the [provider](https://pub.dev/packages/provider) package, you can wrap your top-level widget in a -provider that manages the database instance: -```dart -void main() { - runApp( - Provider( - builder: (context) => MyDatabase(), - child: MyFlutterApp(), - ), - ); -} -``` -Your widgets would then have access to the database using `Provider.of(context)`. - -### A more complex architecture -If you're strict on keeping your business logic out of the widget layer, you probably use some dependency injection -framework like `kiwi` or `get_it` to instantiate services and view models. Creating a singleton instance of `MyDatabase` -in your favorite dependency injection framework for flutter hence solves this problem for you. \ No newline at end of file diff --git a/docs/docs/getting_started.md b/docs/docs/getting_started.md deleted file mode 100644 index fe80df89..00000000 --- a/docs/docs/getting_started.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -layout: guide -title: Getting started -nav_order: 1 -permalink: /getting-started/ ---- - -# Getting started -_Note:_ If you prefer a tutorial video, Reso Coder has made a detailed video explaining -how to get started. You can watch it [here](https://youtu.be/zpWsedYMczM). - -{% include content/getting_started.md %} - -Congratulations, you now have a class which you can use to easily write queries. -A detailed guide on how to do that in Dart is written [here]({{"/queries" | absolute_url}}). -If you prefer to write SQL and have moor generate the mapping out, check out -[custom queries]({{"queries/custom" | absolute_url}}) - -PS: You might be asking how you would actually obtain an instance of `MyDatabase` for -your widgets. If so, [here]({{site.url}}/faq/#using-the-database) is some guidance. \ No newline at end of file diff --git a/docs/docs/migrations.md b/docs/docs/migrations.md deleted file mode 100644 index 4418725b..00000000 --- a/docs/docs/migrations.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -layout: feature -title: Migrations -nav_order: 4 -permalink: /migrations/ ---- -# Migrations -Moor provides a migration API that can be used to gradually apply schema changes after bumping -the `schemaVersion` getter inside the `Database` class. To use it, override the `migration` -getter. Here's an example: Let's say you wanted to add a due date to your todo entries: -```dart -class Todos extends Table { - IntColumn get id => integer().autoIncrement()(); - TextColumn get title => text().withLength(min: 6, max: 10)(); - TextColumn get content => text().named('body')(); - IntColumn get category => integer().nullable()(); - DateTimeColumn get dueDate => dateTime().nullable()(); // new, added column -} -``` -We can now change the `database` class like this: -```dart - @override - int get schemaVersion => 2; // bump because the tables have changed - - @override - MigrationStrategy get migration => MigrationStrategy( - onCreate: (Migrator m) { - return m.createAllTables(); - }, - onUpgrade: (Migrator m, int from, int to) async { - if (from == 1) { - // we added the dueDate property in the change from version 1 - await m.addColumn(todos, todos.dueDate); - } - } - ); - - // rest of class can stay the same -``` -You can also add individual tables or drop them - see the reference of [Migrator](https://pub.dev/documentation/moor/latest/moor/Migrator-class.html) -for all the available options. You can't use the high-level query API in migrations - calling `select` or similar -methods will throw. - -`sqlite` can feel a bit limiting when it comes to migrations - there only are methods to create tables and columns. -Existing columns can't be altered or removed. A workaround is described [here](https://stackoverflow.com/a/805508), it -can be used together with [`issueCustomQuery`](https://pub.dev/documentation/moor/latest/moor/Migrator/issueCustomQuery.html) -to run the statements. - -## Post-migration callbacks -Starting from moor 1.5, you can use the `beforeOpen` parameter in the `MigrationStrategy` which will be called after -migrations, but after any other queries are run. You could use it to populate data after the database has been created: -```dart -beforeOpen: (db, details) async { - if (details.wasCreated) { - final workId = await db.into(categories).insert(Category(description: 'Work')); - - await db.into(todos).insert(TodoEntry( - content: 'A first todo entry', - category: null, - targetDate: DateTime.now(), - )); - - await db.into(todos).insert( - TodoEntry( - content: 'Rework persistence code', - category: workId, - targetDate: DateTime.now().add(const Duration(days: 4)), - )); - } -}, -``` -You could also activate pragma statements that you need: -```dart -beforeOpen: (db, details) async { - if (details.wasCreated) { - // ... - } - await db.customStatement('PRAGMA foreign_keys = ON'); -} -``` -It is important that you run these queries on `db` explicitly. Failing to do so causes a deadlock which prevents the -database from being opened. \ No newline at end of file diff --git a/docs/docs/transactions.md b/docs/docs/transactions.md deleted file mode 100644 index 37d50298..00000000 --- a/docs/docs/transactions.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -layout: feature -title: Transactions -nav_order: 3 -since: 1.1 -permalink: /transactions ---- - -# Transactions -Moor has support for transactions and allows multiple queries to run atomically. -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 on the transaction. 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((t) async { - // first, move the affected todo entries back to the default category - await t.customUpdate( - 'UPDATE todos SET category = NULL WHERE category = ?', - updates: {todos}, - variables: [Variable.withInt(category.id)], - ); - - // then, delete the category - await t.delete(categories).delete(category); - }); -} -``` - -## ⚠️ Gotchas -There are a couple of things that should be kept in mind when working with transactions: -1. __Await all calls__: All queries inside the transaction must be `await`-ed. The transaction - will complete when the inner method completes. Without `await`, some queries might be operating - on the transaction after it has been closed! -2. __No select streams in transactions__: Inside a `transaction` callback, select statements can't -be `.watch()`ed. The reasons behind this is that it's unclear how a stream should behave when a -transaction completes. Should the stream complete as well? Update to data changes made outside of the -transaction? Both seem inconsistent, so moor forbids this. - -## Transactions and query streams -Query streams that have been created outside a transaction work nicely together with -updates made in a transaction: All changes to tables will only be reported after the -transaction completes. Updates inside a transaction don't have an immediate effect on -streams, so your data will always be consistent. - -However, as mentioned above, note that streams can't be created inside a `transaction` block. \ No newline at end of file diff --git a/docs/docs/type_converters.md b/docs/docs/type_converters.md deleted file mode 100644 index ab27f434..00000000 --- a/docs/docs/type_converters.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -layout: feature -title: Type converters -since: 1.7 -nav_order: 8 -permalink: /type_converters ---- - -# Type converters -Moor supports a variety of types out of the box, but sometimes you need to store more complex types. -You can achieve this by using `TypeConverters`. In this example, we'll use the the -[json_serializable](https://pub.dev/packages/json_annotation) package to store a custom object in a -column. Moor supports any Dart object, but using that package can make serialization easier. -```dart -import 'dart:convert'; - -import 'package:json_annotation/json_annotation.dart' as j; -import 'package:moor/moor.dart'; - -part 'database.g.dart'; - -@j.JsonSerializable() -class Preferences { - bool receiveEmails; - String selectedTheme; - - Preferences(this.receiveEmails, this.selectedTheme); - - factory Preferences.fromJson(Map json) => - _$PreferencesFromJson(json); - - Map toJson() => _$PreferencesToJson(this); -} -``` - -Next, we have to tell moor how to store a `Preferences` object in the database. We write -a `TypeConverter` for that: -```dart -// stores preferences as strings -class PreferenceConverter extends TypeConverter { - const PreferenceConverter(); - @override - Preferences mapToDart(String fromDb) { - if (fromDb == null) { - return null; - } - return Preferences.fromJson(json.decode(fromDb) as Map); - } - - @override - String mapToSql(Preferences value) { - if (value == null) { - return null; - } - - return json.encode(value.toJson()); - } -} -``` - -Finally, we can use that converter in a table declaration: -```dart -class Users extends Table { - IntColumn get id => integer().autoIncrement()(); - TextColumn get name => text()(); - - TextColumn get preferences => - text().map(const PreferenceConverter()).nullable()(); -} -``` - -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 }}). \ No newline at end of file diff --git a/docs/docs/web.md b/docs/docs/web.md deleted file mode 100644 index 28262bdd..00000000 --- a/docs/docs/web.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -layout: feature -title: Web support -nav_order: 7 -since: 1.6 -permalink: /web ---- - -# Web support -Starting from moor `1.6`, you can experimentally use moor in Dart webapps. Moor web supports -Flutter Web, AngularDart, plain `dart:html` or any other web framework. - -## Getting started -Instead of depending on `moor_flutter`, 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 }}). -Also, instead of using a `FlutterQueryExecutor` in your database classes, you can use a `WebDatabase` executor: -```dart -import 'package:moor/moor_web.dart'; - -@UseMoor(tables: [Todos, Categories]) -class MyDatabase extends _$MyDatabase { - // here, "app" is the name of the database - you can choose any name you want - MyDatabase() : super(WebDatabase('app')); -``` - -Moor web is built on top of the [sql.js](https://github.com/kripken/sql.js/) library, which you need to include: -```html - - - - - - - - - -``` -You can grab the latest version of `sql-wasm.js` and `sql-wasm.wasm` [here](https://github.com/kripken/sql.js/tree/master/dist) -and copy them into your `web` folder. - -## Gotchas -The database implementation uses WebAssembly, which needs to be supported by your browser. -Also, make sure that your webserver serves the `.wasm` file as `application/wasm`, browsers -won't accept it otherwise. - -## Sharing code between native apps and web -If you want to share your database code between native applications and webapps, just import the -basic `moor` library and make the `QueryExecutor` configurable: -```dart -// don't import moor_web.dart or moor_flutter/moor_flutter.dart in shared code -import 'package:moor/moor.dart'; - -@UseMoor(/* ... */) -class SharedDatabase extends _$MyDatabase { - SharedDatabase(QueryExecutor e): super(e); -} -``` -With native Flutter, you can create an instance of your database with -```dart -import 'package:moor_flutter/moor_flutter.dart'; -SharedDatabase constructDb() { - return SharedDatabase(FlutterQueryExecutor.inDatabaseFolder(path: 'db.sqlite')); -} -``` -On the web, you can use -```dart -import 'package:moor/moor_web.dart'; -SharedDatabase constructDb() { - return SharedDatabase(WebDatabse('db')); -} -``` - -## Debugging -You can see all queries sent from moor to the underlying database engine by enabling the `logStatements` -parameter on the `WebDatabase` - they will appear in the console. -When you have assertions enabled (e.g. in debug mode), moor will expose the underlying -[database](http://kripken.github.io/sql.js/documentation/#http://kripken.github.io/sql.js/documentation/class/Database.html) -object via `window.db`. If you need to quickly run a query to check the state of the database, you can use -`db.exec(sql)`. -If you need to delete your databases, there stored using local storage. You can clear all your data with `localStorage.clear()`. - -Web support is experimental at the moment, so please [report all issues](https://github.com/simolus3/moor/issues/new) you find. \ No newline at end of file diff --git a/docs/docs/writing_queries/custom_queries.md b/docs/docs/writing_queries/custom_queries.md deleted file mode 100644 index f86303aa..00000000 --- a/docs/docs/writing_queries/custom_queries.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -layout: feature -title: Custom queries -parent: Writing queries -permalink: /queries/custom ---- - -# Custom statements -Altough moor includes a fluent api that can be used to model most statements, advanced -features like `GROUP BY` statements or window functions are not yet supported. You can -use these features with custom statements. You don't have to miss out on other benefits -moor brings, though: Parsing the rows and query-streams also work on custom statements. - -## Statements with a generated api -Starting from version `1.5`, you can instruct moor to automatically generate a typesafe -API for your select statements. At the moment, this feature is in an experimental state -but it can already handle most statements (`select`, `update` and `delete`). Of course, -you can still write custom sql manually. See the sections below for details. - -To use this feature, all you need to is define your queries in your `UseMoor` annotation: -```dart -@UseMoor( - tables: [Todos, Categories], - queries: { - 'categoriesWithCount': - 'SELECT *, (SELECT COUNT(*) FROM todos WHERE category = c.id) AS "amount" FROM categories c;' - }, -) -class MyDatabase extends _$MyDatabase { - // rest of class stays the same -} -``` -After running the build step again, moor will have written the `CategoriesWithCountResult` class for you - -it will hold the result of your query. Also, the `_$MyDatabase` class from which you inherit will have the -methods `categoriesWithCount` (which runs the query once) and `watchCategoriesWithCount` (which returns -an auto-updating stream). - -Queries can have parameters in them by using the `?` or `:name` syntax. When your queries contain parameters, -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)`. - -You can also use `UPDATE` or `DELETE` statements here. Of course, this feature is also available for [daos]({{"/daos" | absolute_url}}), -and it perfectly integrates with auto-updating streams by analyzing what tables you're reading from or -writing to. - -## Custom select statements -You can issue 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]({{site.common_links.getting_started | absolute_url}}), we can -write this query which will load the amount of todo entries in each category: -```dart -class CategoryWithCount { - final Category category; - final int count; // amount of entries in this category - - CategoryWithCount(this.category, this.count); -} - -// then, in the database class: -Stream> categoriesWithCount() { - // select all categories and load how many associated entries there are for - // each category - return customSelectStream( - 'SELECT *, (SELECT COUNT(*) FROM todos WHERE category = c.id) AS "amount" FROM categories c;', - readsFrom: {todos, categories}, // used for the stream: the stream will update when either table changes - ).map((rows) { - // we get list of rows here. We just have to turn the raw data from the row into a - // CategoryWithCount. As we defined the Category table earlier, moor knows how to parse - // a category. The only thing left to do manually is extracting the amount - return rows - .map((row) => CategoryWithCount(Category.fromData(row.data, this), row.readInt('amount'))) - .toList(); - }); - } -``` -For custom selects, you should use the `readsFrom` parameter to specify from which tables the query is -reading. When using a `Stream`, moor will be able to know after which updates the stream should emit -items. - -## Custom update statements -For update and delete statements, you can use `customUpdate`. Just like `customSelect`, that method -also takes a sql statement and optional variables. You can also tell moor which tables will be -affected by your query using the optional `updates` parameter. That will help with other select -streams, which will then update automatically. diff --git a/docs/docs/writing_queries/joins.md b/docs/docs/writing_queries/joins.md deleted file mode 100644 index 2a3a7948..00000000 --- a/docs/docs/writing_queries/joins.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -layout: feature -title: Table joins -parent: Writing queries -since: 1.3 -permalink: /queries/joins ---- - -# Joins -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]({{ site.common_links.getting_started | absolute_url }}). - -```dart -// we define a data class to contain both a todo entry and the associated category -class EntryWithCategory { - EntryWithCategory(this.entry, this.category); - - final TodoEntry entry; - final Category category; -} - -// in the database class, we can then load the category for each entry -Stream> entriesWithCategory() { - final query = select(todos).join([ - leftOuterJoin(categories, categories.id.equalsExp(todos.category)), - ]); - - // see next section on how to parse the result -} -``` - -## Parsing results -Calling `get()` or `watch` on a select statement with join returns a `Future` or `Stream` of -`List` respectively. Each `TypedResult` represents a row from which data can be -read. It contains a `rawData` getter to obtain the raw row. But more importantly, the -`readTable` method can be used to read a data class from a table. - -In the example query above, we can read the todo entry and the category from each row like this: -```dart -return query.watch().map((rows) { - return rows.map((row) { - return EntryWithCategory( - row.readTable(todos), - row.readTable(categories), - ); - }).toList(); -}); -``` - -_Note_: `readTable` returns `null` when an entity is not present in the row. For instance, todo entries -might not be in any category. In that case, `row.readTable(categories)` returns `null`. -## Aliases -Sometimes, a query references a table more than once. Consider the following example to store saved routes for a -navigation system: -```dart -class GeoPoints extends Table { - IntColumn get id => integer().autoIncrement()(); - TextColumn get name => text()(); - TextColumn get latitude => text()(); - TextColumn get longitude => text()(); -} - -class Routes extends Table { - - IntColumn get id => integer().autoIncrement()(); - TextColumn get name => text()(); - - // contains the id for the start and destination geopoint. - IntColumn get start => integer()(); - IntColumn get destination => integer()(); -} -``` - -Now, let's say we wanted to also load the start and destination `GeoPoint` object for each route. We'd have to use -a join on the `geo-points` table twice: For the start and destination point. To express that in a query, aliases -can be used: -```dart -class RouteWithPoints { - final Route route; - final GeoPoint start; - final GeoPoint destination; - - RouteWithPoints({this.route, this.start, this.destination}); -} - -// inside the database class: -Future> loadRoutes() async { - // create aliases for the geoPoints table so that we can reference it twice - final start = alias(geoPoints, 's'); - final destination = alias(geoPoints, 'd'); - - final rows = await select(routes).join([ - innerJoin(start, start.id.equalsExp(routes.start)), - innerJoin(destination, destination.id.equalsExp(routes.destination)), - ]).get(); - - return rows.map((resultRow) { - return RouteWithPoints( - route: resultRow.readTable(routes), - start: resultRow.readTable(start), - destination: resultRow.readTable(destination), - ); - }).toList(); -} -``` -The generated statement then looks like this: -```sql -SELECT - routes.id, routes.name, routes.start, routes.destination, - s.id, s.name, s.latitude, s.longitude, - d.id, d.name, d.latitude, d.longitude -FROM routes - INNER JOIN geo_points s ON s.id = routes.start - INNER JOIN geo_points d ON d.id = routes.destination -``` \ No newline at end of file diff --git a/docs/docs/writing_queries/writing_queries.md b/docs/docs/writing_queries/writing_queries.md deleted file mode 100644 index 8fda86bc..00000000 --- a/docs/docs/writing_queries/writing_queries.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -layout: guide -title: Writing queries -nav_order: 2 -has_children: true -permalink: /queries/ ---- - -__Note__: This assumes that you already have your database class ready. -Follow the [instructions][getting-started] over here on how to do that. - -# Writing queries -The examples here use the tables defined [here][getting-started]. -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 -run statements: -```dart -// inside the database class, the `todos` getter has been created by moor. - -// loads all todo entries -Future> get allTodoEntries => select(todos).get(); - -// watches all todo entries in a given category. The stream will automatically -// emit new items whenever the underlying data changes. -Stream> watchEntriesInCategory(Category c) { - return (select(todos)..where((t) => t.category.equals(c.id))).watch(); -} -``` -## Select statements -You can create `select` statements by starting them with `select(tableName)`, where the -table name -is a field generated for you by moor. Each table used in a database will have a matching field -to run queries against. Any query can be run once with `get()` or be turned into an auto-updating -stream using `watch()`. -### Where -You can apply filters to a query by calling `where()`. The where method takes a function that -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 `and(a, b), or(a, b)` and `not(a)`. -### Limit -You can limit the amount of results returned by calling `limit` on queries. The method accepts -the amount of rows to return and an optional 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. -```dart -Future> sortEntriesAlphabetically() { - return (select(todos)..orderBy([(t) => OrderingTerm(expression: t.title)])).get(); -} -``` -You can also reverse the order by setting the `mode` property of the `OrderingTerm` to -`OrderingMode.desc`. -## Updates and deletes -You can use the generated classes to update individual fields of any row: -```dart -Future moveImportantTasksIntoCategory(Category target) { - // for updates, we use the "companion" version of a generated class. This wraps the - // fields in a "Value" type which can be set to be absent using "Value.absent()". This - // allows us to separate between "SET category = NULL" (`category: Value(null)`) and not - // updating the category at all: `category: Value.absent()`. - return (update(todos) - ..where((t) => t.title.like('%Important%')) - ).write(TodosCompanion( - category: Value(target.id), - ), - ); -} - -Future update(TodoEntry entry) { - // using replace will update all fields from the entry that are not marked as a primary key. - // it will also make sure that only the entry with the same primary key will be updated. - // Here, this means that the row that has the same id as entry will be updated to reflect - // the entry's title, content and category. As it set's its where clause automatically, it - // can not be used together with where. - return update(todos).replace(entry); -} - -Future feelingLazy() { - // delete the oldest nine tasks - return (delete(todos)..where((t) => t.id.isSmallerThanValue(10))).go(); -} -``` -__⚠️ Caution:__ If you don't explicitly add a `where` clause on updates or deletes, -the statement will affect all rows in the table! - -## Inserts -You can very easily insert any valid object into tables. As some values can be absent -(like default values that we don't have to set explicitly), we again use the -companion version. -```dart -// returns the generated id -Future addTodoEntry(TodosCompanion entry) { - return into(todos).insert(entry); -} -``` -All row classes generated will have a constructor that can be used to create objects: -```dart -addTodoEntry( - TodosCompanion( - title: Value('Important task'), - content: Value('Refactor persistence code'), - ), -); -``` -If a column is nullable or has a default value (this includes auto-increments), the field -can be omitted. All other fields must be set and non-null. The `insert` method will throw -otherwise. - -[getting-started]: {{ site.common_links.getting_started | absolute_url }} \ No newline at end of file diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index 81326ff3..00000000 --- a/docs/index.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -layout: home -title: Home -meta_title: Moor - Reactive persistence library for Dart -description: Moor is an easy to use, typesafe and reactive persistence library for Flutter and webapps written in Dart. -nav_order: 0 ---- - -# Moor - persistence library for Dart -{: .fs-9 } - -Moor is an easy to use, reactive persistence library for Flutter apps. Define your -database tables in pure Dart and enjoy a fluent query API, auto-updating streams -and more! -{: .fs-6 .fw-300 } - -[![Build Status](https://api.cirrus-ci.com/github/simolus3/moor.svg)](https://cirrus-ci.com/github/simolus3/moor) -[![codecov](https://codecov.io/gh/simolus3/moor/branch/master/graph/badge.svg)](https://codecov.io/gh/simolus3/moor) - -[Get started now]({{ site.common_links.getting_started | absolute_url }}){: .btn .btn-green .fs-5 .mb-4 .mb-md-0 .mr-2 } -[View on GitHub]({{site.github_link}}){: .btn .btn-outline .fs-5 .mb-4 .mb-md-0 .mr-2 } - ---- - -## Declarative tables -With moor, you can declare your tables in pure dart without having to miss out on advanced sqlite -features. Moor will take care of writing the `CREATE TABLE` statements when the database is created. - -## Fluent queries -Thanks to the power of Dart build system, moor will let you write typesafe queries: -```dart -Future userById(int id) { - return (select(users)..where((user) => user.id.equals(id))).getSingle(); - // runs SELECT * FROM users WHERE id = ?, automatically binds the parameter - // and parses the result row. -} -``` -No more hard to debug typos in sql, no more annoying to write mapping code - moor takes -care of all the boring parts. - -## 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: -```dart -@UseMoor( - tables: [Categories], - queries: { - 'categoryById': 'SELECT * FROM categories WHERE id = :id' - }, -) -class MyDatabase extends _$MyDatabase { -// the _$MyDatabase class will have the categoryById(int id) and watchCategoryById(int id) -// methods that execute the sql and parse its result into a generated class. -``` -All queries are validated and analyzed during build-time, so that moor can provide hints -about potential errors quickly and generate efficient mapping code once. - -## Auto-updating streams -For all your queries, moor can generate a `Stream` that will automatically emit new results -whenever the underlying data changes. This is first-class feature that perfectly integrates -with custom queries, daos and all the other features. Having an auto-updating single source -of truth makes managing perstistent state much easier! - -## And much moor... -Moor also supports transactions, DAOs, powerful helpers for migrations, batched inserts and -many more features that makes writing persistence code much easier. - -## Getting started -{% include content/getting_started.md %} - -You can ignore the `schemaVersion` at the moment, the important part is that you can -now run your queries with fluent Dart code - -## [Writing queries]({{"queries" | absolute_url }}) diff --git a/docs/layouts/404.html b/docs/layouts/404.html new file mode 100644 index 00000000..378b7367 --- /dev/null +++ b/docs/layouts/404.html @@ -0,0 +1,10 @@ +{{ define "main"}} +
+
+

Not found

+

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

+ +

You can learn how to make a 404 page like this in Custom 404 Pages.

+
+
+{{ end }} diff --git a/docs/package-lock.json b/docs/package-lock.json new file mode 100644 index 00000000..dec45483 --- /dev/null +++ b/docs/package-lock.json @@ -0,0 +1,2843 @@ +{ + "name": "tech-doc-hugo", + "version": "0.0.1", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@mrmlnc/readdir-enhanced": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", + "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "dev": true, + "requires": { + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" + } + }, + "@nodelib/fs.stat": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", + "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "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" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "autoprefixer": { + "version": "9.4.6", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.4.6.tgz", + "integrity": "sha512-Yp51mevbOEdxDUy5WjiKtpQaecqYq9OqZSL04rSoCiry7Tc5I9FEyo3bfxiTJc1DfHeKwSFCUYbBAiOQ2VGfiw==", + "dev": true, + "requires": { + "browserslist": "^4.4.1", + "caniuse-lite": "^1.0.30000929", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "postcss": "^7.0.13", + "postcss-value-parser": "^3.3.1" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss": { + "version": "7.0.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz", + "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + } + }, + "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 + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "binary-extensions": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.12.0.tgz", + "integrity": "sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "browserslist": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.4.1.tgz", + "integrity": "sha512-pEBxEXg7JwaakBXjATYw/D1YZh4QUSCX/Mnd/wnqSRPPSi1U39iDhDoKGoBUcraKdxDlrYqJxSI5nNvD+dWP2A==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000929", + "electron-to-chromium": "^1.3.103", + "node-releases": "^1.1.3" + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30000932", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000932.tgz", + "integrity": "sha512-4bghJFItvzz8m0T3lLZbacmEY9X1Z2AtIzTr7s7byqZIOumASfr4ynDx7rtm0J85nDmx8vsgR6vnaSoeU8Oh0A==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chokidar": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", + "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.0", + "braces": "^2.3.0", + "fsevents": "^1.2.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "lodash.debounce": "^4.0.8", + "normalize-path": "^2.1.1", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0", + "upath": "^1.0.5" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", + "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", + "dev": true, + "requires": { + "color-name": "1.1.1" + } + }, + "color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cosmiconfig": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz", + "integrity": "sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==", + "dev": true, + "requires": { + "is-directory": "^0.3.1", + "js-yaml": "^3.4.3", + "minimist": "^1.2.0", + "object-assign": "^4.1.0", + "os-homedir": "^1.0.1", + "parse-json": "^2.2.0", + "require-from-string": "^1.1.0" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "dependency-graph": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.7.2.tgz", + "integrity": "sha512-KqtH4/EZdtdfWX0p6MGP9jljvxSY6msy/pRUD4jgNwVpv3v1QmNLlsB3LDSSUg79BRVSn7jI1QPRtArGABovAQ==", + "dev": true + }, + "dir-glob": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", + "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "path-type": "^3.0.0" + } + }, + "electron-to-chromium": { + "version": "1.3.108", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.108.tgz", + "integrity": "sha512-/QI4hMpAh48a1Sea6PALGv+kuVne9A2EWGd8HrWHMdYhIzGtbhVVHh6heL5fAzGaDnZuPyrlWJRl8WPm4RyiQQ==", + "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" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "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 + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "fast-glob": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.6.tgz", + "integrity": "sha512-0BvMaZc1k9F+MeWWMe8pL6YltFzZYcJsYU7D4JyDA6PAczaXvxqQQ/z+mDF7/4Mw01DeUc+i3CTKajnkANkV4w==", + "dev": true, + "requires": { + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.1.2", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.3", + "micromatch": "^3.1.10" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fs-extra": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", + "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz", + "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true, + "optional": true + }, + "minipass": { + "version": "2.3.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "yallist": { + "version": "3.0.3", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "glob-to-regexp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", + "dev": true + }, + "globby": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.2.tgz", + "integrity": "sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w==", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "dir-glob": "2.0.0", + "fast-glob": "^2.0.2", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "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": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "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-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "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": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.14", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz", + "integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==", + "dev": true + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dev": true, + "requires": { + "chalk": "^2.0.1" + } + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "merge2": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.3.tgz", + "integrity": "sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "nan": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", + "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "node-releases": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.3.tgz", + "integrity": "sha512-6VrvH7z6jqqNFY200kdB6HdzkgM96Oaj9v3dqGfgp6mF+cHmU4wyQKZ2/WPDRVoR0Jz9KqbamaBN0ZhdUaysUQ==", + "dev": true, + "requires": { + "semver": "^5.3.0" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "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 + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "num2fraction": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + }, + "dependencies": { + "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 + } + } + }, + "postcss-cli": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/postcss-cli/-/postcss-cli-5.0.1.tgz", + "integrity": "sha512-yrvWl8axFdiXlJuVQRIHM4qskvl0F4/fWUUIYyYo0RV6lOdB0Vcyt8Rv7lBvtwVuNa0pClz88LgxzT4ZzC7UWA==", + "dev": true, + "requires": { + "chalk": "^2.1.0", + "chokidar": "^2.0.0", + "dependency-graph": "^0.7.0", + "fs-extra": "^5.0.0", + "get-stdin": "^6.0.0", + "globby": "^8.0.0", + "postcss": "^6.0.1", + "postcss-load-config": "^1.1.0", + "postcss-reporter": "^5.0.0", + "pretty-hrtime": "^1.0.3", + "read-cache": "^1.0.0", + "yargs": "^11.0.0" + } + }, + "postcss-load-config": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz", + "integrity": "sha1-U56a/J3chiASHr+djDZz4M5Q0oo=", + "dev": true, + "requires": { + "cosmiconfig": "^2.1.0", + "object-assign": "^4.1.0", + "postcss-load-options": "^1.2.0", + "postcss-load-plugins": "^2.3.0" + } + }, + "postcss-load-options": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz", + "integrity": "sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw=", + "dev": true, + "requires": { + "cosmiconfig": "^2.1.0", + "object-assign": "^4.1.0" + } + }, + "postcss-load-plugins": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz", + "integrity": "sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI=", + "dev": true, + "requires": { + "cosmiconfig": "^2.1.1", + "object-assign": "^4.1.0" + } + }, + "postcss-reporter": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-5.0.0.tgz", + "integrity": "sha512-rBkDbaHAu5uywbCR2XE8a25tats3xSOsGNx6mppK6Q9kSFGKc/FyAzfci+fWM2l+K402p1D0pNcfDGxeje5IKg==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "lodash": "^4.17.4", + "log-symbols": "^2.0.0", + "postcss": "^6.0.8" + } + }, + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "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 + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "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" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "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 + }, + "require-from-string": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "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" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "upath": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", + "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", + "dev": true + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz", + "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } +} diff --git a/docs/package.json b/docs/package.json new file mode 100644 index 00000000..ce3b9af2 --- /dev/null +++ b/docs/package.json @@ -0,0 +1,24 @@ +{ + "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": "^9.4.6", + "postcss-cli": "^5.0.1" + } +} diff --git a/docs/themes/docsy b/docs/themes/docsy new file mode 160000 index 00000000..97488e0b --- /dev/null +++ b/docs/themes/docsy @@ -0,0 +1 @@ +Subproject commit 97488e0b9b63fd028fc1ae21e8a18a997439b5cd From b2a06cbe1c8bb773416db6acd02a0d3d598f638e Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Thu, 1 Aug 2019 22:20:58 +0200 Subject: [PATCH 4/9] Move the existing documentation and more to docsy --- .../en/docs/Advanced Features/_index.md | 4 + .../content/en/docs/Advanced Features/daos.md | 34 +++ .../en/docs/Advanced Features/joins.md | 116 +++++++++ .../en/docs/Advanced Features/migrations.md | 83 ++++++ docs/content/en/docs/Examples/_index.md | 17 -- .../content/en/docs/Getting started/_index.md | 89 +++++-- .../en/docs/Getting started/example-page.md | 239 ------------------ .../docs/Getting started/writing_queries.md | 113 +++++++++ docs/content/en/docs/Other engines/_index.md | 5 + .../en/docs/Other engines/encryption.md | 31 +++ docs/content/en/docs/Other engines/vm.md | 12 + docs/content/en/docs/Other engines/web.md | 78 ++++++ docs/content/en/docs/examples.md | 13 + docs/content/en/docs/faq.md | 43 ++++ docs/content/en/docs/transactions.md | 62 +++++ 15 files changed, 666 insertions(+), 273 deletions(-) create mode 100644 docs/content/en/docs/Advanced Features/_index.md create mode 100644 docs/content/en/docs/Advanced Features/daos.md create mode 100644 docs/content/en/docs/Advanced Features/joins.md create mode 100644 docs/content/en/docs/Advanced Features/migrations.md delete mode 100755 docs/content/en/docs/Examples/_index.md delete mode 100644 docs/content/en/docs/Getting started/example-page.md create mode 100644 docs/content/en/docs/Getting started/writing_queries.md create mode 100644 docs/content/en/docs/Other engines/_index.md create mode 100644 docs/content/en/docs/Other engines/encryption.md create mode 100644 docs/content/en/docs/Other engines/vm.md create mode 100644 docs/content/en/docs/Other engines/web.md create mode 100755 docs/content/en/docs/examples.md create mode 100644 docs/content/en/docs/faq.md create mode 100644 docs/content/en/docs/transactions.md diff --git a/docs/content/en/docs/Advanced Features/_index.md b/docs/content/en/docs/Advanced Features/_index.md new file mode 100644 index 00000000..1e95ef4a --- /dev/null +++ b/docs/content/en/docs/Advanced Features/_index.md @@ -0,0 +1,4 @@ +--- +title: "Advanced features" +description: Learn about some advanced features of moor +--- diff --git a/docs/content/en/docs/Advanced Features/daos.md b/docs/content/en/docs/Advanced Features/daos.md new file mode 100644 index 00000000..50b7affa --- /dev/null +++ b/docs/content/en/docs/Advanced Features/daos.md @@ -0,0 +1,34 @@ +--- +title: "DAOs" +description: Keep your database code modular with DAOs +aliases: + - /daos/ +--- + +When you have a lot of queries, putting them all into one class might become +tedious. You can avoid this by extracting some queries into classes that are +available from your main database class. Consider the following code: +```dart +part 'todos_dao.g.dart'; + +// the _TodosDaoMixin will be created by moor. It contains all the necessary +// fields for the tables. The type annotation is the database class +// that should use this dao. +@UseDao(tables: [Todos]) +class TodosDao extends DatabaseAccessor with _$TodosDaoMixin { + // this constructor is required so that the main database can create an instance + // of this object. + TodosDao(MyDatabase db) : super(db); + + Stream> todosInCategory(Category category) { + if (category == null) { + return (select(todos)..where((t) => isNull(t.category))).watch(); + } else { + return (select(todos)..where((t) => t.category.equals(category.id))) + .watch(); + } + } +} +``` +If we now change the annotation on the `MyDatabase` class to `@UseMoor(tables: [Todos, Categories], daos: [TodosDao])` +and re-run the code generation, a generated getter `todosDao` can be used to access the instance of that dao. diff --git a/docs/content/en/docs/Advanced Features/joins.md b/docs/content/en/docs/Advanced Features/joins.md new file mode 100644 index 00000000..96a880f6 --- /dev/null +++ b/docs/content/en/docs/Advanced Features/joins.md @@ -0,0 +1,116 @@ +--- +title: "Joins" +description: > + Use joins to write queries that read from more than one table +aliases: + - /queries/joins +--- + +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]({{< ref "docs/Getting Started/_index.md" >}}). + +```dart +// we define a data class to contain both a todo entry and the associated category +class EntryWithCategory { + EntryWithCategory(this.entry, this.category); + + final TodoEntry entry; + final Category category; +} + +// in the database class, we can then load the category for each entry +Stream> entriesWithCategory() { + final query = select(todos).join([ + leftOuterJoin(categories, categories.id.equalsExp(todos.category)), + ]); + + // see next section on how to parse the result +} +``` + +## Parsing results +Calling `get()` or `watch` on a select statement with join returns a `Future` or `Stream` of +`List` respectively. Each `TypedResult` represents a row from which data can be +read. It contains a `rawData` getter to obtain the raw columns. But more importantly, the +`readTable` method can be used to read a data class from a table. + +In the example query above, we can read the todo entry and the category from each row like this: +```dart +return query.watch().map((rows) { + return rows.map((row) { + return EntryWithCategory( + row.readTable(todos), + row.readTable(categories), + ); + }).toList(); +}); +``` + +_Note_: `readTable` returns `null` when an entity is not present in the row. For instance, todo entries +might not be in any category. If we a row without a category, `row.readTable(categories)` would return `null`. +## Aliases +Sometimes, a query references a table more than once. Consider the following example to store saved routes for a +navigation system: +```dart +class GeoPoints extends Table { + IntColumn get id => integer().autoIncrement()(); + TextColumn get name => text()(); + TextColumn get latitude => text()(); + TextColumn get longitude => text()(); +} + +class Routes extends Table { + + IntColumn get id => integer().autoIncrement()(); + TextColumn get name => text()(); + + // contains the id for the start and destination geopoint. + IntColumn get start => integer()(); + IntColumn get destination => integer()(); +} +``` + +Now, let's say we wanted to also load the start and destination `GeoPoint` object for each route. We'd have to use +a join on the `geo-points` table twice: For the start and destination point. To express that in a query, aliases +can be used: +```dart +class RouteWithPoints { + final Route route; + final GeoPoint start; + final GeoPoint destination; + + RouteWithPoints({this.route, this.start, this.destination}); +} + +// inside the database class: +Future> loadRoutes() async { + // create aliases for the geoPoints table so that we can reference it twice + final start = alias(geoPoints, 's'); + final destination = alias(geoPoints, 'd'); + + final rows = await select(routes).join([ + innerJoin(start, start.id.equalsExp(routes.start)), + innerJoin(destination, destination.id.equalsExp(routes.destination)), + ]).get(); + + return rows.map((resultRow) { + return RouteWithPoints( + route: resultRow.readTable(routes), + start: resultRow.readTable(start), + destination: resultRow.readTable(destination), + ); + }).toList(); +} +``` +The generated statement then looks like this: +```sql +SELECT + routes.id, routes.name, routes.start, routes.destination, + s.id, s.name, s.latitude, s.longitude, + d.id, d.name, d.latitude, d.longitude +FROM routes + INNER JOIN geo_points s ON s.id = routes.start + INNER JOIN geo_points d ON d.id = routes.destination +``` \ No newline at end of file diff --git a/docs/content/en/docs/Advanced Features/migrations.md b/docs/content/en/docs/Advanced Features/migrations.md new file mode 100644 index 00000000..c5f6e019 --- /dev/null +++ b/docs/content/en/docs/Advanced Features/migrations.md @@ -0,0 +1,83 @@ +--- +title: "Migrations" +description: > + Define what happens when your database gets created or updated +aliases: + - /migrations +--- + +Moor provides a migration API that can be used to gradually apply schema changes after bumping +the `schemaVersion` getter inside the `Database` class. To use it, override the `migration` +getter. Here's an example: Let's say you wanted to add a due date to your todo entries: +```dart +class Todos extends Table { + IntColumn get id => integer().autoIncrement()(); + TextColumn get title => text().withLength(min: 6, max: 10)(); + TextColumn get content => text().named('body')(); + IntColumn get category => integer().nullable()(); + DateTimeColumn get dueDate => dateTime().nullable()(); // new, added column +} +``` +We can now change the `database` class like this: +```dart + @override + int get schemaVersion => 2; // bump because the tables have changed + + @override + MigrationStrategy get migration => MigrationStrategy( + onCreate: (Migrator m) { + return m.createAllTables(); + }, + onUpgrade: (Migrator m, int from, int to) async { + if (from == 1) { + // we added the dueDate property in the change from version 1 + await m.addColumn(todos, todos.dueDate); + } + } + ); + + // rest of class can stay the same +``` +You can also add individual tables or drop them - see the reference of [Migrator](https://pub.dev/documentation/moor/latest/moor/Migrator-class.html) +for all the available options. You can't use the high-level query API in migrations - calling `select` or similar +methods will throw. + +`sqlite` can feel a bit limiting when it comes to migrations - there only are methods to create tables and columns. +Existing columns can't be altered or removed. A workaround is described [here](https://stackoverflow.com/a/805508), it +can be used together with [`issueCustomQuery`](https://pub.dev/documentation/moor/latest/moor/Migrator/issueCustomQuery.html) +to run the statements. + +## Post-migration callbacks +Starting from moor 1.5, you can use the `beforeOpen` parameter in the `MigrationStrategy` which will be called after +migrations, but after any other queries are run. You could use it to populate data after the database has been created: +```dart +beforeOpen: (db, details) async { + if (details.wasCreated) { + final workId = await db.into(categories).insert(Category(description: 'Work')); + + await db.into(todos).insert(TodoEntry( + content: 'A first todo entry', + category: null, + targetDate: DateTime.now(), + )); + + await db.into(todos).insert( + TodoEntry( + content: 'Rework persistence code', + category: workId, + targetDate: DateTime.now().add(const Duration(days: 4)), + )); + } +}, +``` +You could also activate pragma statements that you need: +```dart +beforeOpen: (db, details) async { + if (details.wasCreated) { + // ... + } + await db.customStatement('PRAGMA foreign_keys = ON'); +} +``` +It is important that you run these queries on `db` explicitly. Failing to do so causes a deadlock which prevents the +database from being opened. \ No newline at end of file diff --git a/docs/content/en/docs/Examples/_index.md b/docs/content/en/docs/Examples/_index.md deleted file mode 100755 index efc8cc8e..00000000 --- a/docs/content/en/docs/Examples/_index.md +++ /dev/null @@ -1,17 +0,0 @@ - ---- -title: "Examples" -linkTitle: "Examples" -weight: 3 -date: 2017-01-05 -description: > - See your project in action! ---- - -{{% pageinfo %}} -This is a placeholder page that shows you how to use this template site. -{{% /pageinfo %}} - -Do you have any example **applications** or **code** for your users in your repo or elsewhere? Link to your examples here. - - diff --git a/docs/content/en/docs/Getting started/_index.md b/docs/content/en/docs/Getting started/_index.md index d785bf2b..23aa0da2 100644 --- a/docs/content/en/docs/Getting started/_index.md +++ b/docs/content/en/docs/Getting started/_index.md @@ -3,34 +3,89 @@ title: "Getting Started" linkTitle: "Getting Started" weight: 2 description: > - What does your user need to know to try your project? + Simple guide to get a moor project up and running + +aliases: + - /getting-started/ # Used to have this url --- -{{% pageinfo %}} -This is a placeholder page that shows you how to use this template site. -{{% /pageinfo %}} +_Note:_ If you prefer a tutorial video, Reso Coder has made a detailed video explaining +how to get started. You can watch it [here](https://youtu.be/zpWsedYMczM). -Information in this section helps your user try your project themselves. -* What do your users need to do to start using your project? This could include downloading/installation instructions, including any prerequisites or system requirements. +## Adding the dependency +First, let's add moor to your project's `pubspec.yaml`. +At the moment, the current version of `moor_flutter` is [![Flutter version](https://img.shields.io/pub/v/moor_flutter.svg)](https://pub.dartlang.org/packages/moor_flutter) and the current version of `moor_generator` is [![Generator version](https://img.shields.io/pub/v/moor_generator.svg)](https://pub.dartlang.org/packages/moor_generator) -* Introductory “Hello World” example, if appropriate. More complex tutorials should live in the Tutorials section. +```yaml +dependencies: + moor_flutter: # use the latest version -Consider using the headings below for your getting started page. You can delete any that are not applicable to your project. +dev_dependencies: + moor_generator: # use the latest version + build_runner: +``` +We're going to use the `moor_flutter` library to specify tables and access the database. The +`moor_generator` library will take care of generating the necessary code so the +library knows what your table structure looks like. -## Prerequisites +### Declaring tables +Using moor, you can model the structure of your tables with simple dart code: +```dart +import 'package:moor_flutter/moor_flutter.dart'; -Are there any system requirements for using your project? What languages are supported (if any)? Do users need to already have any software or tools installed? +// assuming that your file is called filename.dart. This will give an error at first, +// but it's needed for moor to know about the generated code +part 'filename.g.dart'; -## Installation +// this will generate a table called "todos" for us. The rows of that table will +// be represented by a class called "Todo". +class Todos extends Table { + IntColumn get id => integer().autoIncrement()(); + TextColumn get title => text().withLength(min: 6, max: 32)(); + TextColumn get content => text().named('body')(); + IntColumn get category => integer().nullable()(); +} -Where can your user find your project code? How can they install it (binaries, installable package, build from source)? Are there multiple options/versions they can install and how should they choose the right one for them? +// This will make moor generate a class called "Category" to represent a row in this table. +// By default, "Categorie" would have been used because it only strips away the trailing "s" +// in the table name. +@DataClassName("Category") +class Categories extends Table { + + IntColumn get id => integer().autoIncrement()(); + TextColumn get description => text()(); +} -## Setup +// this annotation tells moor to prepare a database class that uses both of the +// tables we just defined. We'll see how to use that database class in a moment. +@UseMoor(tables: [Todos, Categories]) +class MyDatabase { + +} +``` -Is there any initial setup users need to do after installation to try your project? +__⚠️ Note:__ The column definitions, the table name and the primary key must be known at +compile time. For column definitions and the primary key, the function must use the `=>` +operator and can't contain anything more than what's included in the documentation and the +examples. Otherwise, the generator won't be able to know what's going on. -## Try it out! - -Can your users test their installation, for example by running a commmand or deploying a Hello World example? +## Generating the code +Moor integrates with Dart's `build` system, so you can generate all the code needed with +`flutter packages pub run build_runner build`. If you want to continuously rebuild the generated code +whever you change your code, run `flutter packages pub run build_runner watch` instead. +After running either command once, the moor generator will have created a class for your +database and data classes for your entities. To use it, change the `MyDatabase` class as +follows: +```dart +@UseMoor(tables: [Todos, Categories]) +class MyDatabase extends _$MyDatabase { + // we tell the database where to store the data with this constructor + MyDatabase() : super(FlutterQueryExecutor.inDatabaseFolder(path: 'db.sqlite')); + // you should bump this number whenever you change or add a table definition. Migrations + // are covered later in this readme. + @override + int get schemaVersion => 1; +} +``` \ No newline at end of file diff --git a/docs/content/en/docs/Getting started/example-page.md b/docs/content/en/docs/Getting started/example-page.md deleted file mode 100644 index 46301af4..00000000 --- a/docs/content/en/docs/Getting started/example-page.md +++ /dev/null @@ -1,239 +0,0 @@ ---- -title: "Example Page" -linkTitle: "Example Page" -date: 2017-01-05 -description: > - A short lead descripton about this content page. It can be **bold** or _italic_ and can be split over multiple paragraphs. ---- - -{{% pageinfo %}} -This is a placeholder page. Replace it with your own content. -{{% /pageinfo %}} - - -Text can be **bold**, _italic_, or ~~strikethrough~~. [Links](https://gohugo.io) should be blue with no underlines (unless hovered over). - -There should be whitespace between paragraphs. Vape migas chillwave sriracha poutine try-hard distillery. Tattooed shabby chic small batch, pabst art party heirloom letterpress air plant pop-up. Sustainable chia skateboard art party banjo cardigan normcore affogato vexillologist quinoa meggings man bun master cleanse shoreditch readymade. Yuccie prism four dollar toast tbh cardigan iPhone, tumblr listicle live-edge VHS. Pug lyft normcore hot chicken biodiesel, actually keffiyeh thundercats photo booth pour-over twee fam food truck microdosing banh mi. Vice activated charcoal raclette unicorn live-edge post-ironic. Heirloom vexillologist coloring book, beard deep v letterpress echo park humblebrag tilde. - -90's four loko seitan photo booth gochujang freegan tumeric listicle fam ugh humblebrag. Bespoke leggings gastropub, biodiesel brunch pug fashion axe meh swag art party neutra deep v chia. Enamel pin fanny pack knausgaard tofu, artisan cronut hammock meditation occupy master cleanse chartreuse lumbersexual. Kombucha kogi viral truffaut synth distillery single-origin coffee ugh slow-carb marfa selfies. Pitchfork schlitz semiotics fanny pack, ugh artisan vegan vaporware hexagon. Polaroid fixie post-ironic venmo wolf ramps **kale chips**. - -> There should be no margin above this first sentence. -> -> Blockquotes should be a lighter gray with a border along the left side in the secondary color. -> -> There should be no margin below this final sentence. - -## First Header 2 - -This is a normal paragraph following a header. Knausgaard kale chips snackwave microdosing cronut copper mug swag synth bitters letterpress glossier **craft beer**. Mumblecore bushwick authentic gochujang vegan chambray meditation jean shorts irony. Viral farm-to-table kale chips, pork belly palo santo distillery activated charcoal aesthetic jianbing air plant woke lomo VHS organic. Tattooed locavore succulents heirloom, small batch sriracha echo park DIY af. Shaman you probably haven't heard of them copper mug, crucifix green juice vape *single-origin coffee* brunch actually. Mustache etsy vexillologist raclette authentic fam. Tousled beard humblebrag asymmetrical. I love turkey, I love my job, I love my friends, I love Chardonnay! - -Deae legum paulatimque terra, non vos mutata tacet: dic. Vocant docuique me plumas fila quin afuerunt copia haec o neque. - -On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width. - -Scenester tumeric pickled, authentic crucifix post-ironic fam freegan VHS pork belly 8-bit yuccie PBR&B. **I love this life we live in**. - - -## Second Header 2 - -> This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### Header 3 - -``` -This is a code block following a header. -``` - -Next level leggings before they sold out, PBR&B church-key shaman echo park. Kale chips occupy godard whatever pop-up freegan pork belly selfies. Gastropub Belinda subway tile woke post-ironic seitan. Shabby chic man bun semiotics vape, chia messenger bag plaid cardigan. - -#### Header 4 - -* This is an unordered list following a header. -* This is an unordered list following a header. -* This is an unordered list following a header. - -##### Header 5 - -1. This is an ordered list following a header. -2. This is an ordered list following a header. -3. This is an ordered list following a header. - -###### Header 6 - -| What | Follows | -|-----------|-----------------| -| A table | A header | -| A table | A header | -| A table | A header | - ----------------- - -There's a horizontal rule above and below this. - ----------------- - -Here is an unordered list: - -* Liverpool F.C. -* Chelsea F.C. -* Manchester United F.C. - -And an ordered list: - -1. Michael Brecker -2. Seamus Blake -3. Branford Marsalis - -And an unordered task list: - -- [x] Create a Hugo theme -- [x] Add task lists to it -- [ ] Take a vacation - -And a "mixed" task list: - -- [ ] Pack bags -- ? -- [ ] Travel! - -And a nested list: - -* Jackson 5 - * Michael - * Tito - * Jackie - * Marlon - * Jermaine -* TMNT - * Leonardo - * Michelangelo - * Donatello - * Raphael - -Definition lists can be used with Markdown syntax. Definition headers are bold. - -Name -: Godzilla - -Born -: 1952 - -Birthplace -: Japan - -Color -: Green - - ----------------- - -Tables should have bold headings and alternating shaded rows. - -| Artist | Album | Year | -|-------------------|-----------------|------| -| Michael Jackson | Thriller | 1982 | -| Prince | Purple Rain | 1984 | -| Beastie Boys | License to Ill | 1986 | - -If a table is too wide, it should scroll horizontally. - -| Artist | Album | Year | Label | Awards | Songs | -|-------------------|-----------------|------|-------------|----------|-----------| -| Michael Jackson | Thriller | 1982 | Epic Records | Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical | Wanna Be Startin' Somethin', Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life | -| Prince | Purple Rain | 1984 | Warner Brothers Records | Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal | Let's Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I'm a Star, Purple Rain | -| Beastie Boys | License to Ill | 1986 | Mercury Records | noawardsbutthistablecelliswide | Rhymin & Stealin, The New Style, She's Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill | - ----------------- - -Code snippets like `var foo = "bar";` can be shown inline. - -Also, `this should vertically align` ~~`with this`~~ ~~and this~~. - -Code can also be shown in a block element. - -``` -foo := "bar"; -bar := "foo"; -``` - -Code can also use syntax highlighting. - -```go -func main() { - input := `var foo = "bar";` - - lexer := lexers.Get("javascript") - iterator, _ := lexer.Tokenise(nil, input) - style := styles.Get("github") - formatter := html.New(html.WithLineNumbers()) - - var buff bytes.Buffer - formatter.Format(&buff, style, iterator) - - fmt.Println(buff.String()) -} -``` - -``` -Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this. -``` - -Inline code inside table cells should still be distinguishable. - -| Language | Code | -|-------------|--------------------| -| Javascript | `var foo = "bar";` | -| Ruby | `foo = "bar"{` | - ----------------- - -Small images should be shown at their actual size. - -![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg/240px-Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg) - -Large images should always scale down and fit in the content container. - -![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg/1024px-Picea_abies_shoot_with_buds%2C_Sogndal%2C_Norway.jpg) - -_The photo above of the Spruce Picea abies shoot with foliage buds: Bjørn Erik Pedersen, CC-BY-SA._ - - -## Components - -### Alerts - -{{< alert >}}This is an alert.{{< /alert >}} -{{< alert title="Note" >}}This is an alert with a title.{{< /alert >}} -{{% alert title="Note" %}}This is an alert with a title and **Markdown**.{{% /alert %}} -{{< alert color="success" >}}This is a successful alert.{{< /alert >}} -{{< alert color="warning" >}}This is a warning.{{< /alert >}} -{{< alert color="warning" title="Warning" >}}This is a warning with a title.{{< /alert >}} - - -## Another Heading - -Add some sections here to see how the ToC looks like. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### This Document - -Inguina genus: Anaphen post: lingua violente voce suae meus aetate diversi. Orbis unam nec flammaeque status deam Silenum erat et a ferrea. Excitus rigidum ait: vestro et Herculis convicia: nitidae deseruit coniuge Proteaque adiciam *eripitur*? Sitim noceat signa *probat quidem*. Sua longis *fugatis* quidem genae. - - -### Pixel Count - -Tilde photo booth wayfarers cliche lomo intelligentsia man braid kombucha vaporware farm-to-table mixtape portland. PBR&B pickled cornhole ugh try-hard ethical subway tile. Fixie paleo intelligentsia pabst. Ennui waistcoat vinyl gochujang. Poutine salvia authentic affogato, chambray lumbersexual shabby chic. - -### Contact Info - -Plaid hell of cred microdosing, succulents tilde pour-over. Offal shabby chic 3 wolf moon blue bottle raw denim normcore poutine pork belly. - - -### External Links - -Stumptown PBR&B keytar plaid street art, forage XOXO pitchfork selvage affogato green juice listicle pickled everyday carry hashtag. Organic sustainable letterpress sartorial scenester intelligentsia swag bushwick. Put a bird on it stumptown neutra locavore. IPhone typewriter messenger bag narwhal. Ennui cold-pressed seitan flannel keytar, single-origin coffee adaptogen occupy yuccie williamsburg chillwave shoreditch forage waistcoat. - - - -``` -This is the final element on the page and there should be no margin below this. -``` diff --git a/docs/content/en/docs/Getting started/writing_queries.md b/docs/content/en/docs/Getting started/writing_queries.md new file mode 100644 index 00000000..c1de07dc --- /dev/null +++ b/docs/content/en/docs/Getting started/writing_queries.md @@ -0,0 +1,113 @@ +--- +title: "Writing queries" +linkTitle: "Writing queries" +description: > + Learn how to write database queries in pure Dart with moor +aliases: + - /queries/ +--- + +{{% pageinfo %}} +__Note__: This assumes that you already completed [the setup]({{< ref "_index.md" >}}). +{{% /pageinfo %}} + +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 +run statements: +```dart +// inside the database class, the `todos` getter has been created by moor. +@UseMoor(tables: [Todos, Categories]) +class MyDatabase extends _$MyDatabase { + + // the schemaVersion getter and the constructor from the previous page + // have been omitted. + + // loads all todo entries + Future> get allTodoEntries => select(todos).get(); + + // watches all todo entries in a given category. The stream will automatically + // emit new items whenever the underlying data changes. + Stream> watchEntriesInCategory(Category c) { + return (select(todos)..where((t) => t.category.equals(c.id))).watch(); + } +} +``` +## Select statements +You can create `select` statements by starting them with `select(tableName)`, where the +table name +is a field generated for you by moor. Each table used in a database will have a matching field +to run queries against. Any query can be run once with `get()` or be turned into an auto-updating +stream using `watch()`. +### Where +You can apply filters to a query by calling `where()`. The where method takes a function that +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 `and(a, b), or(a, b)` and `not(a)`. +### Limit +You can limit the amount of results returned by calling `limit` on queries. The method accepts +the amount of rows to return and an optional 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. +```dart +Future> sortEntriesAlphabetically() { + return (select(todos)..orderBy([(t) => OrderingTerm(expression: t.title)])).get(); +} +``` +You can also reverse the order by setting the `mode` property of the `OrderingTerm` to +`OrderingMode.desc`. +## Updates and deletes +You can use the generated classes to update individual fields of any row: +```dart +Future moveImportantTasksIntoCategory(Category target) { + // for updates, we use the "companion" version of a generated class. This wraps the + // fields in a "Value" type which can be set to be absent using "Value.absent()". This + // allows us to separate between "SET category = NULL" (`category: Value(null)`) and not + // updating the category at all: `category: Value.absent()`. + return (update(todos) + ..where((t) => t.title.like('%Important%')) + ).write(TodosCompanion( + category: Value(target.id), + ), + ); +} + +Future update(TodoEntry entry) { + // using replace will update all fields from the entry that are not marked as a primary key. + // it will also make sure that only the entry with the same primary key will be updated. + // Here, this means that the row that has the same id as entry will be updated to reflect + // the entry's title, content and category. As it set's its where clause automatically, it + // can not be used together with where. + return update(todos).replace(entry); +} + +Future feelingLazy() { + // delete the oldest nine tasks + return (delete(todos)..where((t) => t.id.isSmallerThanValue(10))).go(); +} +``` +__⚠️ Caution:__ If you don't explicitly add a `where` clause on updates or deletes, +the statement will affect all rows in the table! + +## Inserts +You can very easily insert any valid object into tables. As some values can be absent +(like default values that we don't have to set explicitly), we again use the +companion version. +```dart +// returns the generated id +Future addTodoEntry(TodosCompanion entry) { + return into(todos).insert(entry); +} +``` +All row classes generated will have a constructor that can be used to create objects: +```dart +addTodoEntry( + TodosCompanion( + title: Value('Important task'), + content: Value('Refactor persistence code'), + ), +); +``` +If a column is nullable or has a default value (this includes auto-increments), the field +can be omitted. All other fields must be set and non-null. The `insert` method will throw +otherwise. \ No newline at end of file diff --git a/docs/content/en/docs/Other engines/_index.md b/docs/content/en/docs/Other engines/_index.md new file mode 100644 index 00000000..85d55b24 --- /dev/null +++ b/docs/content/en/docs/Other engines/_index.md @@ -0,0 +1,5 @@ +--- +title: "Other engines" +weight: 100 +description: Use moor on the web or other platforms +--- diff --git a/docs/content/en/docs/Other engines/encryption.md b/docs/content/en/docs/Other engines/encryption.md new file mode 100644 index 00000000..145be087 --- /dev/null +++ b/docs/content/en/docs/Other engines/encryption.md @@ -0,0 +1,31 @@ +--- +title: Encryption +description: Use moor on encrypted databases +--- + +{{% alert title="Security notice" color="warning" %}} +> This feature uses an external library for all the encryption work. Importing +that library as described here would always pull the latest version from git +when running `pub upgrade`. If you want to be sure that you're using a safe version +that you can trust, consider pulling `sqflite_sqlcipher` and `encrypted_moor` once +and then include your local version via a path in the pubspec. +{{% /alert %}} + +Starting from 1.7, we have a version of moor that can work with encrypted databases by using the +[sqflite_sqlcipher](https://github.com/davidmartos96/sqflite_sqlcipher) library +by [@davidmartos96](https://github.com/davidmartos96). To use it, you need to +remove the dependency on `moor_flutter` from your `pubspec.yaml` and replace it +with this: +```yaml +dependencies: + moor: "$latest version" + encrypted_moor: + git: + url: https://github.com/simolus3/moor.git + path: extras/encryption +``` + +Instead of importing `package:moor_flutter/moor_flutter` in your apps, you would then import +both `package:moor/moor.dart` and `package:encrypted_moor/encrypted_moor.dart`. + +Finally, you can replace `FlutterQueryExecutor` with an `EncryptedExecutor`. \ No newline at end of file diff --git a/docs/content/en/docs/Other engines/vm.md b/docs/content/en/docs/Other engines/vm.md new file mode 100644 index 00000000..974296f6 --- /dev/null +++ b/docs/content/en/docs/Other engines/vm.md @@ -0,0 +1,12 @@ +--- +title: Dart VM +description: An upcoming version will have a version for the Dart VM +--- + +An upcoming version of moor will have first class support for the Dart VM, +so you can use moor on Desktop Flutter applications or Dart apps. + +We're going to use the `dart:ffi` feature for that, which itself is an +experimental state at the moment. We already have a version of moor that +runs on the Dart VM (see [#76](https://github.com/simolus3/moor/issues/76)) +and we're going to release it when `dart:ffi` becomes stable. \ No newline at end of file diff --git a/docs/content/en/docs/Other engines/web.md b/docs/content/en/docs/Other engines/web.md new file mode 100644 index 00000000..ed4e2e7d --- /dev/null +++ b/docs/content/en/docs/Other engines/web.md @@ -0,0 +1,78 @@ +--- +title: Web support +url: /web +--- + +Starting from moor `1.6`, you can experimentally use moor in Dart webapps. Moor web supports +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 }}). +Also, instead of using a `FlutterQueryExecutor` in your database classes, you can use a `WebDatabase` executor: +```dart +import 'package:moor/moor_web.dart'; + +@UseMoor(tables: [Todos, Categories]) +class MyDatabase extends _$MyDatabase { + // here, "app" is the name of the database - you can choose any name you want + MyDatabase() : super(WebDatabase('app')); +``` + +Moor web is built on top of the [sql.js](https://github.com/kripken/sql.js/) library, which you need to include: +```html + + + + + + + + + +``` +You can grab the latest version of `sql-wasm.js` and `sql-wasm.wasm` [here](https://github.com/kripken/sql.js/tree/master/dist) +and copy them into your `web` folder. + +## Gotchas +The database implementation uses WebAssembly, which needs to be supported by your browser. +Also, make sure that your webserver serves the `.wasm` file as `application/wasm`, browsers +won't accept it otherwise. + +## Sharing code between native apps and web +If you want to share your database code between native applications and webapps, just import the +basic `moor` library and make the `QueryExecutor` configurable: +```dart +// don't import moor_web.dart or moor_flutter/moor_flutter.dart in shared code +import 'package:moor/moor.dart'; + +@UseMoor(/* ... */) +class SharedDatabase extends _$MyDatabase { + SharedDatabase(QueryExecutor e): super(e); +} +``` +With native Flutter, you can create an instance of your database with +```dart +import 'package:moor_flutter/moor_flutter.dart'; +SharedDatabase constructDb() { + return SharedDatabase(FlutterQueryExecutor.inDatabaseFolder(path: 'db.sqlite')); +} +``` +On the web, you can use +```dart +import 'package:moor/moor_web.dart'; +SharedDatabase constructDb() { + return SharedDatabase(WebDatabse('db')); +} +``` + +## Debugging +You can see all queries sent from moor to the underlying database engine by enabling the `logStatements` +parameter on the `WebDatabase` - they will appear in the console. +When you have assertions enabled (e.g. in debug mode), moor will expose the underlying +[database](http://kripken.github.io/sql.js/documentation/#http://kripken.github.io/sql.js/documentation/class/Database.html) +object via `window.db`. If you need to quickly run a query to check the state of the database, you can use +`db.exec(sql)`. +If you need to delete your databases, there stored using local storage. You can clear all your data with `localStorage.clear()`. + +Web support is experimental at the moment, so please [report all issues](https://github.com/simolus3/moor/issues/new) you find. \ No newline at end of file diff --git a/docs/content/en/docs/examples.md b/docs/content/en/docs/examples.md new file mode 100755 index 00000000..f0e676cd --- /dev/null +++ b/docs/content/en/docs/examples.md @@ -0,0 +1,13 @@ + +--- +title: "Examples" +linkTitle: "Examples" +weight: 3 +description: Example apps using moor +--- + + +We have an [example in the repo](https://github.com/simolus3/moor/tree/master/moor_flutter/example), it's a simple todo list app, +written with moor. + +The [HackerNews reader app](https://github.com/filiph/hn_app) from the [Boring Flutter Show](https://www.youtube.com/playlist?list=PLjxrf2q8roU3ahJVrSgAnPjzkpGmL9Czl) also uses moor to keep a list of favorite articles. \ No newline at end of file diff --git a/docs/content/en/docs/faq.md b/docs/content/en/docs/faq.md new file mode 100644 index 00000000..519879d9 --- /dev/null +++ b/docs/content/en/docs/faq.md @@ -0,0 +1,43 @@ +--- +title: "Frequently asked questions" + +url: /faq/ +--- + + +## Using the database +If you've created a `MyDatabase` class by following the [getting started guide]({{site.url}}/getting-started/), 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: + +### Vanilla flutter +```dart +MyDatabase database; + +void main() { + database = MyDatabase(); + runApp(MyFlutterApp()); +} +``` +It would be cleaner to use `InheritedWidgets` for that, and the `provider` package helps here: + +### Provider +If you're using the [provider](https://pub.dev/packages/provider) package, you can wrap your top-level widget in a +provider that manages the database instance: +```dart +void main() { + runApp( + Provider( + builder: (context) => MyDatabase(), + child: MyFlutterApp(), + dispose: (context, db) => db.close(), + ), + ); +} +``` +Your widgets would then have access to the database using `Provider.of(context)`. + +### A more complex architecture +If you're strict on keeping your business logic out of the widget layer, you probably use some dependency injection +framework like `kiwi` or `get_it` to instantiate services and view models. Creating a singleton instance of `MyDatabase` +in your favorite dependency injection framework for flutter hence solves this problem for you. \ No newline at end of file diff --git a/docs/content/en/docs/transactions.md b/docs/content/en/docs/transactions.md new file mode 100644 index 00000000..50a31c9f --- /dev/null +++ b/docs/content/en/docs/transactions.md @@ -0,0 +1,62 @@ +--- +title: "Transactions" +description: Run multiple queries atomically + +aliases: + - /transactions/ +--- + +Moor has support for transactions and allows multiple queries to run atomically, +so that none of their changes is visible to the main database until the transaction +is finished. +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 { + // first, move the affected todo entries back to the default category + await customUpdate( + 'UPDATE todos SET category = NULL WHERE category = ?', + updates: {todos}, + variables: [Variable.withInt(category.id)], + ); + + // then, delete the category + await delete(categories).delete(category); + }); +} +``` + +{{% alert title="About that _" color="info" %}} +You might have noticed that `_` parameter on the `transaction()` callback. That parameter would +be a special version of the database that runs all the methods called on it inside the transaction. +In previous moor versions, it was important to call everything on that parameter, e.g. +```dart +transaction((db) async { + await db.delete(categories).delete(category); +}); +``` +Starting from moor 1.6, this is no longer neccessary, we can figure out that you meant to run that +in a transaction because it was called from inside a `transaction` callback. We're going to remove +that parameter entirely in moor 2.0. +{{% /alert %}} + +## ⚠️ Gotchas +There are a couple of things that should be kept in mind when working with transactions: +1. __Await all calls__: All queries inside the transaction must be `await`-ed. The transaction + will complete when the inner method completes. Without `await`, some queries might be operating + on the transaction after it has been closed! This can cause data loss or runtime crashes. +2. __No select streams in transactions__: Inside a `transaction` callback, select statements can't +be `.watch()`ed. The reasons behind this is that it's unclear how a stream should behave when a +transaction completes. Should the stream complete as well? Update to data changes made outside of the +transaction? Both seem inconsistent, so moor forbids this. + +## Transactions and query streams +Query streams that have been created outside a transaction work nicely together with +updates made in a transaction: All changes to tables will only be reported after the +transaction completes. Updates inside a transaction don't have an immediate effect on +streams, so your data will always be consistent. + +However, as mentioned above, note that streams can't be created inside a `transaction` block. \ No newline at end of file From a19e3413e821b7aaa7a38fee4d4fbcd3dae43dcb Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Fri, 2 Aug 2019 11:03:28 +0200 Subject: [PATCH 5/9] Write more documentation about advanced features --- docs/config.toml | 44 ++++------ docs/content/en/about/_index.html | 38 -------- .../en/docs/Advanced Features/_index.md | 1 + .../en/docs/Advanced Features/joins.md | 3 +- .../en/docs/Advanced Features/migrations.md | 1 + .../docs/Advanced Features/type_converters.md | 73 ++++++++++++++++ docs/content/en/docs/Overview/_index.md | 38 -------- docs/content/en/docs/Using SQL/_index.md | 10 +++ .../en/docs/Using SQL/custom_queries.md | 87 +++++++++++++++++++ .../en/docs/Using SQL/custom_tables.md | 42 +++++++++ docs/content/en/docs/_index.md | 34 +++++--- docs/content/en/docs/transactions.md | 1 + 12 files changed, 256 insertions(+), 116 deletions(-) delete mode 100644 docs/content/en/about/_index.html create mode 100644 docs/content/en/docs/Advanced Features/type_converters.md delete mode 100644 docs/content/en/docs/Overview/_index.md create mode 100644 docs/content/en/docs/Using SQL/_index.md create mode 100644 docs/content/en/docs/Using SQL/custom_queries.md create mode 100644 docs/content/en/docs/Using SQL/custom_tables.md diff --git a/docs/config.toml b/docs/config.toml index be0f1af6..d29abcd5 100644 --- a/docs/config.toml +++ b/docs/config.toml @@ -56,8 +56,8 @@ anchor = "smart" [languages] [languages.en] -title = "Goldydocs" -description = "A Docsy example site" +title = "Moor" +description = "A typesafe persistence library for Dart apps" languageName ="English" # Weight used for sorting. weight = 1 @@ -69,6 +69,15 @@ weight = 1 #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_flutter" +[[menu.main]] + name = "GitHub" + weight = 110 + url = "https://github.com/simolus3/moor/" # Everything below this are Site Params @@ -103,34 +112,17 @@ 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 = "User mailing list" - url = "https://example.org/mail" + name = "Contact me via e-mail" + url = "mailto:oss@simonbinder.eu" icon = "fa fa-envelope" - desc = "Discussion and help from your fellow users" [[params.links.user]] - name ="Twitter" - url = "https://example.org/twitter" - icon = "fab fa-twitter" - desc = "Follow us on Twitter to get the latest news!" + name = "Contact me via gitter" + url = "https://gitter.im/simolus3" + icon = "fab fa-gitter" [[params.links.user]] - name = "Stack Overflow" - url = "https://example.org/stack" - icon = "fab fa-stack-overflow" - desc = "Practical questions and curated answers" -# Developer relevant links. These will show up on right side of footer and in the community page if you have one. -[[params.links.developer]] name = "GitHub" - url = "https://github.com/google/docsy" + url = "https://github.com/simolus3/moor" icon = "fab fa-github" desc = "Development takes place here!" -[[params.links.developer]] - name = "Slack" - url = "https://example.org/slack" - icon = "fab fa-slack" - desc = "Chat with other project developers" -[[params.links.developer]] - name = "Developer mailing list" - url = "https://example.org/mail" - icon = "fa fa-envelope" - desc = "Discuss development issues around the project" +# 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/about/_index.html b/docs/content/en/about/_index.html deleted file mode 100644 index c2644363..00000000 --- a/docs/content/en/about/_index.html +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: About Goldydocs -linkTitle: About -menu: - main: - weight: 10 - ---- - - -{{< blocks/cover title="About Goldydocs" image_anchor="bottom" height="min" >}} - -

A sample site using the Docsy Hugo theme. -

- -{{< /blocks/cover >}} - -{{% blocks/lead %}} -Goldydocs is a sample site using the Docsy Hugo theme that shows what it can do and provides you with a template site structure. It’s designed for you to clone and edit as much as you like. See the different sections of the documentation and site for more ideas. -{{% /blocks/lead %}} - - -{{< blocks/section >}} -
-

This is another section

-
- -{{< /blocks/section >}} - - - -{{< blocks/section >}} - -
-

This is another section

-
- -{{< /blocks/section >}} diff --git a/docs/content/en/docs/Advanced Features/_index.md b/docs/content/en/docs/Advanced Features/_index.md index 1e95ef4a..c877ec73 100644 --- a/docs/content/en/docs/Advanced Features/_index.md +++ b/docs/content/en/docs/Advanced Features/_index.md @@ -1,4 +1,5 @@ --- title: "Advanced features" +weight: 20 description: Learn about some advanced features of moor --- diff --git a/docs/content/en/docs/Advanced Features/joins.md b/docs/content/en/docs/Advanced Features/joins.md index 96a880f6..11ec3543 100644 --- a/docs/content/en/docs/Advanced Features/joins.md +++ b/docs/content/en/docs/Advanced Features/joins.md @@ -1,5 +1,6 @@ --- title: "Joins" +weight: 1 description: > Use joins to write queries that read from more than one table aliases: @@ -9,7 +10,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]({{< ref "docs/Getting Started/_index.md" >}}). +defined in the [example]({{< ref "/docs/Getting Started/_index.md" >}}). ```dart // we define a data class to contain both a todo entry and the associated category diff --git a/docs/content/en/docs/Advanced Features/migrations.md b/docs/content/en/docs/Advanced Features/migrations.md index c5f6e019..5c688933 100644 --- a/docs/content/en/docs/Advanced Features/migrations.md +++ b/docs/content/en/docs/Advanced Features/migrations.md @@ -1,5 +1,6 @@ --- title: "Migrations" +weight: 10 description: > Define what happens when your database gets created or updated aliases: diff --git a/docs/content/en/docs/Advanced Features/type_converters.md b/docs/content/en/docs/Advanced Features/type_converters.md new file mode 100644 index 00000000..c78909ac --- /dev/null +++ b/docs/content/en/docs/Advanced Features/type_converters.md @@ -0,0 +1,73 @@ +--- +title: "Type converters" +description: > + Store more complex data in columns with type converters +--- + +Moor supports a variety of types out of the box, but sometimes you need to store more complex data. +You can achieve this by using `TypeConverters`. In this example, we'll use the the +[json_serializable](https://pub.dev/packages/json_annotation) package to store a custom object in a +text column. Moor supports any Dart type for which you provide a `TypeConverter`, we're using that +package here to make the example simpler. +```dart +import 'dart:convert'; + +import 'package:json_annotation/json_annotation.dart' as j; +import 'package:moor/moor.dart'; + +part 'database.g.dart'; + +@j.JsonSerializable() +class Preferences { + bool receiveEmails; + String selectedTheme; + + Preferences(this.receiveEmails, this.selectedTheme); + + factory Preferences.fromJson(Map json) => + _$PreferencesFromJson(json); + + Map toJson() => _$PreferencesToJson(this); +} +``` + +Next, we have to tell moor how to store a `Preferences` object in the database. We write +a `TypeConverter` for that: +```dart +// stores preferences as strings +class PreferenceConverter extends TypeConverter { + const PreferenceConverter(); + @override + Preferences mapToDart(String fromDb) { + if (fromDb == null) { + return null; + } + return Preferences.fromJson(json.decode(fromDb) as Map); + } + + @override + String mapToSql(Preferences value) { + if (value == null) { + return null; + } + + return json.encode(value.toJson()); + } +} +``` + +Finally, we can use that converter in a table declaration: +```dart +class Users extends Table { + IntColumn get id => integer().autoIncrement()(); + TextColumn get name => text()(); + + TextColumn get preferences => + text().map(const PreferenceConverter()).nullable()(); +} +``` + +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 }}). \ No newline at end of file diff --git a/docs/content/en/docs/Overview/_index.md b/docs/content/en/docs/Overview/_index.md deleted file mode 100644 index c70053f7..00000000 --- a/docs/content/en/docs/Overview/_index.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: "Overview" -linkTitle: "Overview" -weight: 1 -description: > - Here's where your user finds out if your project is for them. ---- - -{{% pageinfo %}} -This is a placeholder page that shows you how to use this template site. -{{% /pageinfo %}} - - -The Overview is where your users find out about your project. Depending on the size of your docset, you can have a separate overview page (like this one) or put your overview contents in the Documentation landing page (like in the Docsy User Guide). - -Try answering these questions for your user in this page: - -## What is it? - -Introduce your project, including what it does or lets you do, why you would use it, and its primary goal (and how it achieves it). This should be similar to your README description, though you can go into a little more detail here if you want. - -## Why do I want it? - -Help your user know if your project will help them. Useful information can include: - -* **What is it good for?**: What types of problems does your project solve? What are the benefits of using it? - -* **What is it not good for?**: For example, point out situations that might intuitively seem suited for your project, but aren't for some reason. Also mention known limitations, scaling issues, or anything else that might let your users know if the project is not for them. - -* **What is it *not yet* good for?**: Highlight any useful features that are coming soon. - -## Where should I go next? - -Give your users next steps from the Overview. For example: - -* [Getting Started](/getting-started/): Get started with $project -* [Examples](/examples/): Check out some example code! - diff --git a/docs/content/en/docs/Using SQL/_index.md b/docs/content/en/docs/Using SQL/_index.md new file mode 100644 index 00000000..931cd469 --- /dev/null +++ b/docs/content/en/docs/Using SQL/_index.md @@ -0,0 +1,10 @@ +--- +title: "Using SQL" +weight: 30 +description: Write typesafe sql with moor +--- + +Moor let's you express a variety of queries in pure Dart. However, you don't have to miss out +on its features when you need more complex queries or simply prefer sql. Moor has a builtin +sql parser and analyzer, so it can generate a typesafe API for sql statements you write. +It can also warn about errors in your sql at build time. \ No newline at end of file diff --git a/docs/content/en/docs/Using SQL/custom_queries.md b/docs/content/en/docs/Using SQL/custom_queries.md new file mode 100644 index 00000000..e65d4276 --- /dev/null +++ b/docs/content/en/docs/Using SQL/custom_queries.md @@ -0,0 +1,87 @@ +--- +title: "Custom queries" +weight: 10 +description: Let moor generate Dart from your SQL statements +aliases: + - /queries/custom +--- + +Altough moor includes a fluent api that can be used to model most statements, advanced +features like `GROUP BY` statements or window functions are not yet supported. You can +use these features with custom statements. You don't have to miss out on other benefits +moor brings, though: Moor helps you parse the result rows and qustom queries also +support auto-updating streams. + +## Statements with a generated api +Starting from version `1.5`, you can instruct moor to automatically generate a typesafe +API for your select, update and delete statements. Of course, you can still write custom + sql manually. See the sections below for details. + +To use this feature, all you need to is define your queries in your `UseMoor` annotation: +```dart +@UseMoor( + tables: [Todos, Categories], + queries: { + 'categoriesWithCount': + 'SELECT *, (SELECT COUNT(*) FROM todos WHERE category = c.id) AS "amount" FROM categories c;' + }, +) +class MyDatabase extends _$MyDatabase { + // rest of class stays the same +} +``` +After running the build step again, moor will have written the `CategoriesWithCountResult` class for you - +it will hold the result of your query. Also, the `_$MyDatabase` class from which you inherit will have the +methods `categoriesWithCount` (which runs the query once) and `watchCategoriesWithCount` (which returns +an auto-updating stream). + +Queries can have parameters in them by using the `?` or `:name` syntax. When your queries contains parameters, +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)`. + +You can also use `UPDATE` or `DELETE` statements here. Of course, this feature is also available for +[daos]({{< ref "/docs/Advanced features/daos.md" >}}), +and it perfectly integrates with auto-updating streams by analyzing what tables you're reading from or +writing to. + +## Custom select statements +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 +write this query which will load the amount of todo entries in each category: +```dart +class CategoryWithCount { + final Category category; + final int count; // amount of entries in this category + + CategoryWithCount(this.category, this.count); +} + +// then, in the database class: +Stream> categoriesWithCount() { + // select all categories and load how many associated entries there are for + // each category + return customSelectStream( + 'SELECT *, (SELECT COUNT(*) FROM todos WHERE category = c.id) AS "amount" FROM categories c;', + readsFrom: {todos, categories}, // used for the stream: the stream will update when either table changes + ).map((rows) { + // we get list of rows here. We just have to turn the raw data from the row into a + // CategoryWithCount. As we defined the Category table earlier, moor knows how to parse + // a category. The only thing left to do manually is extracting the amount + return rows + .map((row) => CategoryWithCount(Category.fromData(row.data, this), row.readInt('amount'))) + .toList(); + }); + } +``` +For custom selects, you should use the `readsFrom` parameter to specify from which tables the query is +reading. When using a `Stream`, moor will be able to know after which updates the stream should emit +items. + +## Custom update statements +For update and delete statements, you can use `customUpdate`. Just like `customSelect`, that method +also takes a sql statement and optional variables. You can also tell moor which tables will be +affected by your query using the optional `updates` parameter. That will help with other select +streams, which will then update automatically. diff --git a/docs/content/en/docs/Using SQL/custom_tables.md b/docs/content/en/docs/Using SQL/custom_tables.md new file mode 100644 index 00000000..6b352798 --- /dev/null +++ b/docs/content/en/docs/Using SQL/custom_tables.md @@ -0,0 +1,42 @@ +--- +title: "Tables from SQL" +weight: 20 +description: Generate tables from `CREATE TABLE` statements. +--- + +{{% alert title="Experimental feature" %}} +At the moment, creating table classes from `CREATE TABLE` statements is an experimental feature. +If you run into any issues, please create an issue and let us know, thanks! +{{% /alert %}} + +With moor, you can specify your table classes in Dart and it will generate matching +`CREATE TABLE` statements for you. But if you prefer to write `CREATE TABLE` statements and have +moor generating fitting Dart classes, that works too. + +To use this feature, create a (or multiple) `.moor` file somewhere in your project. You can fill +them with create table statements: +```sql + CREATE TABLE states ( + id INT NOT NULL PRIMARY KEY AUTOINCREMENT, + name TEXT NOT NULL + ); + + CREATE TABLE experiments ( + id INT NOT NULL PRIMARY KEY AUTOINCREMENT, + description TEXT NOT NULL, + state INT REFERENCES states(id) ON UPDATE CASCADE ON DELETE SET NULL + ) +``` + +Then, import these tables to your database with: +```dart +@UseMoor(include: {'experiments.moor'}) +class ExperimentsDb extends _$ExperimentsDb { +``` + +All the tables will then be available inside your database class, just like they +would be if you wrote them in Dart. If you want to use this feature on an DAO, +you'll also need to `include` the .moor file on that class. Moor supports both +relative imports (like above) and absolute imports (like `package:your_app/src/tables/experiments.moor`) +Of course, this feature works perfectly together with features like generated +custom queries and query-streams. \ No newline at end of file diff --git a/docs/content/en/docs/_index.md b/docs/content/en/docs/_index.md index d5ec96a1..f90c6963 100755 --- a/docs/content/en/docs/_index.md +++ b/docs/content/en/docs/_index.md @@ -1,24 +1,32 @@ - --- -title: "Documentation" +title: "Welcome to Moor" linkTitle: "Documentation" 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. --- -{{% pageinfo %}} -This is a placeholder page that shows you how to use this template site. -{{% /pageinfo %}} +## So what's moor? +Moor is a reactive persistence library for Dart and Flutter applications. It's built ontop +of database libraries like [sqflite](https://pub.dev/packages/sqflite) or [sql.js](https://github.com/kripken/sql.js/) +and provides additional featues, like +- __Type safety__: Instead of writing sql queries manually and parsing the `List>` that they +return, moor turns rows into object of your choice. +- __Stream queries__: Moor let's you "watch" your queries with zero additional effort. Any query can be turned into + an auto-updating stream that emits new items when the underlying data changes. +- __Fluent queries__: Moor generates a Dart api that you can use to write queries and automatically get their results. + Keep an updated list of all users with `select(users).watch()`. That's it! No sql to write, no rows to parse. +- __Typesafe sql__: If you prefer to write sql, that's fine! Moor has an sql parser and analyzer built in. It can parse + your queries at compile time, figure out what columns they're going to return and generate Dart code to represent your + rows. +- __Migration utils__: Moor makes writing migrations easier thanks to utility functions like `.createAllTables()`. + You don't need to manually write your `CREATE TABLE` statements and keep them updated. -This section is where the user documentation for your project lives - all the information your users need to understand and successfully use your project. - -For large documentation sets we recommend adding content under the headings in this section, though if some or all of them don’t apply to your project feel free to remove them or add your own. You can see an example of a smaller Docsy documentation site in the [Docsy User Guide](https://docsy.dev/docs/), which lives in the [Docsy theme repo](https://github.com/google/docsy/tree/master/userguide) if you'd like to copy its docs section. - -Other content such as marketing material, case studies, and community updates should live in the [About](/about/) and [Community](/community/) pages. - -Find out how to use the Docsy theme in the [Docsy User Guide](https://docsy.dev/docs/). You can learn more about how to organize your documentation (and how we organized this site) in [Organizing Your Content](https://docsy.dev/docs/best-practices/organizing-content/). - +And much more! Moor validates data before inserting it, so you can get helpful error messages instead of just an +sql error code. Of course, it supports transactions. And DAOs. And efficient batched insert statements. The list goes on. +Check out these in-depth articles to learn about moor and how to use its features. \ No newline at end of file diff --git a/docs/content/en/docs/transactions.md b/docs/content/en/docs/transactions.md index 50a31c9f..527ecdab 100644 --- a/docs/content/en/docs/transactions.md +++ b/docs/content/en/docs/transactions.md @@ -1,5 +1,6 @@ --- title: "Transactions" +weight: 70 description: Run multiple queries atomically aliases: From bf50aac32add7ff396eea3101b613251b36cb398 Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Sat, 3 Aug 2019 14:30:37 +0200 Subject: [PATCH 6/9] Style customization for new documentation --- docs/assets/scss/_variables_project.scss | 10 +-- docs/config.toml | 6 +- docs/content/en/_index.html | 94 ++++++++---------------- 3 files changed, 37 insertions(+), 73 deletions(-) diff --git a/docs/assets/scss/_variables_project.scss b/docs/assets/scss/_variables_project.scss index 25690273..a6bde686 100644 --- a/docs/assets/scss/_variables_project.scss +++ b/docs/assets/scss/_variables_project.scss @@ -1,6 +1,6 @@ -/* - -Add styles or override variables from the theme here. - -*/ +// todo: figure out why none of these actually do anything at all +$enable-gradients: false; +$enable-rounded: false; +$enable-shadows: false; +$secondary: #4CAF50; \ No newline at end of file diff --git a/docs/config.toml b/docs/config.toml index d29abcd5..e5942f86 100644 --- a/docs/config.toml +++ b/docs/config.toml @@ -1,4 +1,4 @@ -baseURL = "/" +baseURL = "https://moor.simonbinder.eu/" title = "Moor" enableRobotsTXT = true @@ -25,7 +25,7 @@ pygmentsUseClasses = false pygmentsUseClassic = false #pygmentsOptions = "linenos=table" # See https://help.farbox.com/pygments.html -pygmentsStyle = "tango" +pygmentsStyle = "vs" # First one is picked as the Twitter card image if not set on page. #images = ["images/project-illustration.png"] @@ -120,7 +120,7 @@ navbar_logo = false url = "https://gitter.im/simolus3" icon = "fab fa-gitter" [[params.links.user]] - name = "GitHub" + name = "Project on GitHub" url = "https://github.com/simolus3/moor" icon = "fab fa-github" desc = "Development takes place here!" diff --git a/docs/content/en/_index.html b/docs/content/en/_index.html index c3c0da56..1b4b1606 100644 --- a/docs/content/en/_index.html +++ b/docs/content/en/_index.html @@ -1,83 +1,47 @@ -+++ -title = "Goldydocs" -linkTitle = "Goldydocs" +--- +title: "Moor" +linkTitle: "Moor" +--- -+++ - -{{< blocks/cover title="Welcome to Goldydocs: A Docsy Example Project!" image_anchor="top" height="full" color="orange" >}} +{{< blocks/cover title="Moor: Persistence library for Dart" image_anchor="top" height="med" color="indigo" >}}
}}"> Learn More - - Download + + Get fom pub -

Porridge temperature assessment - in the cloud!

-
- {{< blocks/link-down color="info" >}} -
{{< /blocks/cover >}} -{{% blocks/lead color="primary" %}} -Goldydocs provides a single web UI providing visibility into porridge temperature, chair size, and bed softness metrics! You can even find out who's been eating **your** porridge. - -(Sadly, Goldydocs isn't a real project, but you can use this site as an example to create your own real websites with [Docsy](http://docsy.dev)) +{{% blocks/lead color="dark" %}} +Moor is an easy to use, reactive persistence library for Flutter apps. Define your +database tables in pure Dart and enjoy a fluent query API, auto-updating streams +and more! {{% /blocks/lead %}} -{{< blocks/section color="dark" >}} -{{% blocks/feature icon="fa-lightbulb" title="New chair metrics!" %}} -The Goldydocs UI now shows chair size metrics by default. +{{< 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 writing the `CREATE TABLE` statements when +the database is created. -Please follow this space for updates! +Thanks to the power of Darts build system, moor generates code to write queries easily. + +[Get started now]({{< ref "/docs/Getting started/_index.md" >}}) +{{% /blocks/feature %}} + +{{% blocks/feature icon="fas fa-database" title="Prefer SQL? Moor got you covered!" url="https://moor.simonbinder.eu/queries/custom" %}} +Moor contains a powerful sql parser and analyzer, allowing it to create typesafe APIs for all your sql queries. All queries are +validated and analyzed during build-time, so moor can provide hints about potential errors quickly and generate efficient mapping +code. {{% /blocks/feature %}} -{{% blocks/feature icon="fab fa-github" title="Contributions welcome!" url="https://github.com/google/docsy-example" %}} -We do a [Pull Request](https://github.com/gohugoio/hugo/pulls) contributions workflow on **GitHub**. New users are always welcome! +{{% blocks/feature icon="fas fa-star" title="And much more!" %}} +Moor can also provide auto-updating streams emitting new results when the underlying data changes. +Moor makes dealing with transactions easy (no special parameter to pass around everywhere), + {{% /blocks/feature %}} - - -{{% blocks/feature icon="fab fa-twitter" title="Follow us on Twitter!" url="https://twitter.com/docsydocs" %}} -For announcement of latest features etc. -{{% /blocks/feature %}} - - -{{< /blocks/section >}} - - -{{< blocks/section >}} -
-

This is the second Section

-
- -{{< /blocks/section >}} - - - -{{< blocks/section >}} -{{% blocks/feature icon="fab fa-app-store-ios" title="Download **from AppStore**" %}} -Get the Goldydocs app! -{{% /blocks/feature %}} - - -{{% blocks/feature icon="fab fa-github" title="Contributions welcome!" url="https://github.com/gohugoio/hugo" %}} -We do a [Pull Request](https://github.com/gohugoio/hugo/pulls) contributions workflow on **GitHub**. New users are always welcome! -{{% /blocks/feature %}} - - -{{% blocks/feature icon="fab fa-twitter" title="Follow us on Twitter!" url="https://twitter.com/GoHugoIO" %}} -For announcement of latest features etc. -{{% /blocks/feature %}} - - -{{< /blocks/section >}} - -{{< blocks/section >}} - -
-

This is another Section

-
- {{< /blocks/section >}} From 48331ab353d2fda6823461e7d18b3a0060fded76 Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Sat, 3 Aug 2019 16:20:11 +0200 Subject: [PATCH 7/9] Use relative links in part of the docs --- docs/content/en/docs/Advanced Features/joins.md | 2 +- docs/content/en/docs/Using SQL/custom_queries.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/en/docs/Advanced Features/joins.md b/docs/content/en/docs/Advanced Features/joins.md index 11ec3543..b5799381 100644 --- a/docs/content/en/docs/Advanced Features/joins.md +++ b/docs/content/en/docs/Advanced Features/joins.md @@ -10,7 +10,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]({{< ref "/docs/Getting Started/_index.md" >}}). +defined in the [example]({{< relref "../Getting Started/_index.md" >}}). ```dart // we define a data class to contain both a todo entry and the associated category diff --git a/docs/content/en/docs/Using SQL/custom_queries.md b/docs/content/en/docs/Using SQL/custom_queries.md index e65d4276..2549bca3 100644 --- a/docs/content/en/docs/Using SQL/custom_queries.md +++ b/docs/content/en/docs/Using SQL/custom_queries.md @@ -40,7 +40,7 @@ moor will figure out an appropriate type for them and include them in the genera `'categoryById': 'SELECT * FROM categories WHERE id = :id'` will generate the method `categoryById(int id)`. You can also use `UPDATE` or `DELETE` statements here. Of course, this feature is also available for -[daos]({{< ref "/docs/Advanced features/daos.md" >}}), +[daos]({{< relref "../Advanced features/daos.md" >}}), and it perfectly integrates with auto-updating streams by analyzing what tables you're reading from or writing to. From 4f96c255ee6b3a5bbe65cfb9de7a61f90d6f4ef4 Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Sat, 3 Aug 2019 16:27:24 +0200 Subject: [PATCH 8/9] Fix case in imports --- docs/content/en/docs/Advanced Features/joins.md | 2 +- docs/content/en/docs/Using SQL/custom_queries.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/en/docs/Advanced Features/joins.md b/docs/content/en/docs/Advanced Features/joins.md index b5799381..8e35e1a2 100644 --- a/docs/content/en/docs/Advanced Features/joins.md +++ b/docs/content/en/docs/Advanced Features/joins.md @@ -10,7 +10,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]({{< relref "../Getting started/_index.md" >}}). ```dart // we define a data class to contain both a todo entry and the associated category diff --git a/docs/content/en/docs/Using SQL/custom_queries.md b/docs/content/en/docs/Using SQL/custom_queries.md index 2549bca3..6ced9115 100644 --- a/docs/content/en/docs/Using SQL/custom_queries.md +++ b/docs/content/en/docs/Using SQL/custom_queries.md @@ -40,7 +40,7 @@ moor will figure out an appropriate type for them and include them in the genera `'categoryById': 'SELECT * FROM categories WHERE id = :id'` will generate the method `categoryById(int id)`. You can also use `UPDATE` or `DELETE` statements here. Of course, this feature is also available for -[daos]({{< relref "../Advanced features/daos.md" >}}), +[daos]({{< relref "../Advanced Features/daos.md" >}}), and it perfectly integrates with auto-updating streams by analyzing what tables you're reading from or writing to. From e1427431ff401debfee1bf0f76e1626bdb6a8158 Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Mon, 5 Aug 2019 20:10:39 +0200 Subject: [PATCH 9/9] Some final touches on the updated documentation --- docs/content/en/_index.html | 6 ++---- docs/layouts/404.html | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/content/en/_index.html b/docs/content/en/_index.html index 1b4b1606..d3708587 100644 --- a/docs/content/en/_index.html +++ b/docs/content/en/_index.html @@ -24,10 +24,8 @@ and more! {{< 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 writing the `CREATE TABLE` statements when -the database is created. - -Thanks to the power of Darts build system, moor generates code to write queries easily. +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 %}} diff --git a/docs/layouts/404.html b/docs/layouts/404.html index 378b7367..ed68ce7a 100644 --- a/docs/layouts/404.html +++ b/docs/layouts/404.html @@ -3,8 +3,6 @@

Not found

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

- -

You can learn how to make a 404 page like this in Custom 404 Pages.

{{ end }}