Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Commit

Permalink
Integrated standalone asset precompile
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Boerger committed Jan 28, 2015
1 parent 4463d20 commit a14bbf0
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -3,3 +3,6 @@

.coverage/
rubydeps.*

Gemfile.lock
crowbar_framework/public/
25 changes: 25 additions & 0 deletions Gemfile
@@ -0,0 +1,25 @@
#
# Copyright 2011-2013, Dell
# Copyright 2013-2014, SUSE LINUX Products GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

source 'https://rubygems.org'

group :development do
gem 'uglifier', '~> 2.2.1'
gem 'sass', '~> 3.2.19'
gem 'sprockets-standalone', '~> 1.2.1'
gem 'sprockets', '~> 2.11.0'
end
46 changes: 44 additions & 2 deletions Rakefile
@@ -1,6 +1,48 @@
task :default => [:syntaxcheck]
#
# Copyright 2011-2013, Dell
# Copyright 2013-2014, SUSE LINUX Products GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

begin
require 'sprockets/standalone'

Sprockets::Standalone::RakeTask.new(:assets) do |task, sprockets|
task.assets = [
'**/application.js'
]

task.sources = [
'crowbar_framework/app/assets/javascripts'
]

task.output = 'crowbar_framework/public/assets'

task.compress = true
task.digest = false

sprockets.js_compressor = :uglifier
sprockets.css_compressor = :sass
end
rescue
end

task :syntaxcheck do
system('for f in `find -name \*.rb` ; do echo -n "Syntaxcheck $f: "; ruby -c $f || exit $? ; done')
system('for f in `find -name \*.rb`; do echo -n "Syntaxcheck $f: "; ruby -c $f || exit $? ; done')
exit $?.exitstatus
end

task :default => [
:syntaxcheck
]

0 comments on commit a14bbf0

Please sign in to comment.