bridgetown-core 0.21.1 → 1.0.0.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/bin/bridgetown +2 -0
  3. data/bridgetown-core.gemspec +3 -0
  4. data/lib/bridgetown-core/cleaner.rb +0 -8
  5. data/lib/bridgetown-core/collection.rb +59 -81
  6. data/lib/bridgetown-core/commands/base.rb +60 -1
  7. data/lib/bridgetown-core/commands/build.rb +26 -6
  8. data/lib/bridgetown-core/commands/concerns/build_options.rb +3 -10
  9. data/lib/bridgetown-core/commands/concerns/configuration_overridable.rb +3 -1
  10. data/lib/bridgetown-core/commands/doctor.rb +3 -3
  11. data/lib/bridgetown-core/commands/new.rb +9 -3
  12. data/lib/bridgetown-core/commands/plugins.rb +1 -2
  13. data/lib/bridgetown-core/commands/serve.rb +14 -12
  14. data/lib/bridgetown-core/commands/start.rb +106 -0
  15. data/lib/bridgetown-core/commands/webpack/webpack.defaults.js.erb +2 -2
  16. data/lib/bridgetown-core/concerns/site/configurable.rb +0 -12
  17. data/lib/bridgetown-core/concerns/site/content.rb +16 -117
  18. data/lib/bridgetown-core/concerns/site/localizable.rb +3 -1
  19. data/lib/bridgetown-core/concerns/site/processable.rb +9 -20
  20. data/lib/bridgetown-core/concerns/site/renderable.rb +19 -30
  21. data/lib/bridgetown-core/concerns/site/ssr.rb +53 -0
  22. data/lib/bridgetown-core/concerns/site/writable.rb +5 -8
  23. data/lib/bridgetown-core/configuration.rb +18 -47
  24. data/lib/bridgetown-core/configurations/minitesting.rb +1 -1
  25. data/lib/bridgetown-core/configurations/turbo.rb +1 -1
  26. data/lib/bridgetown-core/converters/erb_templates.rb +2 -1
  27. data/lib/bridgetown-core/converters/liquid_templates.rb +3 -2
  28. data/lib/bridgetown-core/current.rb +4 -0
  29. data/lib/bridgetown-core/drops/collection_drop.rb +1 -1
  30. data/lib/bridgetown-core/drops/generated_page_drop.rb +23 -0
  31. data/lib/bridgetown-core/drops/resource_drop.rb +3 -3
  32. data/lib/bridgetown-core/drops/site_drop.rb +3 -47
  33. data/lib/bridgetown-core/errors.rb +0 -2
  34. data/lib/bridgetown-core/filters/url_filters.rb +3 -1
  35. data/lib/bridgetown-core/frontmatter_defaults.rb +52 -88
  36. data/lib/bridgetown-core/{page.rb → generated_page.rb} +34 -58
  37. data/lib/bridgetown-core/generators/prototype_generator.rb +13 -24
  38. data/lib/bridgetown-core/helpers.rb +7 -2
  39. data/lib/bridgetown-core/layout.rb +15 -4
  40. data/lib/bridgetown-core/log_writer.rb +6 -0
  41. data/lib/bridgetown-core/model/base.rb +10 -2
  42. data/lib/bridgetown-core/model/builder_origin.rb +22 -10
  43. data/lib/bridgetown-core/model/origin.rb +3 -0
  44. data/lib/bridgetown-core/model/plugin_origin.rb +34 -0
  45. data/lib/bridgetown-core/model/repo_origin.rb +1 -1
  46. data/lib/bridgetown-core/plugin_manager.rb +8 -8
  47. data/lib/bridgetown-core/rack/boot.rb +47 -0
  48. data/lib/bridgetown-core/rack/logger.rb +22 -0
  49. data/lib/bridgetown-core/rack/roda.rb +66 -0
  50. data/lib/bridgetown-core/rack/routes.rb +92 -0
  51. data/lib/bridgetown-core/rack/static_indexes.rb +30 -0
  52. data/lib/bridgetown-core/reader.rb +20 -47
  53. data/lib/bridgetown-core/readers/plugin_content_reader.rb +8 -7
  54. data/lib/bridgetown-core/renderer.rb +1 -11
  55. data/lib/bridgetown-core/resource/base.rb +50 -26
  56. data/lib/bridgetown-core/resource/permalink_processor.rb +20 -10
  57. data/lib/bridgetown-core/resource/relations.rb +2 -3
  58. data/lib/bridgetown-core/resource/transformer.rb +1 -1
  59. data/lib/bridgetown-core/ruby_template_view.rb +5 -5
  60. data/lib/bridgetown-core/site.rb +4 -8
  61. data/lib/bridgetown-core/static_file.rb +10 -15
  62. data/lib/bridgetown-core/tags/include.rb +0 -13
  63. data/lib/bridgetown-core/tags/link.rb +4 -0
  64. data/lib/bridgetown-core/tags/live_reload_dev_js.rb +13 -0
  65. data/lib/bridgetown-core/tags/post_url.rb +4 -9
  66. data/lib/bridgetown-core/tasks/bridgetown_tasks.rake +54 -0
  67. data/lib/bridgetown-core/url.rb +2 -1
  68. data/lib/bridgetown-core/utils/aux.rb +57 -0
  69. data/lib/bridgetown-core/utils/ruby_exec.rb +3 -45
  70. data/lib/bridgetown-core/utils/ruby_front_matter.rb +22 -7
  71. data/lib/bridgetown-core/utils.rb +53 -24
  72. data/lib/bridgetown-core/version.rb +2 -2
  73. data/lib/bridgetown-core/watcher.rb +2 -4
  74. data/lib/bridgetown-core.rb +14 -22
  75. data/lib/site_template/Gemfile.erb +6 -2
  76. data/lib/site_template/README.md +6 -6
  77. data/lib/site_template/Rakefile +49 -0
  78. data/lib/site_template/bridgetown.config.yml +2 -3
  79. data/lib/site_template/config/puma.rb +27 -0
  80. data/lib/site_template/config.ru +7 -0
  81. data/lib/site_template/frontend/javascript/index.js.erb +3 -3
  82. data/lib/site_template/package.json.erb +8 -13
  83. data/lib/site_template/server/roda_app.rb +22 -0
  84. data/lib/site_template/server/routes/hello.rb.sample +10 -0
  85. data/lib/site_template/src/_components/head.liquid +2 -1
  86. data/lib/site_template/src/about.md +0 -1
  87. data/lib/site_template/src/posts.md +2 -3
  88. metadata +62 -18
  89. data/lib/bridgetown-core/concerns/data_accessible.rb +0 -20
  90. data/lib/bridgetown-core/concerns/validatable.rb +0 -56
  91. data/lib/bridgetown-core/document.rb +0 -437
  92. data/lib/bridgetown-core/drops/document_drop.rb +0 -80
  93. data/lib/bridgetown-core/drops/excerpt_drop.rb +0 -19
  94. data/lib/bridgetown-core/drops/page_drop.rb +0 -18
  95. data/lib/bridgetown-core/excerpt.rb +0 -200
  96. data/lib/bridgetown-core/readers/data_reader.rb +0 -89
  97. data/lib/bridgetown-core/readers/page_reader.rb +0 -26
  98. data/lib/bridgetown-core/readers/post_reader.rb +0 -109
  99. data/lib/bridgetown-core/regenerator.rb +0 -202
  100. data/lib/bridgetown-core/related_posts.rb +0 -55
  101. data/lib/site_template/config/.keep +0 -0
  102. data/lib/site_template/start.js +0 -17
  103. 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
- });