bridgetown-core 0.21.3 → 1.0.0.alpha3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +35 -0
  3. data/Rakefile +5 -5
  4. data/bin/bridgetown +2 -0
  5. data/bridgetown-core.gemspec +3 -0
  6. data/lib/bridgetown-core/cache.rb +3 -5
  7. data/lib/bridgetown-core/cleaner.rb +2 -10
  8. data/lib/bridgetown-core/collection.rb +62 -86
  9. data/lib/bridgetown-core/commands/base.rb +62 -2
  10. data/lib/bridgetown-core/commands/build.rb +33 -12
  11. data/lib/bridgetown-core/commands/concerns/actions.rb +2 -2
  12. data/lib/bridgetown-core/commands/concerns/build_options.rb +3 -10
  13. data/lib/bridgetown-core/commands/concerns/configuration_overridable.rb +3 -1
  14. data/lib/bridgetown-core/commands/console.rb +3 -3
  15. data/lib/bridgetown-core/commands/doctor.rb +13 -11
  16. data/lib/bridgetown-core/commands/new.rb +14 -6
  17. data/lib/bridgetown-core/commands/plugins.rb +8 -11
  18. data/lib/bridgetown-core/commands/serve/servlet.rb +4 -4
  19. data/lib/bridgetown-core/commands/serve.rb +37 -37
  20. data/lib/bridgetown-core/commands/start.rb +106 -0
  21. data/lib/bridgetown-core/commands/webpack/webpack.defaults.js.erb +2 -2
  22. data/lib/bridgetown-core/commands/webpack.rb +1 -1
  23. data/lib/bridgetown-core/component.rb +2 -6
  24. data/lib/bridgetown-core/concerns/liquid_renderable.rb +2 -2
  25. data/lib/bridgetown-core/concerns/site/configurable.rb +1 -13
  26. data/lib/bridgetown-core/concerns/site/content.rb +17 -118
  27. data/lib/bridgetown-core/concerns/site/extensible.rb +3 -4
  28. data/lib/bridgetown-core/concerns/site/localizable.rb +3 -1
  29. data/lib/bridgetown-core/concerns/site/processable.rb +9 -20
  30. data/lib/bridgetown-core/concerns/site/renderable.rb +19 -30
  31. data/lib/bridgetown-core/concerns/site/ssr.rb +53 -0
  32. data/lib/bridgetown-core/concerns/site/writable.rb +6 -9
  33. data/lib/bridgetown-core/configuration.rb +19 -48
  34. data/lib/bridgetown-core/configurations/minitesting.rb +1 -1
  35. data/lib/bridgetown-core/configurations/turbo.rb +1 -1
  36. data/lib/bridgetown-core/converter.rb +1 -0
  37. data/lib/bridgetown-core/converters/erb_templates.rb +8 -5
  38. data/lib/bridgetown-core/converters/liquid_templates.rb +5 -2
  39. data/lib/bridgetown-core/converters/markdown/kramdown_parser.rb +1 -1
  40. data/lib/bridgetown-core/converters/smartypants.rb +1 -0
  41. data/lib/bridgetown-core/current.rb +4 -0
  42. data/lib/bridgetown-core/drops/collection_drop.rb +1 -1
  43. data/lib/bridgetown-core/drops/drop.rb +4 -4
  44. data/lib/bridgetown-core/drops/generated_page_drop.rb +23 -0
  45. data/lib/bridgetown-core/drops/resource_drop.rb +3 -3
  46. data/lib/bridgetown-core/drops/site_drop.rb +3 -47
  47. data/lib/bridgetown-core/entry_filter.rb +1 -0
  48. data/lib/bridgetown-core/errors.rb +0 -2
  49. data/lib/bridgetown-core/filters/url_filters.rb +2 -0
  50. data/lib/bridgetown-core/filters.rb +11 -12
  51. data/lib/bridgetown-core/frontmatter_defaults.rb +44 -82
  52. data/lib/bridgetown-core/{page.rb → generated_page.rb} +34 -60
  53. data/lib/bridgetown-core/generators/prototype_generator.rb +49 -61
  54. data/lib/bridgetown-core/helpers.rb +8 -3
  55. data/lib/bridgetown-core/hooks.rb +2 -2
  56. data/lib/bridgetown-core/layout.rb +15 -4
  57. data/lib/bridgetown-core/liquid_renderer.rb +1 -3
  58. data/lib/bridgetown-core/log_adapter.rb +1 -1
  59. data/lib/bridgetown-core/log_writer.rb +7 -1
  60. data/lib/bridgetown-core/model/base.rb +12 -4
  61. data/lib/bridgetown-core/model/builder_origin.rb +23 -11
  62. data/lib/bridgetown-core/model/origin.rb +3 -0
  63. data/lib/bridgetown-core/model/plugin_origin.rb +34 -0
  64. data/lib/bridgetown-core/model/repo_origin.rb +1 -1
  65. data/lib/bridgetown-core/plugin_manager.rb +10 -10
  66. data/lib/bridgetown-core/publisher.rb +1 -1
  67. data/lib/bridgetown-core/rack/boot.rb +47 -0
  68. data/lib/bridgetown-core/rack/logger.rb +22 -0
  69. data/lib/bridgetown-core/rack/roda.rb +66 -0
  70. data/lib/bridgetown-core/rack/routes.rb +88 -0
  71. data/lib/bridgetown-core/rack/static_indexes.rb +30 -0
  72. data/lib/bridgetown-core/reader.rb +20 -47
  73. data/lib/bridgetown-core/readers/layout_reader.rb +2 -2
  74. data/lib/bridgetown-core/readers/plugin_content_reader.rb +8 -7
  75. data/lib/bridgetown-core/renderer.rb +2 -12
  76. data/lib/bridgetown-core/resource/base.rb +34 -11
  77. data/lib/bridgetown-core/resource/permalink_processor.rb +23 -12
  78. data/lib/bridgetown-core/resource/relations.rb +2 -3
  79. data/lib/bridgetown-core/resource/taxonomy_term.rb +1 -5
  80. data/lib/bridgetown-core/resource/transformer.rb +8 -6
  81. data/lib/bridgetown-core/ruby_template_view.rb +6 -8
  82. data/lib/bridgetown-core/site.rb +4 -8
  83. data/lib/bridgetown-core/static_file.rb +14 -21
  84. data/lib/bridgetown-core/tags/find.rb +6 -6
  85. data/lib/bridgetown-core/tags/highlight.rb +5 -5
  86. data/lib/bridgetown-core/tags/include.rb +22 -32
  87. data/lib/bridgetown-core/tags/link.rb +4 -0
  88. data/lib/bridgetown-core/tags/live_reload_dev_js.rb +13 -0
  89. data/lib/bridgetown-core/tags/post_url.rb +9 -14
  90. data/lib/bridgetown-core/tags/render_content.rb +2 -2
  91. data/lib/bridgetown-core/tasks/bridgetown_tasks.rake +54 -0
  92. data/lib/bridgetown-core/url.rb +5 -4
  93. data/lib/bridgetown-core/utils/aux.rb +57 -0
  94. data/lib/bridgetown-core/utils/ruby_exec.rb +3 -45
  95. data/lib/bridgetown-core/utils/ruby_front_matter.rb +22 -7
  96. data/lib/bridgetown-core/utils.rb +60 -33
  97. data/lib/bridgetown-core/version.rb +2 -2
  98. data/lib/bridgetown-core/watcher.rb +4 -6
  99. data/lib/bridgetown-core.rb +16 -23
  100. data/lib/site_template/Gemfile.erb +6 -2
  101. data/lib/site_template/README.md +6 -6
  102. data/lib/site_template/Rakefile +49 -0
  103. data/lib/site_template/bridgetown.config.yml +2 -3
  104. data/lib/site_template/config/puma.rb +27 -0
  105. data/lib/site_template/config.ru +7 -0
  106. data/lib/site_template/frontend/javascript/index.js.erb +3 -3
  107. data/lib/site_template/package.json.erb +7 -12
  108. data/lib/site_template/server/roda_app.rb +22 -0
  109. data/lib/site_template/server/routes/hello.rb.sample +10 -0
  110. data/lib/site_template/src/_components/head.liquid +2 -1
  111. data/lib/site_template/src/about.md +0 -1
  112. data/lib/site_template/src/posts.md +2 -3
  113. metadata +63 -18
  114. data/lib/bridgetown-core/concerns/data_accessible.rb +0 -20
  115. data/lib/bridgetown-core/concerns/validatable.rb +0 -56
  116. data/lib/bridgetown-core/document.rb +0 -437
  117. data/lib/bridgetown-core/drops/document_drop.rb +0 -80
  118. data/lib/bridgetown-core/drops/excerpt_drop.rb +0 -19
  119. data/lib/bridgetown-core/drops/page_drop.rb +0 -18
  120. data/lib/bridgetown-core/excerpt.rb +0 -200
  121. data/lib/bridgetown-core/readers/data_reader.rb +0 -89
  122. data/lib/bridgetown-core/readers/page_reader.rb +0 -26
  123. data/lib/bridgetown-core/readers/post_reader.rb +0 -109
  124. data/lib/bridgetown-core/regenerator.rb +0 -202
  125. data/lib/bridgetown-core/related_posts.rb +0 -55
  126. data/lib/site_template/config/.keep +0 -0
  127. data/lib/site_template/start.js +0 -17
  128. data/lib/site_template/sync.js +0 -35
@@ -1,35 +0,0 @@
1
- const browserSync = require("browser-sync").create();
2
-
3
- // You can change these configuration values:
4
- const proxy = "http://localhost:4001"
5
- const port = 4000
6
- const uiPort = 4002
7
-
8
- ////////////////
9
- // Browsersync
10
- ////////////////
11
- browserSync.init({
12
- open: false,
13
- notify: false,
14
- proxy: proxy,
15
- port: port,
16
- files: "output/index.html",
17
- ghostMode: {
18
- clicks: false,
19
- forms: false,
20
- scroll: false,
21
- },
22
- reloadDelay: 0,
23
- injectChanges: false,
24
- ui: {
25
- port: uiPort
26
- },
27
- snippetOptions: {
28
- rule: {
29
- match: /<\/head>/i,
30
- fn: function (snippet, match) {
31
- return snippet + match;
32
- },
33
- },
34
- },
35
- });