Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: pkg/barback/example/markdown_converter/lib/transformer.dart

Issue 808713003: Remove barback from the repo. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/barback/example/markdown_converter/lib/transformer.dart
diff --git a/pkg/barback/example/markdown_converter/lib/transformer.dart b/pkg/barback/example/markdown_converter/lib/transformer.dart
deleted file mode 100644
index 22bff32dd55fb664381d3de15c41ce31166cea20..0000000000000000000000000000000000000000
--- a/pkg/barback/example/markdown_converter/lib/transformer.dart
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:barback/barback.dart';
-import 'package:markdown/markdown.dart';
-
-import 'dart:async';
-
-class ConvertMarkdown extends Transformer {
-
- // A constructor named "asPlugin" is required. It can be empty, but
- // it must be present. It is how pub determines that you want this
- // class to be publicly available as a loadable transformer plugin.
- ConvertMarkdown.asPlugin();
-
- // Any markdown file with one of the following extensions is
- // converted to HTML.
- String get allowedExtensions => ".md .markdown .mdown";
-
- Future apply(Transform transform) {
- return transform.primaryInput.readAsString().then((content) {
-
- // The extension of the output is changed to ".html".
- var id = transform.primaryInput.id.changeExtension(".html");
-
- String newContent = "<html><body>"
- + markdownToHtml(content)
- + "</body></html>";
- transform.addOutput(new Asset.fromString(id, newContent));
- });
- }
-}
« no previous file with comments | « pkg/barback/example/markdown_converter/lib/test2.md ('k') | pkg/barback/example/markdown_converter/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698