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

rake assetpack:build generates empty files #195

Open
dgmstuart opened this issue Mar 19, 2015 · 0 comments
Open

rake assetpack:build generates empty files #195

dgmstuart opened this issue Mar 19, 2015 · 0 comments

Comments

@dgmstuart
Copy link

When I run rake assetpack:build, it generates files for everything in my assets directory, but they're all totally empty

here's my rakefile:

APP_FILE  = 'app.rb'
APP_CLASS = 'Sinatra::Application'

require 'sinatra/assetpack/rake'

And the section from app.rb:

require 'sinatra'
require 'sinatra-initializers'
require 'sinatra/assetpack'
require 'sass'

register Sinatra::Initializers
register Sinatra::AssetPack


use Rack::Auth::Basic, "Restricted Area" do |username, password|
  username == ENV["BASIC_AUTH_USERNAME"] and password == ENV["BASIC_AUTH_PASSWORD"]
end

# Allow @import to work correctly by telling sinatra where to look
#   Without this it tries to do imports relative to *this* file
set :scss, { :load_paths => [File.expand_path('../assets/stylesheets', __FILE__)] }

assets do
  serve '/images', :from => "assets/images"

  serve '/js', :from => 'assets/javascripts'
  js :application, [
    '/js/plugins.js',
    '/js/main.js',
  ]
  js :jquery, [
    '/js/jquery.min.js'
  ]
  js :modernizr, [
    '/js/modernizr.js'
  ]
  js :selectivizr, [
    '/js/selectivizr.js'
  ]

  serve '/css', :from => 'assets/stylesheets'
  css :application, [
    '/css/screen.css'
   ]

  js_compression :jsmin
  css_compression :sass
end

get '/' do
  erb :index
end

#etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant