Skip to content

Commit

Permalink
Added Bower to manage Javascript dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskuczynski committed May 12, 2013
1 parent 68dfce4 commit 02e2b65
Show file tree
Hide file tree
Showing 17 changed files with 19,670 additions and 541 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ doc

spec/rails_app/log

components
node_modules
dist
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
beanstalkd_view (1.2.0)
beanstalkd_view (1.2.1)
beaneater (~> 0.3.0)
json
sinatra (>= 1.3.0)
Expand Down Expand Up @@ -39,7 +39,7 @@ GEM
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.2)
backports (3.0.3)
backports (3.3.0)
beaneater (0.3.0)
builder (3.0.4)
capybara (2.0.2)
Expand All @@ -53,7 +53,7 @@ GEM
ffi (~> 1.0, >= 1.0.11)
diff-lcs (1.1.3)
erubis (2.7.0)
eventmachine (1.0.0)
eventmachine (1.0.3)
ffi (1.4.0)
hike (1.2.1)
i18n (0.6.1)
Expand All @@ -70,7 +70,7 @@ GEM
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-protection (1.3.2)
rack-protection (1.5.0)
rack
rack-ssl (1.3.2)
rack
Expand Down Expand Up @@ -108,7 +108,7 @@ GEM
multi_json (~> 1.0)
rubyzip
websocket (~> 1.0.4)
sinatra (1.3.5)
sinatra (1.3.6)
rack (~> 1.4)
rack-protection (~> 1.3)
tilt (~> 1.3, >= 1.3.3)
Expand Down
20 changes: 14 additions & 6 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ module.exports = function(grunt) {
pkg: grunt.file.readJSON('package.json'),
concat: {
css: {
src: ['web/css/vendor/bootstrap.min.css',
src: ['components/bootstrap/docs/assets/css/bootstrap.css',
'web/css/*.css'],
dest: 'lib/beanstalkd_view/resources/css/<%= pkg.name %>.css'
},
js: {
src: ['web/js/vendor/jquery-1.7.1.min.js',
'web/js/vendor/underscore-min.js',
'web/js/vendor/bootstrap.min.js',
'web/js/vendor/json-2.js',
src: ['components/json2/json2.js',
'components/jquery/jquery.js',
'components/bootstrap/docs/assets/js/bootstrap.js',
'components/underscore/underscore.js',
'web/js/vendor/bluff-0.3.6.2/js-class.js',
'web/js/vendor/bluff-0.3.6.2/bluff-min.js',
'web/js/*.js'],
Expand All @@ -28,14 +28,22 @@ module.exports = function(grunt) {
src: 'lib/beanstalkd_view/resources/js/<%= pkg.name %>.js',
dest: 'lib/beanstalkd_view/resources/js/<%= pkg.name %>.min.js'
}
},
cssmin: {
compress: {
files: {
'lib/beanstalkd_view/resources/css/<%= pkg.name %>.min.css': ['lib/beanstalkd_view/resources/css/<%= pkg.name %>.css']
}
}
}
});

grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');

// Default task(s).
grunt.registerTask('default', ['jshint', 'concat', 'uglify']);
grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'cssmin']);

};
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ Screenshot
Building the front-end Javascript
------------------------

This project uses Grunt (http://gruntjs.com/) to manage javascript linting, concatenation, and minification.
This project uses Grunt (http://gruntjs.com/) to manage javascript/css linting, concatenation, and minification, and Bower (https://github.com/bower/bower) to manage Javascript dependencies.

For development, install Grunt as specified on the Grunt website. Then execute
For development, install Grunt and Bower as specified on their websites. Then execute

```ruby
bower install
grunt
```

Expand Down
15 changes: 15 additions & 0 deletions component.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "beanstalkd_view",
"version": "0.0.0",
"dependencies": {
"bootstrap": "~2.3.1",
"jquery": "~1.8.3",
"json2": "~ff55d8d4513b149e2511aee01c3a61d372837d1f",
"underscore": "~1.4.4"
},
"ignore": [
"**/.*",
"node_modules",
"components"
]
}
6,153 changes: 6,151 additions & 2 deletions lib/beanstalkd_view/resources/css/beanstalkd_view.css

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions lib/beanstalkd_view/resources/css/beanstalkd_view.min.css

Large diffs are not rendered by default.

13,472 changes: 13,462 additions & 10 deletions lib/beanstalkd_view/resources/js/beanstalkd_view.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions lib/beanstalkd_view/resources/js/beanstalkd_view.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/beanstalkd_view/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module BeanstalkdView
VERSION = "1.2.0"
VERSION = "1.2.1"
end
2 changes: 1 addition & 1 deletion lib/beanstalkd_view/views/layout.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<title>Beanstalkd View - <%= BeanstalkdView::VERSION %></title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<link rel="stylesheet" type="text/css" href="<%= "#{path_prefix}/css/beanstalkd_view.css" %>">
<link rel="stylesheet" type="text/css" href="<%= "#{path_prefix}/css/beanstalkd_view.min.css" %>">
<script type="text/javascript" src="<%= "#{path_prefix}/js/beanstalkd_view.min.js" %>"></script>
</head>
<body>
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"grunt": "~0.4.1",
"grunt-contrib-jshint": "~0.3.0",
"grunt-contrib-concat": "~0.1.3",
"grunt-contrib-uglify": "~0.2.0"
"grunt-contrib-uglify": "~0.2.0",
"grunt-contrib-cssmin": "~0.6.0"
}
}
9 changes: 0 additions & 9 deletions web/css/vendor/bootstrap.min.css

This file was deleted.

6 changes: 0 additions & 6 deletions web/js/vendor/bootstrap.min.js

This file was deleted.

4 changes: 0 additions & 4 deletions web/js/vendor/jquery-1.7.1.min.js

This file was deleted.

Loading

0 comments on commit 02e2b65

Please sign in to comment.