Skip to content

Commit

Permalink
Add version and move commands to be a peer dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
hopsoft committed Feb 15, 2024
1 parent 938a900 commit 760f10a
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 32 deletions.
42 changes: 21 additions & 21 deletions app/assets/builds/@turbo-boost/elements.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions app/assets/builds/@turbo-boost/elements.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/assets/builds/@turbo-boost/elements.metafile.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"inputs":{"node_modules/@turbo-boost/commands/app/assets/builds/@turbo-boost/commands.js":{"bytes":10249,"imports":[],"format":"esm"},"node_modules/@turbo-boost/devtools/dist/@turbo-boost/devtools.js":{"bytes":19335,"imports":[],"format":"esm"},"app/javascript/elements/turbo_boost_element/index.js":{"bytes":844,"imports":[],"format":"esm"},"app/javascript/elements/toggle_elements/toggle_element/index.js":{"bytes":2193,"imports":[{"path":"app/javascript/elements/turbo_boost_element/index.js","kind":"import-statement","original":"../../turbo_boost_element"}],"format":"esm"},"app/javascript/elements/toggle_elements/target_element/index.js":{"bytes":3370,"imports":[{"path":"app/javascript/elements/toggle_elements/toggle_element/index.js","kind":"import-statement","original":"../toggle_element"}],"format":"esm"},"app/javascript/elements/toggle_elements/trigger_element/focus.js":{"bytes":1585,"imports":[],"format":"esm"},"app/javascript/elements/toggle_elements/trigger_element/index.js":{"bytes":7168,"imports":[{"path":"node_modules/@turbo-boost/devtools/dist/@turbo-boost/devtools.js","kind":"import-statement","original":"@turbo-boost/devtools"},{"path":"app/javascript/elements/toggle_elements/toggle_element/index.js","kind":"import-statement","original":"../toggle_element"},{"path":"app/javascript/elements/toggle_elements/trigger_element/focus.js","kind":"import-statement","original":"./focus"}],"format":"esm"},"app/javascript/elements/index.js":{"bytes":481,"imports":[{"path":"app/javascript/elements/turbo_boost_element/index.js","kind":"import-statement","original":"./turbo_boost_element"},{"path":"app/javascript/elements/toggle_elements/target_element/index.js","kind":"import-statement","original":"./toggle_elements/target_element"},{"path":"app/javascript/elements/toggle_elements/trigger_element/index.js","kind":"import-statement","original":"./toggle_elements/trigger_element"}],"format":"esm"},"app/javascript/index.js":{"bytes":244,"imports":[{"path":"node_modules/@turbo-boost/commands/app/assets/builds/@turbo-boost/commands.js","kind":"import-statement","original":"@turbo-boost/commands"},{"path":"node_modules/@turbo-boost/devtools/dist/@turbo-boost/devtools.js","kind":"import-statement","original":"@turbo-boost/devtools"},{"path":"app/javascript/elements/index.js","kind":"import-statement","original":"./elements"}],"format":"esm"}},"outputs":{"app/assets/builds/@turbo-boost/elements.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":103051},"app/assets/builds/@turbo-boost/elements.js":{"imports":[],"exports":["default"],"entryPoint":"app/javascript/index.js","inputs":{"node_modules/@turbo-boost/commands/app/assets/builds/@turbo-boost/commands.js":{"bytesInOutput":10171},"node_modules/@turbo-boost/devtools/dist/@turbo-boost/devtools.js":{"bytesInOutput":19267},"app/javascript/elements/turbo_boost_element/index.js":{"bytesInOutput":546},"app/javascript/elements/toggle_elements/toggle_element/index.js":{"bytesInOutput":1284},"app/javascript/elements/toggle_elements/target_element/index.js":{"bytesInOutput":2040},"app/javascript/elements/toggle_elements/trigger_element/focus.js":{"bytesInOutput":768},"app/javascript/elements/toggle_elements/trigger_element/index.js":{"bytesInOutput":4299},"app/javascript/elements/index.js":{"bytesInOutput":146},"app/javascript/index.js":{"bytesInOutput":124}},"bytes":38705}}}
{"inputs":{"node_modules/@turbo-boost/devtools/dist/@turbo-boost/devtools.js":{"bytes":19335,"imports":[],"format":"esm"},"app/javascript/version.js":{"bytes":24,"imports":[],"format":"esm"},"app/javascript/elements/turbo_boost_element/index.js":{"bytes":844,"imports":[],"format":"esm"},"app/javascript/elements/toggle_elements/toggle_element/index.js":{"bytes":2193,"imports":[{"path":"app/javascript/elements/turbo_boost_element/index.js","kind":"import-statement","original":"../../turbo_boost_element"}],"format":"esm"},"app/javascript/elements/toggle_elements/target_element/index.js":{"bytes":3370,"imports":[{"path":"app/javascript/elements/toggle_elements/toggle_element/index.js","kind":"import-statement","original":"../toggle_element"}],"format":"esm"},"app/javascript/elements/toggle_elements/trigger_element/focus.js":{"bytes":1585,"imports":[],"format":"esm"},"app/javascript/elements/toggle_elements/trigger_element/index.js":{"bytes":7168,"imports":[{"path":"node_modules/@turbo-boost/devtools/dist/@turbo-boost/devtools.js","kind":"import-statement","original":"@turbo-boost/devtools"},{"path":"app/javascript/elements/toggle_elements/toggle_element/index.js","kind":"import-statement","original":"../toggle_element"},{"path":"app/javascript/elements/toggle_elements/trigger_element/focus.js","kind":"import-statement","original":"./focus"}],"format":"esm"},"app/javascript/elements/index.js":{"bytes":481,"imports":[{"path":"app/javascript/elements/turbo_boost_element/index.js","kind":"import-statement","original":"./turbo_boost_element"},{"path":"app/javascript/elements/toggle_elements/target_element/index.js","kind":"import-statement","original":"./toggle_elements/target_element"},{"path":"app/javascript/elements/toggle_elements/trigger_element/index.js","kind":"import-statement","original":"./toggle_elements/trigger_element"}],"format":"esm"},"app/javascript/index.js":{"bytes":285,"imports":[{"path":"@turbo-boost/commands","kind":"import-statement","external":true},{"path":"node_modules/@turbo-boost/devtools/dist/@turbo-boost/devtools.js","kind":"import-statement","original":"@turbo-boost/devtools"},{"path":"app/javascript/version.js","kind":"import-statement","original":"./version"},{"path":"app/javascript/elements/index.js","kind":"import-statement","original":"./elements"}],"format":"esm"}},"outputs":{"app/assets/builds/@turbo-boost/elements.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":68532},"app/assets/builds/@turbo-boost/elements.js":{"imports":[{"path":"@turbo-boost/commands","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"app/javascript/index.js","inputs":{"app/javascript/index.js":{"bytesInOutput":162},"node_modules/@turbo-boost/devtools/dist/@turbo-boost/devtools.js":{"bytesInOutput":19218},"app/javascript/version.js":{"bytesInOutput":15},"app/javascript/elements/turbo_boost_element/index.js":{"bytesInOutput":546},"app/javascript/elements/toggle_elements/toggle_element/index.js":{"bytesInOutput":1279},"app/javascript/elements/toggle_elements/target_element/index.js":{"bytesInOutput":2040},"app/javascript/elements/toggle_elements/trigger_element/focus.js":{"bytesInOutput":764},"app/javascript/elements/toggle_elements/trigger_element/index.js":{"bytesInOutput":4292},"app/javascript/elements/index.js":{"bytesInOutput":146}},"bytes":28522}}}
3 changes: 2 additions & 1 deletion app/javascript/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import '@turbo-boost/commands'
import devtools from '@turbo-boost/devtools'
import VERSION from './version'
import './elements'

self.TurboBoost = self.TurboBoost || {}
self.TurboBoost.devtools = devtools
self.TurboBoost.Elements = {}
self.TurboBoost.Elements = { VERSION }

export default self.TurboBoost.Elements
1 change: 1 addition & 0 deletions app/javascript/version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default '0.0.17'
2 changes: 1 addition & 1 deletion bin/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import fs from 'fs'

const context = await esbuild.context({
entryPoints: ['app/javascript/index.js'],
external: ['@hotwired/turbo-rails'],
external: ['@hotwired/turbo-rails', '@turbo-boost/commands'],
bundle: true,
format: 'esm',
logLevel: 'debug',
Expand Down
6 changes: 4 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"author": "Nate Hopkins (hopsoft) <[email protected]>",
"license": "MIT",
"dependencies": {
"@turbo-boost/commands": ">= 0.1.1",
"@turbo-boost/devtools": "^0.0.4"
},
"peerDependencies": {
"@hotwired/turbo-rails": ">= 7.2"
"@hotwired/turbo-rails": ">= 7.2",
"@turbo-boost/commands": ">= 0.1.1"
},
"devDependencies": {
"esbuild": "^0.19.0",
Expand Down

0 comments on commit 760f10a

Please sign in to comment.