bridgetown-core 0.14.1 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +3 -1
  3. data/bin/bridgetown +9 -23
  4. data/bridgetown-core.gemspec +3 -1
  5. data/lib/bridgetown-core.rb +9 -2
  6. data/lib/bridgetown-core/commands/apply.rb +73 -0
  7. data/lib/bridgetown-core/commands/base.rb +45 -0
  8. data/lib/bridgetown-core/commands/build.rb +91 -86
  9. data/lib/bridgetown-core/commands/clean.rb +30 -29
  10. data/lib/bridgetown-core/commands/concerns/actions.rb +128 -0
  11. data/lib/bridgetown-core/commands/concerns/build_options.rb +76 -0
  12. data/lib/bridgetown-core/commands/concerns/configuration_overridable.rb +18 -0
  13. data/lib/bridgetown-core/commands/concerns/summarizable.rb +13 -0
  14. data/lib/bridgetown-core/commands/console.rb +57 -39
  15. data/lib/bridgetown-core/commands/doctor.rb +126 -126
  16. data/lib/bridgetown-core/commands/new.rb +120 -155
  17. data/lib/bridgetown-core/commands/plugins.rb +167 -130
  18. data/lib/bridgetown-core/commands/registrations.rb +16 -0
  19. data/lib/bridgetown-core/commands/serve.rb +219 -215
  20. data/lib/bridgetown-core/concerns/convertible.rb +1 -4
  21. data/lib/bridgetown-core/concerns/site/renderable.rb +1 -2
  22. data/lib/bridgetown-core/drops/document_drop.rb +9 -1
  23. data/lib/bridgetown-core/drops/page_drop.rb +1 -1
  24. data/lib/bridgetown-core/excerpt.rb +4 -1
  25. data/lib/bridgetown-core/generators/prototype_generator.rb +2 -0
  26. data/lib/bridgetown-core/liquid_renderer.rb +1 -0
  27. data/lib/bridgetown-core/liquid_renderer/file.rb +1 -4
  28. data/lib/bridgetown-core/liquid_renderer/file_system.rb +3 -1
  29. data/lib/bridgetown-core/page.rb +3 -18
  30. data/lib/bridgetown-core/plugin_manager.rb +31 -17
  31. data/lib/bridgetown-core/renderer.rb +31 -18
  32. data/lib/bridgetown-core/tags/include.rb +14 -0
  33. data/lib/bridgetown-core/tags/render_content.rb +39 -16
  34. data/lib/bridgetown-core/tags/with.rb +15 -0
  35. data/lib/bridgetown-core/utils.rb +44 -0
  36. data/lib/bridgetown-core/version.rb +2 -2
  37. data/lib/bridgetown-core/watcher.rb +17 -10
  38. data/lib/site_template/Gemfile.erb +19 -0
  39. data/lib/site_template/bridgetown.config.yml +5 -3
  40. data/lib/site_template/package.json +1 -0
  41. data/lib/site_template/src/_components/footer.liquid +3 -0
  42. data/lib/site_template/src/_components/head.liquid +9 -0
  43. data/lib/site_template/src/{_includes/navbar.html → _components/navbar.liquid} +0 -0
  44. data/lib/site_template/src/_layouts/default.html +3 -3
  45. data/lib/site_template/start.js +1 -1
  46. data/lib/site_template/webpack.config.js +3 -3
  47. metadata +53 -19
  48. data/lib/bridgetown-core/command.rb +0 -112
  49. data/lib/bridgetown-core/commands/help.rb +0 -34
  50. data/lib/site_template/src/_components/.keep +0 -0
  51. data/lib/site_template/src/_includes/footer.html +0 -3
  52. data/lib/site_template/src/_includes/head.html +0 -9
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Bridgetown
4
- module Commands
5
- class Help < Command
6
- class << self
7
- def init_with_program(prog)
8
- prog.command(:help) do |c|
9
- c.syntax "help [subcommand]"
10
- c.description "Show the help message, optionally for a given subcommand."
11
-
12
- c.action do |args, _|
13
- cmd = (args.first || "").to_sym
14
- if args.empty?
15
- Bridgetown.logger.info prog.to_s
16
- elsif prog.has_command? cmd
17
- Bridgetown.logger.info prog.commands[cmd].to_s
18
- else
19
- invalid_command(prog, cmd)
20
- abort
21
- end
22
- end
23
- end
24
- end
25
-
26
- def invalid_command(prog, cmd)
27
- Bridgetown.logger.error "Error:",
28
- "Hmm... we don't know what the '#{cmd}' command is."
29
- Bridgetown.logger.info "Valid commands:", prog.commands.keys.join(", ")
30
- end
31
- end
32
- end
33
- end
34
- end
File without changes
@@ -1,3 +0,0 @@
1
- <footer>
2
- Contact me at {{ site.metadata.email }}
3
- </footer>
@@ -1,9 +0,0 @@
1
- <meta charset="utf-8" />
2
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
3
- {% capture page_title %}{{ page.title | strip_html | strip_newlines }}{% endcapture %}
4
- <title>{% if page_title != "" %}{{ page_title | escape }} | {{ site.metadata.title | escape }}{% else %}{{ site.metadata.title | escape }}: {{ site.metadata.tagline | escape }}{% endif %}</title>
5
-
6
- <meta name="description" content="{{ site.metadata.description }}" />
7
-
8
- <link rel="stylesheet" href="{% webpack_path css %}" />
9
- <script src="{% webpack_path js %}" defer></script>