Permalink
Browse files

a number of updates to gruntfile and config. adds _config.yml to proj…

…ect root, to make project metadata more customizable from the start.
  • Loading branch information...
1 parent f12794e commit 0c4710c04228e7d4e6f4a81a2070f0fcbc7d3cd6 @jonschlinkert jonschlinkert committed Dec 22, 2013
Showing with 8,584 additions and 1,073 deletions.
  1. +68 −34 Gruntfile.js
  2. +31 −20 README.md
  3. +107 −0 _config.yml
  4. +8 −6 package.json
  5. +21 −6 tasks/replacements.js
  6. +5 −5 templates/_includes/header.hbs
  7. +13 −1 templates/_includes/nav-css.hbs
  8. +13 −1 templates/_includes/nav-getting-started.hbs
  9. +1 −0 templates/_includes/nav-javascript.hbs
  10. +2 −1 templates/_layouts/default.hbs
  11. +91 −864 templates/components.hbs
  12. +777 −60 templates/css.hbs
  13. +13 −6 templates/customize.hbs
  14. +72 −50 templates/getting-started.hbs
  15. +123 −19 templates/javascript.hbs
  16. +67 −0 theme/bootstrap/alerts.less
  17. +51 −0 theme/bootstrap/badges.less
  18. +49 −0 theme/bootstrap/bootstrap.less
  19. +26 −0 theme/bootstrap/breadcrumbs.less
  20. +226 −0 theme/bootstrap/button-groups.less
  21. +155 −0 theme/bootstrap/buttons.less
  22. +232 −0 theme/bootstrap/carousel.less
  23. +33 −0 theme/bootstrap/close.less
  24. +63 −0 theme/bootstrap/code.less
  25. +29 −0 theme/bootstrap/component-animations.less
  26. +213 −0 theme/bootstrap/dropdowns.less
  27. +424 −0 theme/bootstrap/forms.less
  28. +233 −0 theme/bootstrap/glyphicons.less
  29. +100 −0 theme/bootstrap/grid.less
  30. +157 −0 theme/bootstrap/input-groups.less
  31. +44 −0 theme/bootstrap/jumbotron.less
  32. +64 −0 theme/bootstrap/labels.less
  33. +110 −0 theme/bootstrap/list-group.less
  34. +56 −0 theme/bootstrap/media.less
  35. +138 −0 theme/bootstrap/modals.less
  36. +616 −0 theme/bootstrap/navbar.less
  37. +242 −0 theme/bootstrap/navs.less
  38. +406 −0 theme/bootstrap/normalize.less
  39. +55 −0 theme/bootstrap/pager.less
  40. +88 −0 theme/bootstrap/pagination.less
  41. +195 −0 theme/bootstrap/panels.less
  42. +133 −0 theme/bootstrap/popovers.less
  43. +105 −0 theme/bootstrap/print.less
  44. +80 −0 theme/bootstrap/progress-bars.less
  45. +93 −0 theme/bootstrap/responsive-utilities.less
  46. +119 −0 theme/bootstrap/scaffolding.less
  47. +233 −0 theme/bootstrap/tables.less
  48. +247 −0 theme/bootstrap/theme.less
  49. +36 −0 theme/bootstrap/thumbnails.less
  50. +95 −0 theme/bootstrap/tooltip.less
  51. +326 −0 theme/bootstrap/type.less
  52. +29 −0 theme/bootstrap/wells.less
  53. +3 −0 theme/components/README.md
  54. +37 −0 theme/site.less
  55. +903 −0 theme/utils/mixins.less
  56. +56 −0 theme/utils/utilities.less
  57. +672 −0 theme/variables.less
View
@@ -10,38 +10,43 @@
module.exports = function(grunt) {
var pretty = require('pretty');
-
- if(!grunt.file.exists('vendor/bootstrap/_config.yml')) {
+ var vendor = grunt.file.readJSON('.bowerrc').directory;
+ if(!grunt.file.exists(vendor + '/bootstrap/_config.yml')) {
grunt.fail.fatal('>> Please run "bower install" before continuing.');
}
// Project configuration.
grunt.initConfig({
- // Load Bootstrap's config data.
- site: grunt.file.readYAML('vendor/bootstrap/_config.yml'),
+ // Project metadata
+ pkg : grunt.file.readJSON('package.json'),
+ site : grunt.file.readYAML('_config.yml'),
+ vendor: vendor,
+
+ // Convenience
+ bootstrap: '<%= vendor %>/bootstrap',
// Run Bootstrap's own Gruntfile.
subgrunt: {
test: {
options: {task: 'test'},
- src: ['vendor/bootstrap']
+ src: ['<%= bootstrap %>']
},
js: {
- options: {task: 'concat:bootstrap'},
- src: ['vendor/bootstrap']
+ options: {task: 'concat'},
+ src: ['<%= bootstrap %>']
},
css: {
- options: {task: 'less:compile'},
- src: ['vendor/bootstrap']
+ options: {task: 'less'},
+ src: ['<%= bootstrap %>']
},
dist: {
options: {task: 'dist'},
- src: ['vendor/bootstrap']
+ src: ['<%= bootstrap %>']
},
all: {
options: {task: 'default'},
- src: ['vendor/bootstrap']
+ src: ['<%= bootstrap %>']
}
},
@@ -56,65 +61,91 @@ module.exports = function(grunt) {
replacements: '<%= replacements.bootstrap %>'
},
files: [
- {expand: true, cwd: 'vendor/bootstrap', src: ['*.html', '_layouts/*.html', '_includes/*.html'], dest: 'templates/', ext: '.hbs'}
+ {expand: true, cwd: '<%= bootstrap %>', src: ['*.html', '_layouts/*.html', '_includes/*.html'], dest: 'templates/', ext: '.hbs'}
]
},
examples: {
options: {
replacements: '<%= replacements.examples %>'
},
- files: [{
- expand: true,
- filter: 'isFile',
- cwd: 'vendor/bootstrap/examples/',
- src: ['{*,**}/*.html'],
- dest: '<%= site.destination %>/examples/'
- }]
+ files: [
+ {expand: true, filter: 'isFile', cwd: '<%= bootstrap %>/examples', src: ['{*,**}/*.html'], dest: '<%= site.dest %>/examples/'}
+ ]
}
},
assemble: {
options: {
flatten: true,
+ assets: '<%= site.assets %>',
+ postprocess: pretty,
+
+ // Metadata
site: '<%= site %>',
- helpers: ['helper-prettify'],
- assets: '<%= site.destination %>/assets',
- partials: 'templates/_includes/*.hbs',
- layoutdir: 'templates/_layouts',
- layout: 'default.hbs',
- postprocess: pretty
+
+ // Templates
+ partials: '<%= site.includes %>',
+ layoutdir: '<%= site.layouts %>',
+ layout: '<%= site.layout %>',
},
- docs: {
+ site: {
src: ['templates/*.hbs'],
- dest: '<%= site.destination %>/'
+ dest: '<%= site.dest %>/'
}
},
+
+ // Compile LESS to CSS
+ less: {
+ options: {
+ paths: [
+ '<%= site.theme %>',
+ '<%= site.theme %>/bootstrap',
+ '<%= site.theme %>/components',
+ '<%= site.theme %>/utils'
+ ],
+ },
+ site: {
+ src: ['<%= site.theme %>/site.less'],
+ dest: '<%= site.assets %>/css/site.css'
+ }
+ },
+
+
copy: {
- libs: {
+ vendor: {
files: {
- '<%= site.destination %>/assets/js/highlight.js': ['vendor/highlightjs/highlight.pack.js'],
- '<%= site.destination %>/assets/css/github.css': ['vendor/highlightjs/styles/github.css']
+ '<%= site.assets %>/js/highlight.js': ['<%= vendor %>/highlightjs/highlight.pack.js'],
+ '<%= site.assets %>/css/github.css': ['<%= vendor %>/highlightjs/styles/github.css']
}
},
assets: {
files: [
- {expand: true, cwd: 'vendor/bootstrap/examples', src: ['**/*.css', '**/*.{jpg,png,gif}'], dest: '<%= site.destination %>/examples/'},
- {expand: true, cwd: 'vendor/bootstrap/dist', src: ['**'], dest: '<%= site.destination %>/assets/'},
- {expand: true, cwd: 'vendor/bootstrap', src: ['assets/**'], dest: '<%= site.destination %>/'}
+ {expand: true, cwd: '<%= bootstrap %>/examples', src: ['**/*.css', '**/*.{jpg,png,gif}'], dest: '<%= site.dest %>/examples/'},
+ {expand: true, cwd: '<%= bootstrap %>/docs-assets', src: ['**'], dest: '<%= site.assets %>/'},
+ {expand: true, cwd: '<%= bootstrap %>/dist', src: ['**'], dest: '<%= site.assets %>/'},
+ ]
+ },
+ update: {
+ files: [
+ {expand: true, cwd: '<%= bootstrap %>/less', src: ['*', '!{var*,mix*,util*}'], dest: '<%= site.theme %>/bootstrap/'},
+ {expand: true, cwd: '<%= bootstrap %>/less', src: ['{util*,mix*}.less'], dest: '<%= site.theme %>/utils'},
+ {expand: true, cwd: '<%= bootstrap %>/less', src: ['variables.less'], dest: '<%= site.theme %>/'},
]
}
},
clean: {
- dist: ['<%= site.destination %>/**/*', '!<%= site.destination %>/.{git,gitignore}']
+ dist: ['<%= site.dest %>/**/*', '!<%= site.dest %>/.{git,gitignore}'],
+ update: ['<%= site.theme %>/bootstrap/{var*,mix*,util*}.less']
}
});
grunt.config.set('site.description', 'Generated by http://assemble.io');
// These plugins provide necessary tasks.
grunt.loadNpmTasks('assemble');
+ grunt.loadNpmTasks('assemble-less');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-frep');
@@ -128,6 +159,8 @@ module.exports = function(grunt) {
grunt.registerTask('dev', ['clean', 'frep', 'assemble']);
+ grunt.registerTask('update', ['copy:update', 'clean:update']);
+
// Default task to be run with the "grunt" command.
grunt.registerTask('default', [
'clean',
@@ -136,6 +169,7 @@ module.exports = function(grunt) {
'copy',
'frep',
'assemble',
+ 'less',
'sync'
]);
};
View
@@ -6,55 +6,66 @@
* Converts the liquid templates to Handlebars
* Builds the HTML from templates using [Assemble][assemble].
+* Swaps out some Bootstrap content with metadata from [_config.yml](./_config.yml).
## Quickstart
_You must have [NPM](npmjs.org), [Bower][bower] and [Grunt][grunt] installed globally before you begin._
-### First
-
+#### 1. Download this project
Do _one_ of the following:
* **[download][download]** this project
-* `git clone https://github.com/assemble/boilerplate-bootstrap.git`
+* `git clone git://github.com/assemble/boilerplate-bootstrap.git`
* `bower install boilerplate-bootstrap`
-### Next
-
-`cd` into the project, and from the command line run:
+#### 2. Next, install Bootstrap and dependencies
+Next, `cd` into the project run the following in the command line:
```bash
-npm i && bower install && cd vendor/bootstrap && npm i
+npm i && git clone git://github.com/twbs/bootstrap.git "vendor/bootstrap" && cd vendor/bootstrap && npm i
```
-You may now run `grunt` to build the project.
+#### 3. Customize [_config.yml](./_config.yml)
+Optionally update the metadata and config defaults to how you want them for your project.
-_Note that if you want to get the absolute latest, bleeding edge Bootstrap you will need to use `git clone https://github.com/twbs/bootstrap.git 'vendor/bootstrap'` instead of `bower install`._
+#### 4. Last, build.
+You may now run `grunt` to build the project.
-### The "assemble" task
+
+## The "assemble" task
If you haven't used [Assemble][assemble] before, please visit [http://assemble.io/docs](http://assemble.io/docs) to learn how to customize the task.
-#### Overview
+### Overview
In the project's Gruntfile, the example `assemble` task is pre-loaded with paths and options to build the project successfully:
```js
assemble: {
options: {
- site: '<%= site %>',
flatten: true,
- assets: 'tmp/assets',
- partials: 'tmp/_includes/*.hbs',
- layoutdir: 'tmp/_layouts',
- layout: 'default.hbs'
+ assets: '<%= site.assets %>',
+ postprocess: pretty,
+
+ // Metadata
+ site: '<%= site %>',
+
+ // Templates
+ partials: '<%= site.includes %>',
+ layoutdir: '<%= site.layouts %>',
+ layout: '<%= site.layout %>',
},
docs: {
- src: ['tmp/*.hbs'],
- dest: 'tmp/'
+ src: ['templates/*.hbs'],
+ dest: '<%= site.dest %>/'
}
}
```
-#### Author
+Take a look at [_config.yml](./_config.yml) to see some of the metadata and config data is defined.
+
+
+
+## Author
**Jon Schlinkert**
@@ -67,11 +78,11 @@ In lieu of a formal styleguide, take care to maintain the existing coding style.
## Release History
+* 2013-12-22 v0.2.6 Updated dependencies, Bootstrap paths.
* 2013-08-03 v0.2.0 Refactored to be awesome.
* 2013-07-16 v0.1.0 First commit.
-
[download]: https://github.com/assemble/boilerplate-bootstrap/archive/master.zip "Download boilerplate-bootstrap"
[helpers]: https://github.com/assemble/handlebars-helpers "Handlebars Helpers"
[assemble]: https://github.com/assemble/assemble/ "Assemble"
View
@@ -0,0 +1,107 @@
+# =============================================
+# Build config
+# =============================================
+
+root: _gh_pages
+dest: <%= site.root %>
+assets: <%= site.dest %>/assets
+
+# Data
+data: data/*.{json,yml}
+
+# Templates
+templates: templates
+includes: <%= site.templates %>/_includes/*.hbs
+layouts: <%= site.templates %>/_layouts
+layout: default.hbs
+pages: <%= site.templates %>/pages
+
+# Extensions
+helpers: <%= site.templates %>/helpers/*.js
+plugins:
+ - assemble-contrib-anchors
+ - assemble-contrib-wordcount
+ - assemble-contrib-toc
+
+# Theme
+theme: theme
+
+
+# =============================================
+# Project metadata
+# =============================================
+
+author: Jon Schlinkert # change to <%= pkg.author.name %> or <%= pkg.author %>
+
+# Assemble metadata.
+assemble:
+ latest: 0.4.33 # change to <%= pkg.version %>
+
+# GitHub
+username: assemble
+name: assemble # change to <%= pkg.name %>
+download:
+ source: <%= pkg.homepage %>/archive/master.zip
+
+
+# =============================================
+# Site metadata
+# =============================================
+
+brand: ASSEMBLE
+title: BOILERPLATE
+lead: The most awe inspiring static site boilerplate in Northern Kentucky.
+keywords: <%= pkg.keywords %>
+
+version: <%= pkg.version %>
+description: <%= pkg.description %>
+license:
+ type: <%= pkg.licenses[0].type %>
+ url: <%= pkg.licenses[0].url %>
+
+
+
+# SEO/SEM
+ga:
+ id: UA-35547601-2
+ domain: false
+ siteid: false
+ tags: false
+
+
+# Links
+url:
+ repo: <%= pkg.homepage %>
+ bugs: <%= pkg.bugs.url %>?state=open
+ ghpages: https://<%= site.username %>.github.io/<%= pkg.name %>/
+
+ # Site
+ domain: http://assemble.io/
+ about: <%= site.url.domain %>/about/
+ blog: <%= site.url.domain %>/blog/
+
+
+# Comments
+disqus:
+ enabled: true
+ shortname: <%= pkg.name %>
+
+# Social
+social:
+ twitter:
+ via: assemblejs
+ username: assemblejs
+ related: jonschlinkert:Assemble core team.
+ facebook: false
+ linkedin: false
+ gplus: false
+ hn: false
+ google: false
+
+# Sharing
+sharing:
+ twitter: false
+ facebook: false
+ gplus: false
+ hn: false
+ google: false
Oops, something went wrong.

0 comments on commit 0c4710c

Please sign in to comment.