Skip to content

Commit

Permalink
ci(examples): add local.dart for lints and use git update-index --ski…
Browse files Browse the repository at this point in the history
…p-worktree
  • Loading branch information
micimize committed Mar 5, 2021
1 parent 5451ed6 commit bdaf3dd
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 20 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ pubspec.lock
coverage.json
coverage/*

# example config files
packages/graphql_flutter/example/lib/local.dart

# example build files
packages/graphql_flutter/example/android/.project
packages/graphql_flutter/example/android/.settings/
Expand Down
1 change: 0 additions & 1 deletion examples/flutter_bloc/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,5 @@
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

lib/local.dart
/ios/Flutter/Flutter.podspec
/ios/Flutter/flutter_export_environment.sh
2 changes: 2 additions & 0 deletions examples/flutter_bloc/lib/local.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// to run the example, replace <YOUR_PERSONAL_ACCESS_TOKEN> with your GitHub token
const String YOUR_PERSONAL_ACCESS_TOKEN = '<YOUR_PERSONAL_ACCESS_TOKEN>';
7 changes: 2 additions & 5 deletions examples/flutter_bloc/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@ import 'package:graphql_flutter_bloc_example/blocs/repos/my_repos_bloc.dart';
import 'package:graphql_flutter_bloc_example/extended_bloc/repositories_bloc.dart';
import 'package:graphql_flutter_bloc_example/extended_bloc.dart';

// to run the example, create a file ../local.dart with the content:
// const String YOUR_PERSONAL_ACCESS_TOKEN =
// '<YOUR_PERSONAL_ACCESS_TOKEN>';
// ignore: uri_does_not_exist
import 'local.dart';
// to run the example, replace <YOUR_PERSONAL_ACCESS_TOKEN> with your GitHub token in ./local.dart
import './local.dart';

Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
Expand Down
1 change: 0 additions & 1 deletion packages/graphql/example/.gitignore

This file was deleted.

7 changes: 1 addition & 6 deletions packages/graphql/example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ To run this application:

1. First clone this repository and navigate to this directory
2. Install all dart dependencies
3. create a file `bin/local.dart` with the content:
```dart
const String YOUR_PERSONAL_ACCESS_TOKEN =
'<YOUR_PERSONAL_ACCESS_TOKEN>';
```

3. replace `<YOUR_PERSONAL_ACCESS_TOKEN>` in `bin/local.dart` with your GitHub token
## Usage:

```sh
Expand Down
1 change: 1 addition & 0 deletions packages/graphql/example/lib/local.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const String YOUR_PERSONAL_ACCESS_TOKEN = '<YOUR_PERSONAL_ACCESS_TOKEN>';
2 changes: 1 addition & 1 deletion packages/graphql/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import 'dart:io' show stdout, stderr, exit;
import 'package:graphql/client.dart';

// ignore: uri_does_not_exist
// to run the example, replace <YOUR_PERSONAL_ACCESS_TOKEN> with your GitHub token in ./local.dart
import './local.dart';

/// Get an authenticated [GraphQLClient] for the github api
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql_flutter/example/lib/fetchmore/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:graphql_flutter/graphql_flutter.dart';

import '../graphql_operation/queries/readRepositories.dart' as queries;

// ignore: uri_does_not_exist
// to run the example, replace <YOUR_PERSONAL_ACCESS_TOKEN> with your GitHub token in ../local.dart
import '../local.dart';

class FetchMoreWidgetScreen extends StatelessWidget {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:rxdart/subjects.dart';
import '../graphql_operation/mutations/mutations.dart' as mutations;
import '../graphql_operation/queries/readRepositories.dart' as queries;

// ignore: uri_does_not_exist
// to run the example, replace <YOUR_PERSONAL_ACCESS_TOKEN> with your GitHub token in ../local.dart
import '../local.dart';

class Repo {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import '../graphql_operation/mutations/mutations.dart' as mutations;
import '../graphql_operation/queries/readRepositories.dart' as queries;
import '../helpers.dart' show withGenericHandling;

// ignore: uri_does_not_exist
// to run the example, replace <YOUR_PERSONAL_ACCESS_TOKEN> with your GitHub token in ../local.dart
import '../local.dart';

const bool ENABLE_WEBSOCKETS = false;
Expand Down
1 change: 1 addition & 0 deletions packages/graphql_flutter/example/lib/local.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const String YOUR_PERSONAL_ACCESS_TOKEN = '<YOUR_PERSONAL_ACCESS_TOKEN>';

0 comments on commit bdaf3dd

Please sign in to comment.