anchor_ui-sprockets 5.2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +67 -0
- data/Rakefile +20 -0
- data/app/assets/fonts/coreui-icons/CoreUI-Icons-Linear-Free.eot +0 -0
- data/app/assets/fonts/coreui-icons/CoreUI-Icons-Linear-Free.svg +110 -0
- data/app/assets/fonts/coreui-icons/CoreUI-Icons-Linear-Free.ttf +0 -0
- data/app/assets/fonts/coreui-icons/CoreUI-Icons-Linear-Free.woff +0 -0
- data/app/assets/javascripts/core.min.js +10 -0
- data/app/assets/javascripts/core.min.js.map +1 -0
- data/app/assets/javascripts/coreui/coreui-utilities.js +1072 -0
- data/app/assets/javascripts/coreui/coreui-utilities.js.map +1 -0
- data/app/assets/javascripts/coreui/coreui-utilities.min.js +7 -0
- data/app/assets/javascripts/coreui/coreui-utilities.min.js.map +1 -0
- data/app/assets/javascripts/coreui/coreui.js +1962 -0
- data/app/assets/javascripts/coreui/coreui.js.map +1 -0
- data/app/assets/javascripts/coreui/coreui.min.js +7 -0
- data/app/assets/javascripts/coreui/coreui.min.js.map +1 -0
- data/app/assets/javascripts/custom-tooltips.min.js +2 -0
- data/app/assets/javascripts/custom-tooltips.min.js.map +1 -0
- data/app/assets/javascripts/pace.min.js +2 -0
- data/app/assets/javascripts/perfect-scrollbar.min.js +6 -0
- data/app/assets/stylesheets/coreui-icons/_core.scss +33 -0
- data/app/assets/stylesheets/coreui-icons/_functions.scss +3 -0
- data/app/assets/stylesheets/coreui-icons/_variables.scss +106 -0
- data/app/assets/stylesheets/coreui-icons/coreui-icons.scss +11 -0
- data/app/assets/stylesheets/coreui/_animate.scss +27 -0
- data/app/assets/stylesheets/coreui/_aside.scss +65 -0
- data/app/assets/stylesheets/coreui/_avatars.scss +44 -0
- data/app/assets/stylesheets/coreui/_badge.scss +3 -0
- data/app/assets/stylesheets/coreui/_brand-buttons.scss +60 -0
- data/app/assets/stylesheets/coreui/_brand-card.scss +65 -0
- data/app/assets/stylesheets/coreui/_breadcrumb-menu.scss +44 -0
- data/app/assets/stylesheets/coreui/_breadcrumb.scss +16 -0
- data/app/assets/stylesheets/coreui/_buttons.scss +32 -0
- data/app/assets/stylesheets/coreui/_callout.scss +73 -0
- data/app/assets/stylesheets/coreui/_card.scss +117 -0
- data/app/assets/stylesheets/coreui/_charts.scss +55 -0
- data/app/assets/stylesheets/coreui/_dropdown-menu-right.scss +8 -0
- data/app/assets/stylesheets/coreui/_dropdown.scss +69 -0
- data/app/assets/stylesheets/coreui/_footer.scss +9 -0
- data/app/assets/stylesheets/coreui/_grid.scss +15 -0
- data/app/assets/stylesheets/coreui/_header.scss +135 -0
- data/app/assets/stylesheets/coreui/_ie-custom-properties.scss +14 -0
- data/app/assets/stylesheets/coreui/_images.scss +6 -0
- data/app/assets/stylesheets/coreui/_input-group.scss +5 -0
- data/app/assets/stylesheets/coreui/_layout.scss +483 -0
- data/app/assets/stylesheets/coreui/_list-group.scss +35 -0
- data/app/assets/stylesheets/coreui/_mixins.scss +7 -0
- data/app/assets/stylesheets/coreui/_modal.scss +13 -0
- data/app/assets/stylesheets/coreui/_nav.scss +57 -0
- data/app/assets/stylesheets/coreui/_navbar.scss +135 -0
- data/app/assets/stylesheets/coreui/_others.scss +4 -0
- data/app/assets/stylesheets/coreui/_progress-group.scss +40 -0
- data/app/assets/stylesheets/coreui/_progress.scss +15 -0
- data/app/assets/stylesheets/coreui/_rtl.scss +27 -0
- data/app/assets/stylesheets/coreui/_sidebar.scss +606 -0
- data/app/assets/stylesheets/coreui/_switches.scss +173 -0
- data/app/assets/stylesheets/coreui/_tables.scss +20 -0
- data/app/assets/stylesheets/coreui/_utilities.scss +4 -0
- data/app/assets/stylesheets/coreui/_variables.scss +204 -0
- data/app/assets/stylesheets/coreui/_vendors.scss +1 -0
- data/app/assets/stylesheets/coreui/_widgets.scss +1 -0
- data/app/assets/stylesheets/coreui/bootstrap.scss +4 -0
- data/app/assets/stylesheets/coreui/bootstrap/_alert.scss +51 -0
- data/app/assets/stylesheets/coreui/bootstrap/_badge.scss +47 -0
- data/app/assets/stylesheets/coreui/bootstrap/_breadcrumb.scss +41 -0
- data/app/assets/stylesheets/coreui/bootstrap/_button-group.scss +172 -0
- data/app/assets/stylesheets/coreui/bootstrap/_buttons.scss +143 -0
- data/app/assets/stylesheets/coreui/bootstrap/_card.scss +301 -0
- data/app/assets/stylesheets/coreui/bootstrap/_carousel.scss +236 -0
- data/app/assets/stylesheets/coreui/bootstrap/_close.scss +35 -0
- data/app/assets/stylesheets/coreui/bootstrap/_code.scss +48 -0
- data/app/assets/stylesheets/coreui/bootstrap/_custom-forms.scss +433 -0
- data/app/assets/stylesheets/coreui/bootstrap/_dropdown.scss +166 -0
- data/app/assets/stylesheets/coreui/bootstrap/_forms.scss +333 -0
- data/app/assets/stylesheets/coreui/bootstrap/_functions.scss +86 -0
- data/app/assets/stylesheets/coreui/bootstrap/_grid.scss +52 -0
- data/app/assets/stylesheets/coreui/bootstrap/_images.scss +42 -0
- data/app/assets/stylesheets/coreui/bootstrap/_input-group.scss +173 -0
- data/app/assets/stylesheets/coreui/bootstrap/_jumbotron.scss +16 -0
- data/app/assets/stylesheets/coreui/bootstrap/_list-group.scss +115 -0
- data/app/assets/stylesheets/coreui/bootstrap/_media.scss +8 -0
- data/app/assets/stylesheets/coreui/bootstrap/_mixins.scss +41 -0
- data/app/assets/stylesheets/coreui/bootstrap/_modal.scss +180 -0
- data/app/assets/stylesheets/coreui/bootstrap/_nav.scss +118 -0
- data/app/assets/stylesheets/coreui/bootstrap/_navbar.scss +299 -0
- data/app/assets/stylesheets/coreui/bootstrap/_pagination.scss +78 -0
- data/app/assets/stylesheets/coreui/bootstrap/_popover.scss +183 -0
- data/app/assets/stylesheets/coreui/bootstrap/_print.scss +141 -0
- data/app/assets/stylesheets/coreui/bootstrap/_progress.scss +34 -0
- data/app/assets/stylesheets/coreui/bootstrap/_reboot.scss +483 -0
- data/app/assets/stylesheets/coreui/bootstrap/_root.scss +19 -0
- data/app/assets/stylesheets/coreui/bootstrap/_tables.scss +187 -0
- data/app/assets/stylesheets/coreui/bootstrap/_tooltip.scss +115 -0
- data/app/assets/stylesheets/coreui/bootstrap/_transitions.scss +22 -0
- data/app/assets/stylesheets/coreui/bootstrap/_type.scss +125 -0
- data/app/assets/stylesheets/coreui/bootstrap/_utilities.scss +15 -0
- data/app/assets/stylesheets/coreui/bootstrap/_variables.scss +952 -0
- data/app/assets/stylesheets/coreui/bootstrap/bootstrap-grid.scss +32 -0
- data/app/assets/stylesheets/coreui/bootstrap/bootstrap-reboot.scss +12 -0
- data/app/assets/stylesheets/coreui/bootstrap/bootstrap.scss +42 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_alert.scss +13 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_background-variant.scss +21 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_badge.scss +12 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_border-radius.scss +35 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_box-shadow.scss +5 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_breakpoints.scss +123 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_buttons.scss +109 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_caret.scss +66 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_clearfix.scss +7 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_float.scss +11 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_forms.scss +147 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_gradients.scss +45 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_grid-framework.scss +67 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_grid.scss +52 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_hover.scss +37 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_image.scss +36 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_list-group.scss +21 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_lists.scss +7 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_nav-divider.scss +10 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_pagination.scss +22 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_reset-text.scss +17 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_resize.scss +6 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_screen-reader.scss +33 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_size.scss +6 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_table-row.scss +30 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_text-emphasis.scss +14 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_text-hide.scss +13 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_text-truncate.scss +8 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_transition.scss +13 -0
- data/app/assets/stylesheets/coreui/bootstrap/mixins/_visibility.scss +7 -0
- data/app/assets/stylesheets/coreui/bootstrap/utilities/_align.scss +8 -0
- data/app/assets/stylesheets/coreui/bootstrap/utilities/_background.scss +19 -0
- data/app/assets/stylesheets/coreui/bootstrap/utilities/_borders.scss +59 -0
- data/app/assets/stylesheets/coreui/bootstrap/utilities/_clearfix.scss +3 -0
- data/app/assets/stylesheets/coreui/bootstrap/utilities/_display.scss +38 -0
- data/app/assets/stylesheets/coreui/bootstrap/utilities/_embed.scss +52 -0
- data/app/assets/stylesheets/coreui/bootstrap/utilities/_flex.scss +51 -0
- data/app/assets/stylesheets/coreui/bootstrap/utilities/_float.scss +9 -0
- data/app/assets/stylesheets/coreui/bootstrap/utilities/_position.scss +37 -0
- data/app/assets/stylesheets/coreui/bootstrap/utilities/_screenreaders.scss +11 -0
- data/app/assets/stylesheets/coreui/bootstrap/utilities/_shadows.scss +6 -0
- data/app/assets/stylesheets/coreui/bootstrap/utilities/_sizing.scss +12 -0
- data/app/assets/stylesheets/coreui/bootstrap/utilities/_spacing.scss +51 -0
- data/app/assets/stylesheets/coreui/bootstrap/utilities/_text.scss +58 -0
- data/app/assets/stylesheets/coreui/bootstrap/utilities/_visibility.scss +11 -0
- data/app/assets/stylesheets/coreui/coreui-standalone.scss +65 -0
- data/app/assets/stylesheets/coreui/coreui.scss +64 -0
- data/app/assets/stylesheets/coreui/mixins/_avatars.scss +17 -0
- data/app/assets/stylesheets/coreui/mixins/_borders.scss +31 -0
- data/app/assets/stylesheets/coreui/mixins/_buttons.scss +41 -0
- data/app/assets/stylesheets/coreui/mixins/_card-accent.scss +4 -0
- data/app/assets/stylesheets/coreui/mixins/_list-group.scss +7 -0
- data/app/assets/stylesheets/coreui/mixins/_sidebar-width.scss +18 -0
- data/app/assets/stylesheets/coreui/mixins/_switches.scss +78 -0
- data/app/assets/stylesheets/coreui/utilities/_background.scss +28 -0
- data/app/assets/stylesheets/coreui/utilities/_borders.scss +19 -0
- data/app/assets/stylesheets/coreui/utilities/_display.scss +18 -0
- data/app/assets/stylesheets/coreui/utilities/_typography.scss +55 -0
- data/app/assets/stylesheets/coreui/variables/_colors.scss +146 -0
- data/app/assets/stylesheets/coreui/variables/bootstrap/_variables.scss +62 -0
- data/app/assets/stylesheets/coreui/vendors/_perfect-scrollbar.scss +94 -0
- data/lib/anchor_ui/sprockets.rb +21 -0
- data/lib/anchor_ui/sprockets/assets.rb +21 -0
- data/lib/anchor_ui/sprockets/assets/base.rb +24 -0
- data/lib/anchor_ui/sprockets/assets/core.rb +24 -0
- data/lib/anchor_ui/sprockets/assets/core_ui.rb +93 -0
- data/lib/anchor_ui/sprockets/assets/core_ui_icons.rb +73 -0
- data/lib/anchor_ui/sprockets/assets/custom_tooltips.rb +24 -0
- data/lib/anchor_ui/sprockets/assets/javascript.rb +39 -0
- data/lib/anchor_ui/sprockets/assets/pace.rb +19 -0
- data/lib/anchor_ui/sprockets/assets/perfect_scrollbar.rb +19 -0
- data/lib/anchor_ui/sprockets/engine.rb +6 -0
- data/lib/anchor_ui/sprockets/paths.rb +21 -0
- data/lib/anchor_ui/sprockets/updater.rb +23 -0
- data/lib/anchor_ui/sprockets/version.rb +7 -0
- data/lib/generators/anchor_ui/sprockets/install_generator.rb +37 -0
- data/lib/generators/anchor_ui/sprockets/templates/_coreui.scss +35 -0
- data/lib/generators/anchor_ui/sprockets/templates/_variables.scss +411 -0
- data/lib/generators/anchor_ui/sprockets/templates/application.js +11 -0
- data/lib/generators/anchor_ui/sprockets/templates/application.scss +7 -0
- metadata +420 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module AnchorUi
|
|
2
|
+
module Sprockets
|
|
3
|
+
module Assets
|
|
4
|
+
class << self
|
|
5
|
+
|
|
6
|
+
def all
|
|
7
|
+
Base.descendants.select do |klass|
|
|
8
|
+
klass.descendants.none?
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def find(name)
|
|
13
|
+
all.find do |klass|
|
|
14
|
+
klass.asset_name == name
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module AnchorUi
|
|
2
|
+
module Sprockets
|
|
3
|
+
module Assets
|
|
4
|
+
class Base < AnchorUi::Core::Assets::Base
|
|
5
|
+
include Paths
|
|
6
|
+
|
|
7
|
+
delegate :asset_name, to: :class
|
|
8
|
+
|
|
9
|
+
private
|
|
10
|
+
|
|
11
|
+
def root_path
|
|
12
|
+
@tmp_path || begin
|
|
13
|
+
Pathname.new File.expand_path("#{__dir__}/../../../..")
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def assets_path
|
|
18
|
+
root_path.join 'assets'
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module AnchorUi
|
|
2
|
+
module Sprockets
|
|
3
|
+
module Assets
|
|
4
|
+
class Core < Javascript
|
|
5
|
+
|
|
6
|
+
def self.asset_name
|
|
7
|
+
'core'
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def update
|
|
11
|
+
super
|
|
12
|
+
download map_url, map_destination_path
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
private
|
|
16
|
+
|
|
17
|
+
def base_url
|
|
18
|
+
"https://raw.github.com/zloirock/core-js/v#{version}/client"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
module AnchorUi
|
|
2
|
+
module Sprockets
|
|
3
|
+
module Assets
|
|
4
|
+
class CoreUi < Base
|
|
5
|
+
include(
|
|
6
|
+
AnchorUi::Core::Assets::Concerns::CoreUi,
|
|
7
|
+
AnchorUi::Core::Assets::Concerns::Zip
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
def self.asset_name
|
|
11
|
+
'coreui'
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def update
|
|
15
|
+
download url, zip_path
|
|
16
|
+
unzip
|
|
17
|
+
compile_coreui_scss
|
|
18
|
+
compile_variables_scss
|
|
19
|
+
move_files
|
|
20
|
+
clear
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
private
|
|
24
|
+
|
|
25
|
+
def zip_name
|
|
26
|
+
"v#{version}.zip"
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def url
|
|
30
|
+
"https://github.com/coreui/coreui/archive/#{zip_name}"
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def stylesheets_destination_path
|
|
34
|
+
stylesheets_path.join asset_name
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def javascripts_destination_path
|
|
38
|
+
javascripts_path.join asset_name
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def extraction_path
|
|
42
|
+
tmp_path.join directory_name
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def javascripts_source_path
|
|
46
|
+
extraction_path.join javascripts_relative_path
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def stylesheets_source_path
|
|
50
|
+
extraction_path.join stylesheets_relative_path
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def templates_path
|
|
54
|
+
root_path.join 'lib/generators/anchor_ui/sprockets/templates'
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def compile_coreui_scss
|
|
58
|
+
super 'coreui'
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def compile_variables_scss
|
|
62
|
+
super(
|
|
63
|
+
<<~SCSS,
|
|
64
|
+
@import
|
|
65
|
+
'bootstrap/functions',
|
|
66
|
+
'bootstrap/variables';
|
|
67
|
+
|
|
68
|
+
SCSS
|
|
69
|
+
<<~SCSS
|
|
70
|
+
|
|
71
|
+
// Paths
|
|
72
|
+
$coreui-icons-font-path: 'coreui-icons';
|
|
73
|
+
SCSS
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def move_files
|
|
78
|
+
FileUtils.rm_rf javascripts_destination_path
|
|
79
|
+
FileUtils.mv(
|
|
80
|
+
javascripts_source_path,
|
|
81
|
+
javascripts_destination_path
|
|
82
|
+
)
|
|
83
|
+
FileUtils.rm_rf stylesheets_destination_path
|
|
84
|
+
FileUtils.mv(
|
|
85
|
+
stylesheets_source_path,
|
|
86
|
+
stylesheets_destination_path
|
|
87
|
+
)
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
module AnchorUi
|
|
2
|
+
module Sprockets
|
|
3
|
+
module Assets
|
|
4
|
+
class CoreUiIcons < Base
|
|
5
|
+
include AnchorUi::Core::Assets::Concerns::Zip
|
|
6
|
+
|
|
7
|
+
def self.asset_name
|
|
8
|
+
'coreui-icons'
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# No version tags on github repo...
|
|
12
|
+
def version
|
|
13
|
+
'master'
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def update
|
|
17
|
+
download url, zip_path
|
|
18
|
+
unzip
|
|
19
|
+
compile_core_scss
|
|
20
|
+
move
|
|
21
|
+
clear
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
private
|
|
25
|
+
|
|
26
|
+
def zip_name
|
|
27
|
+
"#{version}.zip"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def url
|
|
31
|
+
"https://github.com/coreui/coreui-icons/archive/#{zip_name}"
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def fonts_destination_path
|
|
35
|
+
fonts_path.join asset_name
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def stylesheets_destination_path
|
|
39
|
+
stylesheets_path.join asset_name
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def fonts_source_path
|
|
43
|
+
extraction_path.join 'fonts'
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def stylesheets_source_path
|
|
47
|
+
extraction_path.join 'scss'
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def compile_core_scss
|
|
51
|
+
filename = '_core.scss'
|
|
52
|
+
scss = read_scss(filename, newline: false)
|
|
53
|
+
scss.gsub! 'url', 'font-url'
|
|
54
|
+
File.write stylesheets_source_path.join(filename), scss
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def move
|
|
58
|
+
FileUtils.rm_rf fonts_destination_path
|
|
59
|
+
FileUtils.mv(
|
|
60
|
+
fonts_source_path,
|
|
61
|
+
fonts_destination_path
|
|
62
|
+
)
|
|
63
|
+
FileUtils.rm_rf stylesheets_destination_path
|
|
64
|
+
FileUtils.mv(
|
|
65
|
+
stylesheets_source_path,
|
|
66
|
+
stylesheets_destination_path
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module AnchorUi
|
|
2
|
+
module Sprockets
|
|
3
|
+
module Assets
|
|
4
|
+
class CustomTooltips < Javascript
|
|
5
|
+
|
|
6
|
+
def self.asset_name
|
|
7
|
+
'custom-tooltips'
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def update
|
|
11
|
+
super
|
|
12
|
+
download map_url, map_destination_path
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
private
|
|
16
|
+
|
|
17
|
+
def base_url
|
|
18
|
+
"https://raw.github.com/coreui/coreui-plugin-chartjs-custom-tooltips/v#{version}/dist/js"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
module AnchorUi
|
|
2
|
+
module Sprockets
|
|
3
|
+
module Assets
|
|
4
|
+
class Javascript < Base
|
|
5
|
+
|
|
6
|
+
def update
|
|
7
|
+
download url, destination_path
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
private
|
|
11
|
+
|
|
12
|
+
def filename
|
|
13
|
+
"#{asset_name}.min.js"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def map_filename
|
|
17
|
+
"#{filename}.map"
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def destination_path
|
|
21
|
+
javascripts_path.join filename
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def map_destination_path
|
|
25
|
+
javascripts_path.join map_filename
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def url
|
|
29
|
+
"#{base_url}/#{filename}"
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def map_url
|
|
33
|
+
"#{base_url}/#{map_filename}"
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module AnchorUi
|
|
2
|
+
module Sprockets
|
|
3
|
+
module Assets
|
|
4
|
+
class PerfectScrollbar < Javascript
|
|
5
|
+
|
|
6
|
+
def self.asset_name
|
|
7
|
+
'perfect-scrollbar'
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
private
|
|
11
|
+
|
|
12
|
+
def base_url
|
|
13
|
+
"https://raw.github.com/utatti/perfect-scrollbar/#{version}/dist"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module AnchorUi
|
|
2
|
+
module Sprockets
|
|
3
|
+
module Paths
|
|
4
|
+
|
|
5
|
+
private
|
|
6
|
+
|
|
7
|
+
def fonts_path
|
|
8
|
+
assets_path.join 'fonts'
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def javascripts_path
|
|
12
|
+
assets_path.join 'javascripts'
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def stylesheets_path
|
|
16
|
+
assets_path.join 'stylesheets'
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module AnchorUi
|
|
2
|
+
module Sprockets
|
|
3
|
+
class Updater
|
|
4
|
+
|
|
5
|
+
attr_reader :name, :args
|
|
6
|
+
|
|
7
|
+
def initialize(name, *args)
|
|
8
|
+
@name = name
|
|
9
|
+
@args = args
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def execute
|
|
13
|
+
if asset = Assets.find(name)
|
|
14
|
+
asset.new(*args).update
|
|
15
|
+
puts "#{name} updated"
|
|
16
|
+
else
|
|
17
|
+
raise AnchorUi::Core::Errors::AssetInvalid
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
module AnchorUi
|
|
2
|
+
module Sprockets
|
|
3
|
+
class InstallGenerator < Rails::Generators::Base
|
|
4
|
+
include(
|
|
5
|
+
AnchorUi::Core::Generators::Concerns::Install,
|
|
6
|
+
Paths
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
source_root File.expand_path('../templates', __FILE__)
|
|
10
|
+
|
|
11
|
+
def copy_assets
|
|
12
|
+
filename = 'application.js'
|
|
13
|
+
copy_file filename, javascripts_path.join(filename)
|
|
14
|
+
|
|
15
|
+
%w(application _variables _coreui).each do |name|
|
|
16
|
+
filename = "#{name}.scss"
|
|
17
|
+
copy_file filename, stylesheets_path.join(filename)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def delete_application_css
|
|
22
|
+
remove_file 'app/assets/stylesheets/application.css'
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def override_layout
|
|
26
|
+
generate_layout 'include', 'link', 'application'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
private
|
|
30
|
+
|
|
31
|
+
def assets_path
|
|
32
|
+
Pathname.new 'app/assets'
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|