File tree Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ ### Middleman
2
+
3
+ Make sure you have ` middleman-sprockets ` in your ` Gemfile `
4
+ ``` ruby
5
+ gem ' middleman-sprockets'
6
+ gem ' apexcharts'
7
+ ```
8
+ Don't forget to ` bundle install ` .
9
+
10
+ Activate them in ` config.rb `
11
+ ``` ruby
12
+ activate :sprockets
13
+ activate :apexcharts
14
+ ```
15
+
16
+ and then require it in your ` source/javascripts/site.js ` .
17
+ ``` js
18
+ // = require apexcharts
19
+ ```
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ class ApexCharts ::Middleman < Middleman ::Extension
4
+ def initialize ( app , options_hash = { } , &block )
5
+ super
6
+ end
7
+
8
+ helpers ::ApexCharts ::Helper
9
+ end
10
+
11
+ ::Middleman ::Extensions . register ( :apexcharts , ApexCharts ::Middleman )
Original file line number Diff line number Diff line change 3
3
require 'apex_charts/helper'
4
4
require 'apex_charts/support/rails' if defined? Rails
5
5
require 'apex_charts/support/sinatra' if defined? Sinatra
6
+ require 'apex_charts/support/middleman' if defined? Middleman ::Extension
You can’t perform that action at this time.
0 commit comments