Permalink
Browse files

doc: Grinder added

  • Loading branch information...
MikeMitterer committed Dec 8, 2015
1 parent 7c10116 commit 8a557ab8d4d8eac5f1b947fb4c1e63eea31e66cb
Showing with 202 additions and 163 deletions.
  1. +9 −9 SiteGen.iml
  2. +0 −1 lib/sitegen.dart
  3. +2 −2 lib/src/Application.dart
  4. +0 −10 lib/src/Config.dart
  5. +17 −17 lib/src/Generator.dart
  6. +2 −1 pubspec.yaml
  7. +0 −11 sample/simple/.sitegen/refreshDartium-1.0.applescript
  8. +0 −78 sample/simple/web/assets/styles/styles.css
  9. 0 {sample → samples}/simple/.gitignore
  10. 0 {sample → samples}/simple/.sitegen/html/_content/about/index.html
  11. BIN {sample → samples}/simple/.sitegen/html/_content/assets/images/android-desktop.png
  12. BIN {sample → samples}/simple/.sitegen/html/_content/assets/images/favicon.png
  13. BIN {sample → samples}/simple/.sitegen/html/_content/assets/images/ios-desktop.png
  14. 0 {sample → samples}/simple/.sitegen/html/_content/assets/styles/styles.scss
  15. 0 {sample → samples}/simple/.sitegen/html/_content/features.html
  16. 0 {sample → samples}/simple/.sitegen/html/_content/index.html
  17. 0 {sample → samples}/simple/.sitegen/html/_content/main.dart
  18. 0 {sample → samples}/simple/.sitegen/html/_content/markdown.md
  19. 0 {sample → samples}/simple/.sitegen/html/_content/special/template.html
  20. 0 {sample → samples}/simple/.sitegen/html/_content/special/xtreme.html
  21. 0 {sample → samples}/simple/.sitegen/html/_content/technology.html
  22. 0 {sample → samples}/simple/.sitegen/html/_data/families.json
  23. 0 {sample → samples}/simple/.sitegen/html/_data/menu.json
  24. 0 {sample → samples}/simple/.sitegen/html/_data/xmen.yaml
  25. 0 {sample → samples}/simple/.sitegen/html/_partials/cards/wide.html
  26. 0 {sample → samples}/simple/.sitegen/html/_partials/header.html
  27. 0 {sample → samples}/simple/.sitegen/html/_templates/default.html
  28. 0 {sample → samples}/simple/.sitegen/html/_templates/info_page.html
  29. 0 {sample → samples}/simple/.sitegen/site.yaml
  30. 0 {sample → samples}/simple/pubspec.yaml
  31. +16 −1 {sample → samples}/simple/web/about/index.html
  32. BIN {sample → samples}/simple/web/assets/images/android-desktop.png
  33. BIN {sample → samples}/simple/web/assets/images/favicon.png
  34. BIN {sample → samples}/simple/web/assets/images/ios-desktop.png
  35. +1 −1 {sample → samples}/simple/web/assets/styles/styles.scss
  36. +16 −18 {sample → samples}/simple/web/features.html
  37. +17 −0 {sample → samples}/simple/web/index.html
  38. +0 −1 {sample → samples}/simple/web/main.dart
  39. +21 −13 {sample → samples}/simple/web/markdown.html
  40. +2 −0 {sample → samples}/simple/web/special/template.html
  41. +16 −0 {sample → samples}/simple/web/special/xtreme.html
  42. +16 −0 {sample → samples}/simple/web/technology.html
  43. +58 −0 tool/grind.dart
  44. +9 −0 tool/scripts/analyze-sample.sh
View
@@ -7,8 +7,8 @@
<excludeFolder url="file://$MODULE_DIR$/bin/packages" />
<excludeFolder url="file://$MODULE_DIR$/packages" />
<excludeFolder url="file://$MODULE_DIR$/sample/packages" />
<excludeFolder url="file://$MODULE_DIR$/sample/simple/.pub" />
<excludeFolder url="file://$MODULE_DIR$/sample/simple/build" />
<excludeFolder url="file://$MODULE_DIR$/samples/simple/.pub" />
<excludeFolder url="file://$MODULE_DIR$/samples/simple/build" />
<excludeFolder url="file://$MODULE_DIR$/sample/simple/build/web/packages/mdl/_templates/android/packages" />
<excludeFolder url="file://$MODULE_DIR$/sample/simple/build/web/packages/mdl/_templates/android/web/fonts/packages" />
<excludeFolder url="file://$MODULE_DIR$/sample/simple/build/web/packages/mdl/_templates/android/web/images/packages" />
@@ -34,13 +34,13 @@
<excludeFolder url="file://$MODULE_DIR$/sample/simple/build/web/packages/mdl/_templates/text-only/packages" />
<excludeFolder url="file://$MODULE_DIR$/sample/simple/build/web/packages/mdl/_templates/text-only/web/images/packages" />
<excludeFolder url="file://$MODULE_DIR$/sample/simple/build/web/packages/mdl/_templates/text-only/web/packages" />
<excludeFolder url="file://$MODULE_DIR$/sample/simple/packages" />
<excludeFolder url="file://$MODULE_DIR$/sample/simple/web/about/packages" />
<excludeFolder url="file://$MODULE_DIR$/sample/simple/web/assets/images/packages" />
<excludeFolder url="file://$MODULE_DIR$/sample/simple/web/assets/packages" />
<excludeFolder url="file://$MODULE_DIR$/sample/simple/web/assets/styles/packages" />
<excludeFolder url="file://$MODULE_DIR$/sample/simple/web/packages" />
<excludeFolder url="file://$MODULE_DIR$/sample/simple/web/special/packages" />
<excludeFolder url="file://$MODULE_DIR$/samples/simple/packages" />
<excludeFolder url="file://$MODULE_DIR$/samples/simple/web/about/packages" />
<excludeFolder url="file://$MODULE_DIR$/samples/simple/web/assets/images/packages" />
<excludeFolder url="file://$MODULE_DIR$/samples/simple/web/assets/packages" />
<excludeFolder url="file://$MODULE_DIR$/samples/simple/web/assets/styles/packages" />
<excludeFolder url="file://$MODULE_DIR$/samples/simple/web/packages" />
<excludeFolder url="file://$MODULE_DIR$/samples/simple/web/special/packages" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
View
@@ -2,7 +2,6 @@ library sitegen;
import 'dart:io';
import 'dart:async';
import 'dart:collection';
import 'dart:convert';
import 'dart:math';
View
@@ -190,7 +190,7 @@ class Application {
});
}
on StateError catch (e) {
on StateError {
_logger.info("Found no SCSS without a _ at the beginning...");
}
}
@@ -235,7 +235,7 @@ class Application {
});
}
on StateError catch (e) {
on StateError {
_logger.info("Found no SCSS without a _ at the beginning...");
}
}
View
@@ -194,16 +194,6 @@ class Config {
// -- private -------------------------------------------------------------
void _overwriteSettingsWithArgResults() {
/// Makes sure that path does not end with a /
String checkPath(final String arg) {
String path = arg;
if(path.endsWith("/")) {
path = path.replaceFirst(new RegExp("/\$"),"");
}
return path;
}
if(_argResults.wasParsed(Options._ARG_LOGLEVEL)) {
_settings[Options._ARG_LOGLEVEL] = _argResults[Options._ARG_LOGLEVEL];
}
View
@@ -387,7 +387,7 @@ class Generator {
}
final String pathWithoutExtension = path.withoutExtension(relativeFileName);
final String portablePath = pathWithoutExtension.replaceAll(new RegExp("(/|\\\\\)"),":");
// final String portablePath = pathWithoutExtension.replaceAll(new RegExp("(/|\\\\\)"),":");
final String pageIndicator = pathWithoutExtension.replaceAll(new RegExp("(/|\\\\\)"),"_");
pageOptions["_page"] = {
"filename" : pathWithoutExtension,
@@ -447,22 +447,22 @@ class Generator {
return html;
}
/**
* Removes everything before ~~~
*/
String _removeYamlBlock(String fileContent,final Config config) {
fileContent = fileContent.replaceFirst(new RegExp("(?:.|\n)*${config.yamldelimeter}(?:\r\n|\n)",multiLine: true),"");
/// if there is something like ~~~ (xtreme-sample)
fileContent = fileContent.replaceFirst(new RegExp("^${config.yamldelimeter}\$"),"");
/// Replace all newlines with some silly characters to protect the newlines because
/// Mustache-Renderer strips them
fileContent = fileContent.replaceAll(new RegExp("\n",multiLine: true),_NEWLINE_PROTECTOR);
return fileContent;
}
// /**
// * Removes everything before ~~~
// */
// String _removeYamlBlock(String fileContent,final Config config) {
//
// fileContent = fileContent.replaceFirst(new RegExp("(?:.|\n)*${config.yamldelimeter}(?:\r\n|\n)",multiLine: true),"");
//
// /// if there is something like ~~~ (xtreme-sample)
// fileContent = fileContent.replaceFirst(new RegExp("^${config.yamldelimeter}\$"),"");
//
// /// Replace all newlines with some silly characters to protect the newlines because
// /// Mustache-Renderer strips them
// fileContent = fileContent.replaceAll(new RegExp("\n",multiLine: true),_NEWLINE_PROTECTOR);
//
// return fileContent;
// }
/**
* Shows all the available vars for the current page
View
@@ -35,4 +35,5 @@ dependencies:
system_info: 0.0.16
dev_dependencies:
test: any
test: any
grinder: any

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
File renamed without changes.
File renamed without changes.
@@ -2,11 +2,15 @@
<!--
Copyright (c) 2015, Michael Mitterer (office@mikemitterer.at),
IT-Consulting and Development Limited.
All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,25 +24,32 @@
<meta name="description" content="A front-end template that helps you build fast, modern mobile web apps.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>XTreme | MDL/Dart + SiteGen Sample</title>
<!-- Add to homescreen for Chrome on Android -->
<meta name="mobile-web-app-capable" content="yes">
<link rel="icon" sizes="192x192" href="images/android-desktop.png">
<!-- Add to homescreen for Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Material Design Lite">
<link rel="apple-touch-icon-precomposed" href="images/ios-desktop.png">
<!-- Tile icon for Win8 (144x144 + tile color) -->
<meta name="msapplication-TileImage" content="images/touch/ms-touch-icon-144x144-precomposed.png">
<meta name="msapplication-TileColor" content="#3372DF">
<link rel="shortcut icon" href="images/favicon.png">
<!-- SEO: If your mobile URL is different from the desktop URL, add a canonical link to the desktop page https://developers.google.com/webmasters/smartphone-sites/feature-phones -->
<!--
<link rel="canonical" href="http://www.example.com/">
-->
<link href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&amp;lang=en"
rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="../assets/styles/styles.css">
<link rel="stylesheet" href="../packages/mdl/assets/styles/splashscreen/dots.css">
<link rel="stylesheet" href="../packages/mdl/assets/styles/material.min.css">
@@ -77,12 +88,12 @@ <h3>XTreme</h3>
I live in a subfolder
</div>
</section>
<footer class="mdl-mega-footer">
<div class="mdl-mega-footer--middle-section">
<div class="mdl-mega-footer--drop-down-section">
<input class="mdl-mega-footer--heading-checkbox" type="checkbox" checked>
<h1 class="mdl-mega-footer--heading">Features</h1>
<ul class="mdl-mega-footer--link-list">
<li><a href="#">About</a></li>
@@ -93,6 +104,7 @@ <h1 class="mdl-mega-footer--heading">Features</h1>
</div>
<div class="mdl-mega-footer--drop-down-section">
<input class="mdl-mega-footer--heading-checkbox" type="checkbox" checked>
<h1 class="mdl-mega-footer--heading">Details</h1>
<ul class="mdl-mega-footer--link-list">
<li><a href="#">Spec</a></li>
@@ -102,6 +114,7 @@ <h1 class="mdl-mega-footer--heading">Details</h1>
</div>
<div class="mdl-mega-footer--drop-down-section">
<input class="mdl-mega-footer--heading-checkbox" type="checkbox" checked>
<h1 class="mdl-mega-footer--heading">Technology</h1>
<ul class="mdl-mega-footer--link-list">
<li><a href="#">How it works</a></li>
@@ -113,6 +126,7 @@ <h1 class="mdl-mega-footer--heading">Technology</h1>
</div>
<div class="mdl-mega-footer--drop-down-section">
<input class="mdl-mega-footer--heading-checkbox" type="checkbox" checked>
<h1 class="mdl-mega-footer--heading">FAQ</h1>
<ul class="mdl-mega-footer--link-list">
<li><a href="#">Questions</a></li>
@@ -134,6 +148,7 @@ <h1 class="mdl-mega-footer--heading">FAQ</h1>
</footer>
</main>
</div>
<script type="application/dart" src="../main.dart"></script>
<script data-pub-inline src="../packages/browser/dart.js"></script>
</body>
@@ -87,4 +87,4 @@ html, body {
.mdl-card__supporting-text {
flex-grow : 1;
}
}
}
Oops, something went wrong.

0 comments on commit 8a557ab

Please sign in to comment.