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 +4 -4
- data/lib/bridgetown-core/commands/esbuild/esbuild.defaults.js.erb +6 -1
- data/lib/bridgetown-core/commands/esbuild/update.rb +2 -0
- data/lib/bridgetown-core/configurations/lit.rb +1 -1
- data/lib/bridgetown-core/configurations/ruby2js.rb +1 -1
- data/lib/bridgetown-core/filters.rb +1 -1
- data/lib/bridgetown-core/helpers.rb +1 -1
- data/lib/bridgetown-core/version.rb +1 -1
- data/lib/bridgetown-core/watcher.rb +1 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90337c7726115f901df3009e9e2d4b528e8439850ac995c38e2cfec4aca38109
|
4
|
+
data.tar.gz: 7f32a5135963a21cd915e3a2dd37576daed3c1a9783feb3c236bc5c73b0b138a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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: [
|
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`!"
|
@@ -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>"
|
@@ -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
|
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-
|
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:
|
595
|
+
version: '0'
|
596
596
|
requirements: []
|
597
597
|
rubygems_version: 3.1.4
|
598
598
|
signing_key:
|