remove dependency on package:resource

pull/506/head
John Ryan 4 years ago
parent 1f0e9f2179
commit 6d387c3f45

@ -3,8 +3,7 @@
// found in the LICENSE file
import 'dart:convert';
import 'package:resource/resource.dart';
import 'dart:io';
import 'src/data.dart';
import 'package:checked_yaml/checked_yaml.dart';
@ -12,8 +11,8 @@ import 'package:checked_yaml/checked_yaml.dart';
export 'src/data.dart';
Future<List<Sample>> getSamples() async {
var yamlFile = Resource('package:samples_index/src/samples.yaml');
var cookbookFile = Resource('package:samples_index/src/cookbook.json');
var yamlFile = File('lib/src/samples.yaml');
var cookbookFile = File('lib/src/cookbook.json');
var contents = await yamlFile.readAsString();
var cookbookContents = await cookbookFile.readAsString();
var index = checkedYamlDecode(contents, (m) => Index.fromJson(m),

@ -8,7 +8,6 @@ environment:
dependencies:
json_annotation: ^3.0.0
path: ^1.6.0
resource: ^2.1.6
yaml: ^2.2.0
mdc_web: ^0.5.0-pre
sass_builder: ^2.1.0

Loading…
Cancel
Save