Permalink
Browse files

chore (gruntfile/docs):

* Adds grunt-repos task to pull down a list of assemble repos, which is then used by grunt-readme (and passed to the templates as context)
* Adds grunt-prettify task in lieu of using an assemble plugin for prettifying the generated HTML (and since it was slowing down the build too much)
  • Loading branch information...
1 parent dc22567 commit 6c9451ecedf841ca54bb6033cc3a1979d796a64f @jonschlinkert jonschlinkert committed Nov 30, 2013
Showing with 17,997 additions and 12,517 deletions.
  1. +51 −21 Gruntfile.js
  2. +40 −11 README.md
  3. +1 −1 bower.json
  4. +13 −19 docs/README.tmpl.md
  5. +944 −0 docs/plugins.json
  6. +4 −2 package.json
  7. +85 −121 test/actual/assets_base.html
  8. +85 −121 test/actual/assets_blank_path.html
  9. +85 −121 test/actual/assets_dot_slash.html
  10. +85 −121 test/actual/assets_nested.html
  11. +85 −121 test/actual/assets_trailing_slash.html
  12. +200 −138 test/actual/collections/asc/alert.html
  13. +194 −136 test/actual/collections/asc/collections-categories.html
  14. +194 −136 test/actual/collections/asc/collections-tags.html
  15. +200 −138 test/actual/collections/asc/collections.html
  16. +197 −137 test/actual/collections/asc/complex.html
  17. +568 −296 test/actual/collections/asc/context.html
  18. +209 −141 test/actual/collections/asc/debug-helpers.html
  19. +200 −138 test/actual/collections/asc/example.html
  20. +210 −143 test/actual/collections/asc/gist-helper.html
  21. +195 −138 test/actual/collections/asc/md-helper.html
  22. +209 −141 test/actual/collections/asc/no-yfm.html
  23. +200 −138 test/actual/collections/asc/yfm-context.html
  24. +209 −141 test/actual/collections/asc/yfm.html
  25. +200 −138 test/actual/collections/complex/alert.html
  26. +194 −136 test/actual/collections/complex/collections-categories.html
  27. +194 −136 test/actual/collections/complex/collections-tags.html
  28. +200 −138 test/actual/collections/complex/collections.html
  29. +197 −137 test/actual/collections/complex/complex.html
  30. +568 −296 test/actual/collections/complex/context.html
  31. +209 −141 test/actual/collections/complex/debug-helpers.html
  32. +200 −138 test/actual/collections/complex/example.html
  33. +210 −143 test/actual/collections/complex/gist-helper.html
  34. +195 −138 test/actual/collections/complex/md-helper.html
  35. +209 −141 test/actual/collections/complex/no-yfm.html
  36. +200 −138 test/actual/collections/complex/yfm-context.html
  37. +209 −141 test/actual/collections/complex/yfm.html
  38. +200 −138 test/actual/collections/custom/alert.html
  39. +194 −136 test/actual/collections/custom/collections-categories.html
  40. +194 −136 test/actual/collections/custom/collections-tags.html
  41. +200 −138 test/actual/collections/custom/collections.html
  42. +197 −137 test/actual/collections/custom/complex.html
  43. +568 −296 test/actual/collections/custom/context.html
  44. +209 −141 test/actual/collections/custom/debug-helpers.html
  45. +200 −138 test/actual/collections/custom/example.html
  46. +210 −143 test/actual/collections/custom/gist-helper.html
  47. +195 −138 test/actual/collections/custom/md-helper.html
  48. +209 −141 test/actual/collections/custom/no-yfm.html
  49. +200 −138 test/actual/collections/custom/yfm-context.html
  50. +209 −141 test/actual/collections/custom/yfm.html
  51. +200 −138 test/actual/collections/desc/alert.html
  52. +194 −136 test/actual/collections/desc/collections-categories.html
  53. +194 −136 test/actual/collections/desc/collections-tags.html
  54. +200 −138 test/actual/collections/desc/collections.html
  55. +197 −137 test/actual/collections/desc/complex.html
  56. +568 −296 test/actual/collections/desc/context.html
  57. +209 −141 test/actual/collections/desc/debug-helpers.html
  58. +200 −138 test/actual/collections/desc/example.html
  59. +210 −143 test/actual/collections/desc/gist-helper.html
  60. +195 −138 test/actual/collections/desc/md-helper.html
  61. +209 −141 test/actual/collections/desc/no-yfm.html
  62. +200 −138 test/actual/collections/desc/yfm-context.html
  63. +209 −141 test/actual/collections/desc/yfm.html
  64. +0 −2 test/actual/custom_helpers/bar.html
  65. +0 −1 test/actual/custom_helpers/foo.html
  66. +28 −42 test/actual/layout_ext/layoutext.html
  67. +0 −1 test/actual/no_layout/no-layout-none.html
  68. +0 −1 test/actual/no_layout/no-layout.html
  69. +0 −2 test/actual/not_real.html
  70. +49 −98 test/actual/noyfm/no-yfm.html
  71. +54 −90 test/actual/pages_array/index.html
  72. +35 −54 test/actual/pages_array/post1.html
  73. +37 −57 test/actual/pages_array/post2.html
  74. +35 −55 test/actual/pages_array/post3.html
  75. +54 −90 test/actual/pages_metadata/index.html
  76. +37 −57 test/actual/pages_metadata/meta-awesome-blog-post-2.html
  77. +35 −55 test/actual/pages_metadata/meta-super-sweet-and-awesome-blog-post-3.html
  78. +35 −54 test/actual/pages_metadata/meta-sweet-blog-post-1.html
  79. +37 −57 test/actual/pages_object/awesome-blog-post-2.html
  80. +54 −90 test/actual/pages_object/index.html
  81. +35 −55 test/actual/pages_object/super-sweet-and-awesome-blog-post-3.html
  82. +35 −54 test/actual/pages_object/sweet-blog-post-1.html
  83. +200 −138 test/actual/paths/alert.html
  84. +194 −136 test/actual/paths/collections-categories.html
  85. +194 −136 test/actual/paths/collections-tags.html
  86. +200 −138 test/actual/paths/collections.html
  87. +197 −137 test/actual/paths/complex.html
  88. +568 −296 test/actual/paths/context.html
  89. +209 −141 test/actual/paths/debug-helpers.html
  90. +200 −138 test/actual/paths/example.html
  91. +210 −143 test/actual/paths/gist-helper.html
  92. +195 −138 test/actual/paths/md-helper.html
  93. +209 −141 test/actual/paths/no-yfm.html
  94. +200 −138 test/actual/paths/yfm-context.html
  95. +209 −141 test/actual/paths/yfm.html
  96. +0 −2 test/actual/plugin_before.html
  97. +2 −9 test/actual/postprocess.html
  98. +6 −3 test/actual/postprocess2.html
  99. +126 −224 test/actual/single_page.html
  100. +87 −86 test/actual/yfm/associative-arrays.html
  101. +82 −81 test/actual/yfm/block-literals.html
  102. +83 −82 test/actual/yfm/comments.html
  103. +82 −81 test/actual/yfm/data-files.html
  104. +91 −90 test/actual/yfm/data-types.html
  105. +100 −107 test/actual/yfm/document.html
  106. +98 −99 test/actual/yfm/lists.html
  107. +113 −112 test/actual/yfm/relational-trees.html
  108. +82 −81 test/actual/yfm/underscore.html
  109. +82 −81 test/actual/yfm/variables.html
View
@@ -13,8 +13,6 @@
module.exports = function(grunt) {
- var prettify = require('pretty');
-
// Report elapsed execution time of grunt tasks.
require('time-grunt')(grunt);
@@ -67,7 +65,7 @@ module.exports = function(grunt) {
mochaTest: {
tests: {
options: {
- reporter: 'progress',
+ reporter: 'progress'
},
src: ['test/**/*_test.js']
}
@@ -104,7 +102,6 @@ module.exports = function(grunt) {
// Should flatten nested layouts
nested_layouts: {
options: {
- postprocess: prettify,
partials: 'test/fixtures/partials/*.hbs',
data: 'test/fixtures/data/*.{json,yml}',
layout: 'one.hbs'
@@ -117,8 +114,7 @@ module.exports = function(grunt) {
custom_helpers: {
options: {
helpers: ['test/helpers/*.js'],
- name: '<%= pkg.name %>',
- postprocess: prettify
+ name: '<%= pkg.name %>'
},
files: {
'test/actual/custom_helpers/': ['test/fixtures/helpers/{foo,bar,opt}.hbs']
@@ -127,7 +123,7 @@ module.exports = function(grunt) {
// Should register and use custom plugins, without a stage defined
plugin_untitled: {
options: {
- plugins: ['./test/plugins/untitled.js'],
+ plugins: ['./test/plugins/untitled.js']
},
files: {
'test/actual/plugin_untitled.html': 'test/fixtures/plugins/untitled.hbs'
@@ -174,8 +170,7 @@ module.exports = function(grunt) {
paths: {
options: {
partials: 'test/fixtures/partials/*.hbs',
- data: 'test/fixtures/data/*.{json,yml}',
- postprocess: prettify
+ data: 'test/fixtures/data/*.{json,yml}'
},
files: {
'test/actual/paths/': ['test/fixtures/pages/*.hbs']
@@ -195,7 +190,6 @@ module.exports = function(grunt) {
// Should post-process content using a custom function
postprocess2: {
options: {
- postprocess: prettify
},
files: {
'test/actual/postprocess2.html': ['test/fixtures/pages/postprocess/postprocess2.hbs']
@@ -210,8 +204,7 @@ module.exports = function(grunt) {
// Should process and add complex YAML front matter to context
yfm: {
options: {
- data: 'test/fixtures/data/*.{json,yml}',
- postprocess: prettify
+ data: 'test/fixtures/data/*.{json,yml}'
},
files: {
'test/actual/yfm/': ['test/fixtures/pages/yfm/*.hbs']
@@ -268,7 +261,6 @@ module.exports = function(grunt) {
// Should add collections to context, sorted in descending order.
collections_desc: {
options: {
- postprocess: prettify,
collections: [
{name: 'pages', inflection: 'page', sortorder: 'DESC'},
{name: 'tags', inflection: 'tag', sortorder: 'DESC'},
@@ -282,7 +274,6 @@ module.exports = function(grunt) {
// Should add collections to context, sorted in ascending order.
collections_asc: {
options: {
- postprocess: prettify,
collections: [
{name: 'pages', inflection: 'page', sortorder: 'ASC'},
{name: 'tags', inflection: 'tag', sortorder: 'ASC'},
@@ -296,7 +287,6 @@ module.exports = function(grunt) {
// Should
collections_custom: {
options: {
- postprocess: prettify,
collections: [
{name: 'items', inflection: 'item', sortorder: 'DESC'}
]
@@ -308,7 +298,6 @@ module.exports = function(grunt) {
// Should add complex collections and related pages to context
collections_complex: {
options: {
- postprocess: prettify,
data: ['test/fixtures/data/collections/*.json']
},
files: {
@@ -364,6 +353,42 @@ module.exports = function(grunt) {
/**
+ * Beautify generated HTML to make diffs easier
+ */
+ prettify: {
+ tests: {
+ files: [
+ {expand: true, cwd: 'test/actual', src: ['**/*.html'], dest: 'test/actual/', ext: '.html'}
+ ]
+ }
+ },
+
+ /**
+ * Pull down a list of repos from Github, for the docs
+ */
+ repos: {
+ plugins: {
+ options: {
+ username: 'assemble',
+ include: ['contrib'], exclude: ['grunt', 'example', 'rss']
+ },
+ files: {
+ 'docs/plugins.json': ['repos?page=1&per_page=100']
+ }
+ }
+ },
+
+ /**
+ * Build the README using metadata from the repos task.
+ */
+ readme: {
+ options: {
+ metadata: ['docs/plugins.json']
+ }
+ },
+
+
+ /**
* Before generating any new files,
* remove files from the previous build
*/
@@ -378,7 +403,7 @@ module.exports = function(grunt) {
bump: true,
file: 'package.json',
add: false,
- commit: true,
+ commit: false,
tag: true,
push: true,
pushTags: true,
@@ -394,19 +419,24 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-mocha-test');
+ grunt.loadNpmTasks('grunt-prettify');
grunt.loadNpmTasks('grunt-readme');
- grunt.loadNpmTasks('grunt-sync-pkg');
grunt.loadNpmTasks('grunt-release');
+ grunt.loadNpmTasks('grunt-repos');
+ grunt.loadNpmTasks('grunt-sync-pkg');
// Load this plugin.
grunt.loadTasks('tasks');
// Build
- grunt.registerTask('docs', ['readme', 'sync']);
+ grunt.registerTask('docs', ['repos', 'readme', 'sync']);
// Tests to be run.
grunt.registerTask('test', ['assemble', 'mochaTest']);
+ // Run default task, then release
+ grunt.registerTask('bump', ['default', 'release']);
+
// Default task.
- grunt.registerTask('default', ['jshint', 'clean', 'test', 'docs']);
-};
+ grunt.registerTask('default', ['jshint', 'clean', 'test', 'prettify', 'docs']);
+};
View
@@ -16,8 +16,9 @@
![image](https://f.cloud.github.com/assets/383994/1463257/f031bcfe-4525-11e3-9a03-89a17eee7518.png)
+## The "assemble" task
-## Getting Started
+### Getting Started
Assemble requires Grunt `~0.4.1`
_If you haven't used [grunt][] before, be sure to check out the [Getting Started][] guide._
@@ -63,7 +64,7 @@ assemble: {
-## Options
+### Options
See the documentation for [Options](http://assemble.io/docs/Options.html) for more information.
### [assets](http://assemble.io/docs/options-assets.html)
@@ -206,7 +207,7 @@ Visit [Assemble's documentation](http://assemble.io) for more information about
-## Usage Examples
+### Usage Examples
Simple example of using data files in both `.json` and `.yml` format to build Handlebars templates.
```javascript
@@ -260,19 +261,42 @@ Visit [Assemble's documentation](http://assemble.io) for many more examples and
## Contributing
-Please see the [Contributing to Assemble](http://assemble.io/contributing) guide for information on contributing to this project.
+Find a bug? Have a feature request? Please [create an Issue](git://github.com/assemble/assemble/issues).
+
+In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt][], and build the documentation with [grunt-readme](https://github.com/assemble/grunt-readme).
+
+Pull requests are also encouraged, and if you find this project useful please consider "starring" it to show your support! Thanks!
+
+
+## Assemble plugins
+Here are some related projects you might be interested in from the [Assemble](http://assemble.io) core team.
+
++ [assemble-contrib-anchors](https://github.com/assemble/assemble-contrib-anchors): Assemble plugin for creating anchor tags from generated html.
++ [assemble-contrib-contextual](https://github.com/assemble/assemble-contrib-contextual): Generates a JSON file containing the context of each page. Basic plugin to help see what's happening in the build.
++ [assemble-contrib-decompress](https://github.com/assemble/assemble-contrib-decompress): Assemble plugin for extracting zip, tar and tar.gz archives.
++ [assemble-contrib-download](https://github.com/assemble/assemble-contrib-download): Assemble plugin for downloading files from GitHub.
++ [assemble-contrib-lunr](https://github.com/assemble/assemble-contrib-lunr): Assemble plugin for creating a search engine within your static site using lunr.js.
++ [assemble-contrib-markdown](https://github.com/assemble/assemble-contrib-markdown): Convert markdown files to HTML using marked.js. This plugin is an alternative to Assemble's markdown Handlebars helpers. Both are useful in different scenarios.
++ [assemble-contrib-permalinks](https://github.com/assemble/assemble-contrib-permalinks): Permalinks plugin for Assemble, the static site generator for Grunt.js and Yeoman. This plugin enables powerful and configurable URI replacement patterns, presets, uses Moment.js for parsing dates, and much more.
++ [assemble-contrib-sitemap](https://github.com/assemble/assemble-contrib-sitemap): Sitemap generator plugin for Assemble
++ [assemble-contrib-toc](https://github.com/assemble/assemble-contrib-toc): Create a table of contents in the generated HTML, using Cheerio.js
++ [assemble-contrib-wordcount](https://github.com/assemble/assemble-contrib-wordcount): Assemble plugin for displaying a word-count on blog posts or pages.
+
+Visit [assemble.io/plugins](http:/assemble.io/plugins/) for more information about [Assemble](http:/assemble.io/) plugins.
+
+
## Authors
**Jon Schlinkert**
-+ [twitter.com/jonschlinkert](http://twitter.com/jonschlinkert)
-+ [github.com/jonschlinkert](http://github.com/jonschlinkert)
++ [github/jonschlinkert](https://github.com/jonschlinkert)
++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
**Brian Woodward**
-+ [twitter.com/doowb](http://twitter.com/doowb)
-+ [github.com/doowb](http://github.com/doowb)
++ [github/doowb](https://github.com/doowb)
++ [twitter/doowb](http://twitter.com/jonschlinkert)
## Release History
@@ -312,9 +336,14 @@ Please see the [Contributing to Assemble](http://assemble.io/contributing) guide
## License
-Copyright (c) 2013 Sellside Inc.
-Released under the [MIT License](./LICENSE-MIT).
+Copyright (c) 2013 Assemble, contributors.
+Released under the MIT license
***
-_This file was generated on Tuesday, November 26, 2013._
+_This file was generated by [grunt-readme](https://github.com/assemble/grunt-readme) on Saturday, November 30, 2013._
+
+[grunt]: http://gruntjs.com/
+[Getting Started]: https://github.com/gruntjs/grunt/blob/devel/docs/getting_started.md
+[package.json]: https://npmjs.org/doc/json.html
+
View
@@ -1,6 +1,6 @@
{
"name": "assemble",
- "version": "0.4.28",
+ "version": "0.4.29",
"main": [
"./lib/assemble"
]
View
@@ -16,39 +16,33 @@
![image](https://f.cloud.github.com/assets/383994/1463257/f031bcfe-4525-11e3-9a03-89a17eee7518.png)
+## The "assemble" task
-## Getting Started
+### Getting Started
{%= _.doc("getting-started.md") %}
-## Options
+### Options
{%= _.doc("options.md") %}
-## Usage Examples
+### Usage Examples
{%= _.doc("examples.md") %}
## Contributing
-Please see the [Contributing to Assemble](http://assemble.io/contributing) guide for information on contributing to this project.
+{%= _.contrib("contributing.md") %}
-## Authors
-
-**Jon Schlinkert**
-
-+ [twitter.com/jonschlinkert](http://twitter.com/jonschlinkert)
-+ [github.com/jonschlinkert](http://github.com/jonschlinkert)
-
-**Brian Woodward**
-
-+ [twitter.com/doowb](http://twitter.com/doowb)
-+ [github.com/doowb](http://github.com/doowb)
+## Assemble plugins
+{%= _.include("related-repos-list.md") %}
+## Authors
+{%= _.contrib("authors.md") %}
## Release History
-{%= _.include("docs-changelog.md") %}
+{%= _.include("release-history.md") %}
## License
-Copyright (c) {%= grunt.template.today('yyyy') %} Sellside Inc.
-Released under the [MIT License](./LICENSE-MIT).
+{%= copyright %}
+{%= license %}
***
-_This file was generated on {%= grunt.template.date("fullDate") %}._
+{%= _.include("footer.md") %}
Oops, something went wrong.

0 comments on commit 6c9451e

Please sign in to comment.