Skip to content

Commit

Permalink
Merge pull request #9 from curationexperts/assets-compile
Browse files Browse the repository at this point in the history
Change paths in CSS and JS to work in parent Rails app
  • Loading branch information
little9 authored Aug 1, 2019
2 parents 52d10d6 + 58bec1e commit 76c1d99
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/zizia/zizia.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var Zizia = {
displayUploadedFile: function() {
var DisplayUploadedFile = require('./DisplayUploadedFile')
var DisplayUploadedFile = require('zizia/DisplayUploadedFile')
new DisplayUploadedFile().display()
}
}
2 changes: 1 addition & 1 deletion app/assets/stylesheets/zizia/zizia.scss
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@require 'file-upload';
@import 'file_upload';
4 changes: 4 additions & 0 deletions lib/zizia/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ module Zizia
class Engine < ::Rails::Engine
isolate_namespace Zizia

initializer :zizia_assets_precompile do |app|
app.config.assets.precompile << %w[zizia/application.js zizia/application.css]
end

initializer :append_migrations do |app|
unless app.root.to_s.match root.to_s
config.paths['db/migrate'].expanded.each do |expanded_path|
Expand Down
2 changes: 1 addition & 1 deletion lib/zizia/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Zizia
VERSION = '2.1.0.alpha.04'
VERSION = '2.1.0.alpha.05'
end
1 change: 1 addition & 0 deletions zizia.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Gem::Specification.new do |gem|
gem.add_dependency 'rails', '~> 5.1.7'
gem.add_dependency 'carrierwave'
gem.add_dependency 'redcarpet'
gem.add_dependency 'sassc-rails'

gem.add_development_dependency 'yard'
gem.add_development_dependency 'bixby'
Expand Down

0 comments on commit 76c1d99

Please sign in to comment.