Switch to bundler 0.9 for docs.
This commit is contained in:
parent
eb6f2b5bbf
commit
c01faf7714
1
.gitignore
vendored
1
.gitignore
vendored
@ -16,3 +16,4 @@ pkg/*
|
|||||||
coverage*
|
coverage*
|
||||||
docs
|
docs
|
||||||
doc-src/tmp
|
doc-src/tmp
|
||||||
|
doc-src/.bundle
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
disable_system_gems
|
source :gemcutter
|
||||||
|
|
||||||
gem 'nanoc3', :require_as => false
|
gem 'nanoc3', :require => false
|
||||||
gem 'rdiscount'
|
gem 'rdiscount'
|
||||||
gem 'thor'
|
gem 'thor'
|
||||||
gem 'rack'
|
gem 'rack'
|
||||||
@ -9,3 +9,5 @@ gem 'fssm'
|
|||||||
gem 'serve'
|
gem 'serve'
|
||||||
gem 'nokogiri'
|
gem 'nokogiri'
|
||||||
gem 'coderay'
|
gem 'coderay'
|
||||||
|
gem 'haml-edge', :require => 'sass'
|
||||||
|
gem 'rake'
|
79
doc-src/Gemfile.lock
Normal file
79
doc-src/Gemfile.lock
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
fssm:
|
||||||
|
group:
|
||||||
|
- :default
|
||||||
|
version: ">= 0"
|
||||||
|
rake:
|
||||||
|
group:
|
||||||
|
- :default
|
||||||
|
version: ">= 0"
|
||||||
|
thor:
|
||||||
|
group:
|
||||||
|
- :default
|
||||||
|
version: ">= 0"
|
||||||
|
serve:
|
||||||
|
group:
|
||||||
|
- :default
|
||||||
|
version: ">= 0"
|
||||||
|
mime-types:
|
||||||
|
group:
|
||||||
|
- :default
|
||||||
|
version: ">= 0"
|
||||||
|
rack:
|
||||||
|
group:
|
||||||
|
- :default
|
||||||
|
version: ">= 0"
|
||||||
|
nanoc3:
|
||||||
|
group:
|
||||||
|
- :default
|
||||||
|
version: ">= 0"
|
||||||
|
require: []
|
||||||
|
|
||||||
|
rdiscount:
|
||||||
|
group:
|
||||||
|
- :default
|
||||||
|
version: ">= 0"
|
||||||
|
coderay:
|
||||||
|
group:
|
||||||
|
- :default
|
||||||
|
version: ">= 0"
|
||||||
|
haml-edge:
|
||||||
|
group:
|
||||||
|
- :default
|
||||||
|
version: ">= 0"
|
||||||
|
require:
|
||||||
|
- sass
|
||||||
|
nokogiri:
|
||||||
|
group:
|
||||||
|
- :default
|
||||||
|
version: ">= 0"
|
||||||
|
specs:
|
||||||
|
- nokogiri:
|
||||||
|
version: 1.4.1.1
|
||||||
|
- coderay:
|
||||||
|
version: 0.9.1
|
||||||
|
- haml-edge:
|
||||||
|
version: 2.3.155
|
||||||
|
- activesupport:
|
||||||
|
version: 2.3.5
|
||||||
|
- rdiscount:
|
||||||
|
version: 1.5.8
|
||||||
|
- nanoc3:
|
||||||
|
version: 3.0.9
|
||||||
|
- rack:
|
||||||
|
version: 1.1.0
|
||||||
|
- serve:
|
||||||
|
version: 0.10.0
|
||||||
|
- mime-types:
|
||||||
|
version: "1.16"
|
||||||
|
- thor:
|
||||||
|
version: 0.13.4
|
||||||
|
- rake:
|
||||||
|
version: 0.8.7
|
||||||
|
- fssm:
|
||||||
|
version: 0.1.3
|
||||||
|
hash: 8d69b94ae57d013d95d60dd554ffc9f6fa2529e4
|
||||||
|
sources:
|
||||||
|
- Rubygems:
|
||||||
|
uri: http://gemcutter.org
|
@ -49,7 +49,7 @@ If you are adding an asset (E.g. image, css, javascript) place the file(s) in th
|
|||||||
|
|
||||||
Running the following command will generate a new example:
|
Running the following command will generate a new example:
|
||||||
|
|
||||||
./bin/thor generate:example blueprint/grid/simple/
|
bundle exec thor generate:example blueprint/grid/simple/
|
||||||
|
|
||||||
An example consists of three files:
|
An example consists of three files:
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ After adding the example and adjusting the metadata, go to the reference page an
|
|||||||
|
|
||||||
Generate a reference file for a stylesheet:
|
Generate a reference file for a stylesheet:
|
||||||
|
|
||||||
./bin/thor generate:reference ../frameworks/compass/stylesheets/_compass.sass
|
bundle exec thor generate:reference ../frameworks/compass/stylesheets/_compass.sass
|
||||||
|
|
||||||
The item metadata (at the top of the file) provides some details about what stylesheet is being documented. For instance, here is the metadata for the blueprint color module item:
|
The item metadata (at the top of the file) provides some details about what stylesheet is being documented. For instance, here is the metadata for the blueprint color module item:
|
||||||
|
|
||||||
@ -117,16 +117,15 @@ If you encounter any problems, there's usually some people around to help at #co
|
|||||||
* The git installer for OSX can be found here: http://code.google.com/p/git-osx-installer/
|
* The git installer for OSX can be found here: http://code.google.com/p/git-osx-installer/
|
||||||
* A basic knowledge of git
|
* A basic knowledge of git
|
||||||
|
|
||||||
Make sure you are running the latest version of the Compass and Haml gems:
|
Make sure that you have RubyGems v1.3.6 or greater:
|
||||||
|
|
||||||
$ sudo gem install compass --pre
|
$ gem -v
|
||||||
$ sudo gem install haml-edge
|
|
||||||
|
|
||||||
If that doesn't work, RubyGems is probably out of date, try:
|
If that doesn't work, RubyGems is probably out of date, try:
|
||||||
|
|
||||||
$ sudo gem update --system
|
$ sudo gem update --system
|
||||||
|
|
||||||
You will also need the bundler gem, so if you don't have it:
|
You will need the bundler gem, so if you don't have it:
|
||||||
|
|
||||||
$ gem install bundler
|
$ gem install bundler
|
||||||
|
|
||||||
@ -144,12 +143,6 @@ Go to your fork of Compass on github. Your compass fork will be available on htt
|
|||||||
|
|
||||||
$ git clone git@github.com:**yourusername**/compass.git
|
$ git clone git@github.com:**yourusername**/compass.git
|
||||||
|
|
||||||
It's important that you have the haml source tree at the same directory level as compass. In the same directory that you git cloned Compass, make a git clone of Haml:
|
|
||||||
|
|
||||||
$ git clone git://github.com/nex3/haml.git
|
|
||||||
|
|
||||||
If your Compass Fork lives in Sites/compass, haml should live in Sites/haml.
|
|
||||||
|
|
||||||
### 3. Switch to the docs branch
|
### 3. Switch to the docs branch
|
||||||
|
|
||||||
To work on the docs, you need to do a checkout of the docs branch
|
To work on the docs, you need to do a checkout of the docs branch
|
||||||
@ -167,28 +160,26 @@ If you haven't yet done so, install bundler:
|
|||||||
Bundle the gems for this application:
|
Bundle the gems for this application:
|
||||||
|
|
||||||
$ cd doc-src
|
$ cd doc-src
|
||||||
$ gem bundle
|
$ bundle install
|
||||||
|
|
||||||
Your new app executables for this app are located in the bin/ directory.
|
|
||||||
|
|
||||||
### 6. Compile the docs
|
### 6. Compile the docs
|
||||||
|
|
||||||
To compile (and auto recompile) and preview the site in your browser: (make sure you run nanoc3/aco from the doc-src directory)
|
To compile (and auto recompile) and preview the site in your browser: (make sure you run nanoc3/aco from the doc-src directory)
|
||||||
|
|
||||||
$ cd doc-src
|
$ cd doc-src
|
||||||
$ export RUBYLIB="../lib:../../haml/lib"
|
$ export RUBYLIB="../lib"
|
||||||
$ bin/nanoc3 aco
|
$ bundle exec nanoc3 aco
|
||||||
|
|
||||||
Then open `http://localhost:3000/docs/` in your web browser.
|
Then open `http://localhost:3000/docs/` in your web browser.
|
||||||
|
|
||||||
aco stands for autocompiler; the site will recompile every time you request a new page.
|
aco stands for autocompiler; the site will recompile every time you request a new page.
|
||||||
|
|
||||||
If you find `bin/nanoc3 aco` to be sluggish, try this alternative workflow:
|
If you find `bundle exec nanoc3 aco` to be sluggish, try this alternative workflow:
|
||||||
|
|
||||||
$ cd doc-src
|
$ cd doc-src
|
||||||
$ export RUBYLIB="../lib:../../haml/lib"
|
$ export RUBYLIB="../lib"
|
||||||
$ /bin/serve 3000 .. &
|
$ bundle exec serve 3000 .. &
|
||||||
$ rake watch
|
$ bundle exec rake watch
|
||||||
|
|
||||||
It is recommended that you read the 5 minute [tutorial](http://nanoc.stoneship.org/tutorial/) on Nanoc.
|
It is recommended that you read the 5 minute [tutorial](http://nanoc.stoneship.org/tutorial/) on Nanoc.
|
||||||
|
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
require File.join(File.dirname(__FILE__), 'vendor/gems/environment')
|
begin
|
||||||
|
# Try to require the preresolved locked set of gems.
|
||||||
|
require File.expand_path('../.bundle/environment', __FILE__)
|
||||||
|
rescue LoadError
|
||||||
|
# Fall back on doing an unlocked resolve at runtime.
|
||||||
|
require "rubygems"
|
||||||
|
require "bundler"
|
||||||
|
Bundler.setup
|
||||||
|
end
|
||||||
|
|
||||||
require 'nanoc3/tasks'
|
require 'nanoc3/tasks'
|
||||||
$: << "lib"
|
$: << "lib"
|
||||||
|
|
||||||
@ -36,7 +45,7 @@ task :watch do
|
|||||||
rebuild_site.call(nil,nil)
|
rebuild_site.call(nil,nil)
|
||||||
|
|
||||||
puts ">>> Watching for Changes <<<"
|
puts ">>> Watching for Changes <<<"
|
||||||
puts "Run: ./bin/serve .."
|
puts "Run: bundle exec serve .."
|
||||||
monitor = FSSM::Monitor.new
|
monitor = FSSM::Monitor.new
|
||||||
monitor.path("#{File.dirname(__FILE__)}/content", '**/*') do
|
monitor.path("#{File.dirname(__FILE__)}/content", '**/*') do
|
||||||
update(&rebuild_site)
|
update(&rebuild_site)
|
||||||
|
@ -49,7 +49,7 @@ class Generate < Thor
|
|||||||
| /* And the source is shown to the user as Sass and as CSS. */
|
| /* And the source is shown to the user as Sass and as CSS. */
|
||||||
EXAMPLE
|
EXAMPLE
|
||||||
example_file.puts example_contents.gsub(/^ +\| /, '')
|
example_file.puts example_contents.gsub(/^ +\| /, '')
|
||||||
puts "./bin/nanoc3 co && open http://localhost:3000/docs/examples/#{identifier} && ./bin/nanoc3 aco"
|
puts "bundle exec nanoc3 co && open http://localhost:3000/docs/examples/#{identifier} && bundle exec nanoc3 aco"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user