Permalink
Browse files

first commit

  • Loading branch information...
1 parent 9bb7d3e commit cefa9edd3f0e68b7fc76ab3bfe4f087c83854a26 @jonschlinkert jonschlinkert committed Aug 4, 2013
Showing with 566 additions and 4 deletions.
  1. +3 −0 .bowerrc
  2. +9 −0 .gitattributes
  3. +5 −1 .gitignore
  4. +17 −0 .jshintrc
  5. +5 −0 .travis.yml
  6. +198 −0 Gruntfile.js
  7. +22 −0 LICENSE-MIT
  8. +85 −3 README.md
  9. +18 −0 bower.json
  10. +65 −0 package.json
  11. +139 −0 replacements.js
View
@@ -0,0 +1,3 @@
+{
+ "directory": "vendor"
+}
View
@@ -0,0 +1,9 @@
+# Set default behaviour, in case users don't have core.autocrlf set.
+* text=lf
+* text eol=lf
+*.* eol=lf
+
+*.jpg binary
+*.gif binary
+*.png binary
+*.jpeg binary
View
@@ -11,4 +11,8 @@ pids
logs
results
-npm-debug.log
+src
+_gh_pages
+vendor
+node_modules
+npm-debug.log
View
@@ -0,0 +1,17 @@
+{
+ "curly": true,
+ "eqeqeq": true,
+ "immed": true,
+ "latedef": true,
+ "newcap": true,
+ "noarg": true,
+ "sub": true,
+ "undef": false,
+ "boss": true,
+ "eqnull": true,
+ "globals": {
+ "module": true,
+ "exports": true,
+ "require": true
+ }
+}
View
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - 0.8
+before_script:
+ - npm install -g grunt-cli
View
@@ -0,0 +1,198 @@
+/* jshint node: true */
+module.exports = function(grunt) {
+ "use strict";
+
+ // Project configuration.
+ grunt.initConfig({
+ // Metadata.
+ pkg : grunt.file.readJSON('vendor/bootstrap/package.json'),
+ site : grunt.file.readYAML('vendor/bootstrap/_config.yml'),
+ banner: '/**\n' +
+ '* <%= pkg.name %>.js v<%= pkg.version %> by @fat and @mdo\n' +
+ '* Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
+ '* <%= _.pluck(pkg.licenses, "url").join(", ") %>\n' +
+ '*/\n',
+ jqueryCheck: 'if (!jQuery) { throw new Error(\"Bootstrap requires jQuery\") }\n\n',
+ // Task configuration.
+ clean: {
+ dist: ['tmp/**', 'dist/**']
+ },
+ concat: {
+ options: {
+ banner: '<%= banner %><%= jqueryCheck %>',
+ stripBanners: false
+ },
+ bootstrap: {
+ src: [
+ 'vendor/bootstrap/js/transition.js',
+ 'vendor/bootstrap/js/alert.js',
+ 'vendor/bootstrap/js/button.js',
+ 'vendor/bootstrap/js/carousel.js',
+ 'vendor/bootstrap/js/collapse.js',
+ 'vendor/bootstrap/js/dropdown.js',
+ 'vendor/bootstrap/js/modal.js',
+ 'vendor/bootstrap/js/tooltip.js',
+ 'vendor/bootstrap/js/popover.js',
+ 'vendor/bootstrap/js/scrollspy.js',
+ 'vendor/bootstrap/js/tab.js',
+ 'vendor/bootstrap/js/affix.js'
+ ],
+ dest: 'assets/js/<%= pkg.name %>.js'
+ }
+ },
+ jshint: {
+ assemble: {
+ options: {
+ jshintrc: '.jshintrc'
+ },
+ src: ['Gruntfile.js']
+ },
+ bootstrap: {
+ options: {
+ jshintrc: 'vendor/bootstrap/js/.jshintrc'
+ },
+ src: [
+ 'vendor/bootstrap/js/tests/unit/*.js',
+ 'vendor/bootstrap/Gruntfile.js',
+ 'vendor/bootstrap/js/*.js'
+ ]
+ }
+ },
+ recess: {
+ options: {
+ compile: true
+ },
+ bootstrap: {
+ files: {
+ 'assets/css/bootstrap.css': ['vendor/bootstrap/less/bootstrap.less']
+ }
+ },
+ min: {
+ options: {
+ compress: true
+ },
+ files: {
+ 'assets/css/bootstrap.min.css': ['vendor/bootstrap/less/bootstrap.less']
+ }
+ }
+ },
+ uglify: {
+ options: {
+ banner: '<%= banner %>'
+ },
+ bootstrap: {
+ files: {
+ 'assets/js/<%= pkg.name %>.min.js': ['<%= concat.bootstrap.dest %>']
+ }
+ }
+ },
+ qunit: {
+ options: {
+ inject: 'vendor/bootstrap/js/tests/unit/phantom.js'
+ },
+ files: ['vendor/bootstrap/js/tests/*.html']
+ },
+ connect: {
+ server: {
+ options: {
+ port: 3000,
+ base: '.'
+ }
+ }
+ },
+ watch: {
+ src: {
+ files: '<%= jshint.src.src %>',
+ tasks: ['jshint:src', 'qunit']
+ },
+ test: {
+ files: '<%= jshint.test.src %>',
+ tasks: ['jshint:test', 'qunit']
+ },
+ recess: {
+ files: 'less/*.less',
+ tasks: ['recess']
+ }
+ },
+
+
+ // Initialize regex for refactor task.
+ replacements: require('./replacements').init(grunt),
+
+ // Refactor Liquid to Handlebars so we can
+ // build with Assemble instead of Jekyll
+ replace: {
+ liquid: {
+ options: {
+ replacements: '<%= replacements.regex.patterns %>'
+ },
+ files: [
+ {expand: true, cwd: 'vendor/bootstrap', src: ['**/*.html', '!js/**'], dest: 'src/', ext: '.hbs'}
+ ]
+ }
+ },
+
+ assemble: {
+ options: {
+ site: '<%= site %>', // Load data from Bootstrap's _config.yml
+ flatten: true,
+ assets: 'assets',
+ partials: 'src/_includes/*.hbs',
+ layoutdir: 'src/_layouts',
+ layout: 'default.hbs'
+ },
+ docs: {
+ src: ['src/*.hbs'],
+ dest: '<%= site.destination %>/'
+ }
+ },
+
+ copy: {
+ libs: {
+ files: {
+ 'assets/js/highlight.js': ['vendor/highlightjs/highlight.pack.js'],
+ 'assets/css/github.css': ['vendor/highlightjs/styles/github.css']
+ }
+ },
+ assets: {
+ files: [
+ {expand: true, cwd: 'vendor/bootstrap', src: ['assets/**'], dest: './'}
+ ]
+ }
+ }
+ });
+
+ // These plugins provide necessary tasks.
+ grunt.loadNpmTasks('grunt-contrib-connect');
+ grunt.loadNpmTasks('grunt-contrib-clean');
+ grunt.loadNpmTasks('grunt-contrib-concat');
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-contrib-uglify');
+ grunt.loadNpmTasks('grunt-contrib-qunit');
+ grunt.loadNpmTasks('grunt-contrib-watch');
+ grunt.loadNpmTasks('grunt-recess');
+
+ // Tasks for assemble-bootstrap
+ grunt.loadNpmTasks('grunt-contrib-copy');
+ grunt.loadNpmTasks('grunt-refactor');
+ grunt.loadNpmTasks('assemble');
+
+
+ // Test task.
+ grunt.registerTask('test', ['jshint', 'qunit']);
+
+ // JS distribution task.
+ grunt.registerTask('dist-js', ['concat', 'uglify']);
+
+ // CSS distribution task.
+ grunt.registerTask('dist-css', ['recess']);
+
+ // HTML distribution task.
+ grunt.registerTask('dist-html', ['replace', 'assemble']);
+
+ // Full distribution task.
+ grunt.registerTask('dist', ['clean', 'dist-html', 'dist-css', 'dist-js', 'copy']);
+
+ // Default task.
+ grunt.registerTask('default', ['test', 'dist']);
+};
View
@@ -0,0 +1,22 @@
+Copyright (c) 2013 Jon Schlinkert
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
View
@@ -1,4 +1,86 @@
-bootstrap
-=========
+# assemble-bootstrap
-Build Bootstrap with Assemble instead of Jekyll.
+> Build Bootstrap with [Assemble][assemble] instead of Jekyll.
+
+#### [See it live →](http://assemble.github.io/assemble-bootstrap/)
+
+This is _not a fork or port_ of Bootstrap. This project uses Bootstrap's Gruntfile for compiling CSS and JavaScript, running tests, and all of the other tasks to buid with a couple enhancements:
+
+* Pulls down the latest Bootstrap,
+* Converts the liquid templates to Handlebars
+* Builds the HTML from templates using [Assemble][assemble]. The rest of the project, CSS, JavaScript etc. is mostly unchanged from Bootstrap's Gruntfile configuration.
+
+_You must have NPM, Bower and Grunt install globally before you begin._
+
+## 60 Second Quickstart
+
+After you download this project, `cd` into the project dir, then copy/paste and run the following command to install [Bootstrap](https://github.com/twbs/bootstrap), [Grunt.js](http://gruntjs.com/), [Assemble][assemble] and all of the necessary dependencies:
+
+```bash
+npm install && bower install && cd vendor/bootstrap && npm install
+```
+
+Now run `grunt` to build the project.
+
+
+More about [the built-in Grunt commands](https://github.com/assemble/assemble-bootstrap/issues/7).
+
+
+## The "assemble" task
+If you haven't used [Assemble][assemble] before, it might be worthwhile to visit [http://assemble.io/docs](http://assemble.io/docs) if you need help building the project or learning how to customize it.
+
+### 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 %>', // Load data from Bootstrap's _config.yml
+ flatten: true,
+ assets: 'assets',
+ partials: 'src/_includes/*.hbs',
+ layoutdir: 'src/_layouts',
+ layout: 'default.hbs'
+ },
+ docs: {
+ src: ['src/*.hbs'],
+ dest: '<%= site.destination %>/'
+ }
+}
+```
+
+## Under the Hood
+
+The only thing this project does is convert liquid templates
+
+## Authors
+
+**Jon Schlinkert**
+
++ [http://github.com/jonschlinkert](http://github.com/jonschlinkert)
++ [http://twitter.com/jonschlinkert](http://twitter.com/jonschlinkert)
+
+**Brian Woodward**
+
++ [http://github.com/doowb](http://github.com/doowb)
++ [http://twitter.com/doowb](http://twitter.com/doowb)
+
+
+## Contributing
+In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Use [Assemble][assemble] to build and maintain your gh-pages, blog or documentation. Lint and test your code using [Grunt](http://gruntjs.com/).
+
+
+## Release History
+* 2013-08-03 v0.2.0 Refactored to be awesome.
+* 2013-07-16 v0.1.0 First commit.
+
+
+[download]: https://github.com/assemble/assemble-bootstrap/archive/3.0.0-wip.zip "Download Assemble"
+[helpers]: https://github.com/assemble/handlebars-helpers "Handlebars Helpers"
+[assemble]: https://github.com/assemble/assemble/ "Assemble"
+[assemble-boilerplates]: https://github.com/assemble/assemble-boilerplates "Assemble Boilerplates"
+
+[gruntfile]: http://gruntjs.com/sample-gruntfile
+[configuring tasks]: http://gruntjs.com/configuring-tasks
+[tasks-and-targets]: http://gruntjs.com/configuring-tasks#task-configuration-and-targets
+[files-object]: http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically
View
@@ -0,0 +1,18 @@
+{
+ "name": "assemble-bootstrap",
+ "version": "0.1.4",
+ "main": [
+ "./Gruntfile.js"
+ ],
+ "ignore": [
+ "tmp",
+ "src",
+ "dist",
+ "_gh_pages",
+ "vendor"
+ ],
+ "dependencies": {
+ "bootstrap": "~3.0.0-rc1",
+ "highlightjs": "~7.3.0"
+ }
+}
Oops, something went wrong.

0 comments on commit cefa9ed

Please sign in to comment.