-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bridgetown.automation.rb
51 lines (51 loc) · 1.03 KB
/
bridgetown.automation.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# If your plugin requires a lot of steps to get set up, consider writing an automation to help guide users.
# You could set up and configure all sorts of things, for example:
#
# add_gem("my_plugin")
#
# add_yarn_for_gem("my_plugin")
#
# add_initializer :"my_plugin" do
# <<~RUBY
# do
# some_config_key 12345
# end
# RUBY
# end
#
# create_builder "my_nifty_builder.rb" do
# <<~RUBY
# class MyNeatBuilder < SiteBuilder
# def build
# puts MyPlugin.hello
# end
# end
# RUBY
# end
#
# javascript_import do
# <<~JS
# import { MyPlugin } from "my_plugin"
# JS
# end
#
# javascript_import 'import "my_plugin/frontend/styles/index.css"'
#
# create_file "src/_data/plugin_data.yml" do
# <<~YAML
# data:
# goes: here
# YAML
# end
#
# color = ask("What's your favorite color?")
#
# append_to_file "bridgetown.config.yml" do
# <<~YAML
#
# my_plugin:
# favorite_color: #{color}
# YAML
# end
#
# Read the Automations documentation: https://www.bridgetownrb.com/docs/automations