Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs redesign #200

Merged
merged 4 commits into from
Jan 31, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true


[*]

# Change these settings to your own preference
indent_style = space
indent_size = 2

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.grunt
docs-build
node_modules
components
bootstrap-tour.sublime-project
Expand Down
34 changes: 23 additions & 11 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ module.exports = (grunt) ->
level: "error"
max_line_length:
level: "ignore"
default: ["Gruntfile.coffee", "src/**/*.coffee"]
doc: ["Gruntfile.coffee", "docs/*.coffee"]
default: ["Gruntfile.coffee", "src/{,*/}*.coffee"]
doc: ["Gruntfile.coffee", "docs/assets/coffee/*.coffee"]

clean:
default: "build"
Expand All @@ -65,8 +65,8 @@ module.exports = (grunt) ->
dest: "test"
ext: ".spec.js"
doc:
src: "docs/index.coffee"
dest: "docs/assets/js/index.js"
src: "docs/assets/coffee/docs.coffee"
dest: "docs/assets/js/docs.js"

concat:
options:
Expand Down Expand Up @@ -115,18 +115,27 @@ module.exports = (grunt) ->
dest: "build/js"
ext: ".min.js"

jekyll:
build: {}

watch:
options:
livereload: true
default:
files: ["src/coffee/*.coffee"]
tasks: ["build"]
test:
files: ["src/spec/*.coffee"]
tasks: ["test"]
doc:
files: ["docs/*.coffee"]
files: ["docs/assets/coffee/*.coffee"]
tasks: ["coffeelint:doc", "coffee:doc"]
options:
livereload: true
jekyll:
files: [
"docs/{,*/}*.html",
"docs/assets/{,*/}*"
]
tasks: ["jekyll"]

jasmine:
options:
Expand Down Expand Up @@ -155,8 +164,9 @@ module.exports = (grunt) ->
connect:
default:
options:
livereload: true
port: 3000
base: "docs"
base: "docs-build"

open:
default:
Expand Down Expand Up @@ -196,9 +206,11 @@ module.exports = (grunt) ->
]

grunt.registerTask "default", ["run"]
grunt.registerTask "run", ["build", "connect", "open", "watch:doc"]
grunt.registerTask "build", ["clean", "coffeelint", "coffee", "less", "concat", "uglify", "copy"]
grunt.registerTask "test", ["build", "jasmine"]
grunt.registerTask "run", ["build", "connect", "open", "watch"]
grunt.registerTask "build-code", ["clean", "coffeelint", "coffee", "less", "concat", "uglify", "copy"]
grunt.registerTask "build-docs", ["jekyll"]
grunt.registerTask "build", ["build-code", "build-docs"]
grunt.registerTask "test", ["build-code", "jasmine"]
grunt.registerTask "release", "Release a new version, push it and publish it", (target) ->
target = "patch" unless target
grunt.task.run "bump-only:#{target}", "test", "replace", "bump-commit"
40 changes: 17 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,35 @@

Quick and easy way to build your product tours with Twitter Bootstrap Popovers.

*Compatible with Bootstrap <= 3.0.0*
*Compatible with Bootstrap >= 2.3.0*

## Demo and Documentation ##
## Demo and Documentation
[http://bootstraptour.com](http://bootstraptour.com)

## TODO ##
## TODO
- Add the smooth scrolling when the popover is outside the viewport
- Define an appropriate tag + milestone system

## Contributing ##
>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](http://gruntjs.com/).
## Contributing
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](http://gruntjs.com/).

Feel free to contribute with pull requests, bug reports or enhancement suggestions.

We use [Grunt](http://gruntjs.com/) and [Jasmine](http://pivotal.github.io/jasmine/). Both make your lives easier ;)

### How to run/develop
### How to build/develop

Install the dependencies
Files to be developed are located under `./src/`
Compiled sources are then automatically put under `./build/` (and `./test/`)

#### Installing the dependencies

```bash
npm install
gem install jekyll
```

Files to be developed are located under `./src/`
Compiled sources are then automatically put under `./build/` (and `./test/`)

Run main tasks (check `Gruntfile.coffee` for more infos)
#### Running Grunt tasks

```javascript
// Start a server and run the demo page
Expand All @@ -39,22 +40,15 @@ grunt run
grunt build
// Compile all sources and run the tests
grunt test
// Automatically release a new version (see below for more details)
grunt release
```

[More information here](http://bootstraptour.com/#grunt-usage)

## Releasing ##
Releasing a new version is completely automated using the Grunt task `grunt release`.

```javascript
// Automatically release a new version
grunt release // patch release
grunt release:minor // minor release
grunt release:major // major release
```

## License ##
Check `Gruntfile.coffee` for more infos.

## License

Code licensed under the [Apache License v2.0](http://www.apache.org/licenses/LICENSE-2.0).
Documentation licensed under [CC BY 3.0](http://creativecommons.org/licenses/by/3.0/).
Well, the same licenses as Bootstrap. We are lazy! ;)
5 changes: 5 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
markdown: rdiscount
permalink: pretty
source: ./docs
destination: ./docs-build
encoding: UTF-8
6 changes: 6 additions & 0 deletions docs/_includes/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<script src="/assets/vendor/jquery.js"></script>
<script src="/assets/vendor/bootstrap.js"></script>
<script src="/assets/vendor/jquery.smoothscroll.js"></script>
<script src="/assets/vendor/md5.js"></script>
<script src="/assets/js/bootstrap-tour.js"></script>
<script src="/assets/js/docs.js"></script>
28 changes: 28 additions & 0 deletions docs/_includes/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Quick and easy way to build your product tours with Twitter Bootstrap Popovers.">

<title>
{% if page.title == "Bootstrap Tour" %}
{{ page.title }}
{% else %}
{{ page.title }} &middot; Bootstrap Tour
{% endif %}
</title>

<link href="/assets/vendor/bootstrap.min.css" rel="stylesheet">
<link href="/assets/vendor/pygments-manni.css" rel="stylesheet">
<link href="/assets/css/bootstrap-tour.css" rel="stylesheet">
<link href="/assets/css/docs.css" rel="stylesheet">
<!--[if lt IE 9]><script src="/assets/vendor/html5shiv.js"></script><![endif]-->

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-47485647-1', 'bootstraptour.com');
ga('send', 'pageview');
</script>
23 changes: 23 additions & 0 deletions docs/_includes/nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<div id="navbar" class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<button type="button" class="navbar-toggle pull-right" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="/" class="navbar-brand">Bootstrap Tour</a>
<div class="collapse navbar-collapse">
<ul class="navbar-nav nav">
<li {% if page.slug == "home" %} class="active"{% endif %}>
<a href="/">Getting started</a>
</li>
<li {% if page.slug == "api" %} class="active"{% endif %}>
<a href="/api">API documentation</a>
</li>
<li>
<a href="https://github.com/sorich87/bootstrap-tour/issues">Bug reports</a>
</li>
</ul>
</div>
</div>
</div>
12 changes: 12 additions & 0 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
{% include header.html %}
</head>
<body>
<a href="https://github.com/sorich87/bootstrap-tour" id="github"><img src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
{% include nav.html %}
{{ content }}
{% include footer.html %}
</body>
</html>
Loading