Skip to content

Commit b9dc092

Browse files
committed
Use just ruby for serving and bundling
1 parent 6cdb078 commit b9dc092

10 files changed

+125
-117
lines changed

Gemfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source "https://rubygems.org"
2+
3+
gem "jekyll"
4+
gem "jekyll-paginate"
5+
gem "jekyll_asset_pipeline"
6+
gem "yui-compressor"

Gemfile.lock

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
addressable (2.6.0)
5+
public_suffix (>= 2.0.2, < 4.0)
6+
colorator (1.1.0)
7+
concurrent-ruby (1.1.5)
8+
em-websocket (0.5.1)
9+
eventmachine (>= 0.12.9)
10+
http_parser.rb (~> 0.6.0)
11+
eventmachine (1.2.7)
12+
ffi (1.10.0)
13+
forwardable-extended (2.6.0)
14+
http_parser.rb (0.6.0)
15+
i18n (0.9.5)
16+
concurrent-ruby (~> 1.0)
17+
jekyll (3.8.5)
18+
addressable (~> 2.4)
19+
colorator (~> 1.0)
20+
em-websocket (~> 0.5)
21+
i18n (~> 0.7)
22+
jekyll-sass-converter (~> 1.0)
23+
jekyll-watch (~> 2.0)
24+
kramdown (~> 1.14)
25+
liquid (~> 4.0)
26+
mercenary (~> 0.3.3)
27+
pathutil (~> 0.9)
28+
rouge (>= 1.7, < 4)
29+
safe_yaml (~> 1.0)
30+
jekyll-paginate (1.1.0)
31+
jekyll-sass-converter (1.5.2)
32+
sass (~> 3.4)
33+
jekyll-watch (2.2.1)
34+
listen (~> 3.0)
35+
jekyll_asset_pipeline (0.6.0)
36+
jekyll (~> 3.5)
37+
liquid (~> 4.0)
38+
kramdown (1.17.0)
39+
liquid (4.0.3)
40+
listen (3.1.5)
41+
rb-fsevent (~> 0.9, >= 0.9.4)
42+
rb-inotify (~> 0.9, >= 0.9.7)
43+
ruby_dep (~> 1.2)
44+
mercenary (0.3.6)
45+
pathutil (0.16.2)
46+
forwardable-extended (~> 2.6)
47+
public_suffix (3.0.3)
48+
rb-fsevent (0.10.3)
49+
rb-inotify (0.10.0)
50+
ffi (~> 1.0)
51+
rouge (3.3.0)
52+
ruby_dep (1.5.0)
53+
safe_yaml (1.0.5)
54+
sass (3.7.3)
55+
sass-listen (~> 4.0.0)
56+
sass-listen (4.0.0)
57+
rb-fsevent (~> 0.9, >= 0.9.4)
58+
rb-inotify (~> 0.9, >= 0.9.7)
59+
yui-compressor (0.12.0)
60+
61+
PLATFORMS
62+
ruby
63+
64+
DEPENDENCIES
65+
jekyll
66+
jekyll-paginate
67+
jekyll_asset_pipeline
68+
yui-compressor
69+
70+
BUNDLED WITH
71+
2.0.1

Gruntfile.js

-67
This file was deleted.

README.md

+6-30
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,18 @@
22

33
Documentation for [Bower](https://bower.io)
44

5-
The site is built with [Jekyll](http://jekyllrb.com) 2.x and served with GitHub Pages.
5+
The site is built with [Jekyll](http://jekyllrb.com) and served with GitHub Pages.
66

7-
``` bash
8-
# install npm packages
9-
npm install
10-
# run any tasks
11-
grunt
12-
# install jekyll (You may need sudo here)
13-
gem install jekyll
14-
gem install jekyll-paginate
15-
# serve site to view locally
16-
jekyll serve
17-
```
18-
19-
### Docker support
20-
21-
You can build a docker image to serve the site instead of installing Jekyll in
22-
your development environment
7+
## Development
238

24-
``` bash
25-
# build the image
26-
docker build -t bower-io .
27-
# install the npm packages
28-
docker run -t -v $(pwd):/opt/code:rw --rm bower-io npm install
29-
# run any tasks
30-
docker run -t -v $(pwd):/opt/code:rw --rm bower-io grunt
31-
```
32-
33-
You can run the `jekyll server` with the next command:
9+
You need to install recent Node.js and Ruby
3410

3511
``` bash
36-
docker run --rm -ti -p 4000:4000 -v $(pwd):/opt/code:rw bower-io jekyll serve --host 0.0.0.0
12+
npm install
13+
bundle install
14+
bundle exec jekyll serve
3715
```
3816

39-
You can access the server via http://127.0.0.1:4000
40-
4117
## Voice
4218

4319
This site has two main audiences:

_config.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@ paginate: 5
44
paginate_path: /blog/page:num/
55
exclude:
66
- package.json
7-
- Gruntfile.js
87
- node_modules
9-
8+
sass:
9+
load_paths:
10+
- _sass
11+
- node_modules
1012
defaults:
1113
-
1214
scope:
1315
type: posts
1416
values:
1517
layout: blog
1618
categories: blog
17-
18-
github_avatars:
19-
desandro: "https://avatars.githubusercontent.com/u/85566?v=3"
20-
21-
gems: [jekyll-paginate]
19+
gems: [jekyll-paginate, jekyll_asset_pipeline, yui-compressor]

_includes/html-foot.html

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
<script src="/dist/index3.js"></script>
1+
{% javascript_asset_tag global %}
2+
- node_modules/d3/d3.js
3+
- node_modules/es6-promise/dist/es6-promise.js
4+
- node_modules/whatwg-fetch/fetch.js
5+
- node_modules/mustache/mustache.js
6+
- node_modules/mark.js/dist/mark.js
7+
- node_modules/lodash/lodash.js
8+
- js/plottable.js
9+
- js/index.js
10+
{% endjavascript_asset_tag %}
211

312
<!--GA tracking-->
413
<script>

_includes/html-head.html

+9-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@
77

88
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
99

10-
<link rel="stylesheet" type="text/css" href="/dist/index2.css">
10+
<!-- V2 -->
11+
{% css_asset_tag global %}
12+
- node_modules/normalize.css/normalize.css
13+
- css/plottable.css
14+
- css/base.css
15+
- css/masthead.css
16+
- css/modules.css
17+
- css/blog-post.css
18+
{% endcss_asset_tag %}
1119

1220
<!-- Social Medias -->
1321
<meta property="og:url" content="https://bower.io{% if page.url != '/index.html' %}{{ page.url }}{% endif %}">

_plugins/jekyll_asset_pipeline.rb

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
require 'jekyll_asset_pipeline'
2+
3+
module JekyllAssetPipeline
4+
class CssCompressor < JekyllAssetPipeline::Compressor
5+
require 'yui/compressor'
6+
7+
def self.filetype
8+
'.css'
9+
end
10+
11+
def compress
12+
return YUI::CssCompressor.new.compress(@content)
13+
end
14+
end
15+
end

index.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,4 @@ How you use packages is up to you. We recommend you use Bower together with [Gru
7373

7474
## Twitter updates from [@bower](https://twitter.com/bower)
7575

76-
<a class="twitter-timeline" href="https://twitter.com/bower" data-widget-id="480377291369754625">Tweets by @bower</a>
77-
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
76+
<a class="twitter-timeline" href="https://twitter.com/bower?ref_src=twsrc%5Etfw">Tweets by bower</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

package.json

+2-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"doc": "docs"
88
},
99
"scripts": {
10-
"build": "grunt"
10+
"dev": "bundle exec jekyll serve",
11+
"build": "bundle exec jekyll build"
1112
},
1213
"repository": {
1314
"type": "git",
@@ -32,13 +33,5 @@
3233
"plottable": "palantir/plottable#3038243c9",
3334
"rx": "^4.1.0",
3435
"whatwg-fetch": "^1.0.0"
35-
},
36-
"devDependencies": {
37-
"grunt": "^1.0.1",
38-
"grunt-contrib-cssmin": "^1.0.2",
39-
"grunt-contrib-uglify": "^2.0.0",
40-
"grunt-replace": "^1.0.1",
41-
"load-grunt-tasks": "^3.5.0",
42-
"uglify-save-license": "^0.4.1"
4336
}
4437
}

0 commit comments

Comments
 (0)