bridgetown-core 1.3.0.beta3 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec81158ce54460fb44c4296bae6c3eb75c95c627492c6fe5891cbd853089a13c
4
- data.tar.gz: e22e4e4cfd9b4c27a5eefefd1670e43c99badb7eb9c8be96105b47e024324543
3
+ metadata.gz: 90337c7726115f901df3009e9e2d4b528e8439850ac995c38e2cfec4aca38109
4
+ data.tar.gz: 7f32a5135963a21cd915e3a2dd37576daed3c1a9783feb3c236bc5c73b0b138a
5
5
  SHA512:
6
- metadata.gz: 6130dec47320b9b66406afbb6e98e5851ceba1664292c37be8d02a800c9e95a6c9678ccbc5c822dc2f64497e0b9b0826c0956dd72ab81c2526b9fb499b3d13a5
7
- data.tar.gz: ac1d0032d102186ae07d41997bd29541bf96eb3e7aee7aa6ca25df8da5b3cebef18ebb7cb3d51c1ef58270df68c65d126271b55bb822f8fdd046927ccfee68b5
6
+ metadata.gz: 94c3185a2170a979aaa6434b5f36e45e9e73fc331aa42ede507ad559b2dc4abee70f7b8c77b8349a6a7449bd17e15f8ea1a47f6356a7a577829342623c09f84e
7
+ data.tar.gz: 0d03a222870a2a66184498a04681e0b90252602d580e46b90208b10a76528543854ba4a5c6113fe623fead0dc95d49cf0e052cdc20466101ece87223c85e4134
@@ -103,6 +103,8 @@ const importPostCssPlugin = (options, configuration) => ({
103
103
  async setup(build) {
104
104
  // Process .css files with PostCSS
105
105
  build.onLoad({ filter: (configuration.filter || /\.css$/) }, async (args) => {
106
+ if (args.path.endsWith(".lit.css")) return;
107
+
106
108
  const additionalFilePaths = []
107
109
  const css = await fs.readFile(args.path, "utf8")
108
110
 
@@ -307,6 +309,9 @@ module.exports = async (esbuildOptions, ...args) => {
307
309
  if (esbuildOptions.bridgetownConfig) delete esbuildOptions.bridgetownConfig
308
310
 
309
311
  const esbuild = require("esbuild")
312
+ const entryPoints = esbuildOptions.entryPoints || ["./frontend/javascript/index.js"]
313
+ if (esbuildOptions.entryPoints) delete esbuildOptions.entryPoints
314
+
310
315
  const islands = glob.sync(`./${bridgetownConfig.source}/${bridgetownConfig.islandsDir}/*.{js,js.rb}`).map(item => `./${item}`)
311
316
 
312
317
  esbuild.context({
@@ -325,7 +330,7 @@ module.exports = async (esbuildOptions, ...args) => {
325
330
  minify: process.argv.includes("--minify"),
326
331
  sourcemap: true,
327
332
  target: "es2020",
328
- entryPoints: ["./frontend/javascript/index.js", ...islands],
333
+ entryPoints: [...entryPoints, ...islands],
329
334
  entryNames: "[dir]/[name].[hash]",
330
335
  outdir: path.join(process.cwd(), `${bridgetownConfig.destination}/_bridgetown/static`),
331
336
  publicPath: "/_bridgetown/static",
@@ -5,3 +5,5 @@ copy_file "jsconfig.json"
5
5
  say "🎉 esbuild configuration updated successfully!"
6
6
  say "You may need to add `$styles/` to the front of your main CSS imports."
7
7
  say "See https://www.bridgetownrb.com/docs/frontend-assets#esbuild-setup for details."
8
+ say "⚠️ Don't forget to update the esbuild version in your `package.json` file to \"^0.17.19\""
9
+ say "and run `yarn install`!"
@@ -28,7 +28,7 @@ insert_into_file "esbuild.config.js",
28
28
  end
29
29
 
30
30
  insert_into_file "esbuild.config.js",
31
- after: " plugins: [" do
31
+ after: "\n plugins: [\n" do
32
32
  <<-JS
33
33
  ...plugins,
34
34
  JS
@@ -23,7 +23,7 @@ insert_into_file "esbuild.config.js",
23
23
  end
24
24
 
25
25
  insert_into_file "esbuild.config.js",
26
- after: " plugins: [" do
26
+ after: "\n plugins: [\n" do
27
27
  <<-JS
28
28
  ruby2js(),
29
29
  JS
@@ -102,7 +102,7 @@ module Bridgetown
102
102
  def obfuscate_link(input, prefix = "mailto")
103
103
  link = "<a href=\"#{prefix}:#{input}\">#{input}</a>"
104
104
  script = "<script type=\"text/javascript\">document.currentScript.insertAdjacentHTML('"
105
- script += "beforebegin', '#{rot47(link).gsub(%r!\\!, '\\\\\\')}'.replace(/[!-~]/g," # rubocop:disable Style/StringLiteralsInInterpolation
105
+ script += "beforebegin', '#{rot47(link).gsub(%r!\\!, '\\\\\\')}'.replace(/[!-~]/g," # rubocop:disable Style/StringLiteralsInInterpolation, Style/RedundantRegexpArgument
106
106
  script += "function(c){{var j=c.charCodeAt(0);if((j>=33)&&(j<=126)){"
107
107
  script += "return String.fromCharCode(33+((j+ 14)%94));}"
108
108
  script += "else{return String.fromCharCode(j);}}}));</script>"
@@ -221,7 +221,7 @@ module Bridgetown
221
221
  view.view_context.resource
222
222
  end
223
223
 
224
- return unless resource
224
+ return false unless resource
225
225
 
226
226
  name = name.to_s
227
227
  resource.slots.any? do |slot|
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bridgetown
4
- VERSION = "1.3.0.beta3"
4
+ VERSION = "1.3.0"
5
5
  CODE_NAME = "Kelly Butte"
6
6
  end
@@ -133,6 +133,7 @@ module Bridgetown
133
133
 
134
134
  # rubocop:disable Layout/LineLength
135
135
  def component_frontend_matcher(options)
136
+ # TODO: maybe a negative lookbehind would make this regex cleaner?
136
137
  @fematcher ||=
137
138
  %r{(#{options[:components_dir]}|#{options[:islands_dir]})/(?:[^.]+|\.(?!dsd))+(\.js|\.jsx|\.js\.rb|\.css)$}
138
139
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0.beta3
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-18 00:00:00.000000000 Z
11
+ date: 2023-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -590,9 +590,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
590
590
  version: 2.7.0
591
591
  required_rubygems_version: !ruby/object:Gem::Requirement
592
592
  requirements:
593
- - - ">"
593
+ - - ">="
594
594
  - !ruby/object:Gem::Version
595
- version: 1.3.1
595
+ version: '0'
596
596
  requirements: []
597
597
  rubygems_version: 3.1.4
598
598
  signing_key: