Skip to content

Commit fdb3d76

Browse files
committed
chore: run bundle exec vite install
1 parent facf1a6 commit fdb3d76

File tree

12 files changed

+1228
-0
lines changed

12 files changed

+1228
-0
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,13 @@ _site
22
.sass-cache
33
.jekyll-cache
44
.jekyll-metadata
5+
.bundle
56
vendor
7+
8+
# Vite Ruby
9+
/public/vite
10+
/public/vite-dev
11+
/public/vite-test
12+
node_modules
13+
*.local
14+
.DS_Store

Procfile.dev

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
vite: bin/vite dev
3+
jekyll: bin/jekyll-vite wait && bundle exec jekyll serve --livereload

Rakefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
require 'jekyll/vite'
3+
ViteRuby.install_tasks
4+

_config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ github_username: jekyll
3232
# Build settings
3333
theme: minima
3434
plugins:
35+
- jekyll/vite
3536
- jekyll-feed
3637

3738
# Exclude from processing.
@@ -43,6 +44,11 @@ plugins:
4344
# their entries' file path in the `include:` list.
4445
#
4546
# exclude:
47+
- bin
48+
- config
49+
- vite.config.ts
50+
- tmp
51+
- Procfile.dev
4652
# - .sass-cache/
4753
# - .jekyll-cache/
4854
# - gemfiles/

_frontend/entrypoints/application.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// To see this message, follow the instructions for your Ruby framework.
2+
//
3+
// When using a plain API, perhaps it's better to generate an HTML entrypoint
4+
// and link to the scripts and stylesheets, and let Vite transform it.
5+
console.log('Vite ⚡️ Ruby')
6+
7+
// Example: Import a stylesheet in <sourceCodeDir>/index.css
8+
// import '~/index.css'

bin/jekyll-vite

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
#
5+
# This file was generated by Bundler.
6+
#
7+
# The application 'jekyll-vite' is installed as part of a gem, and
8+
# this file is here to facilitate running it.
9+
#
10+
11+
require "pathname"
12+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13+
Pathname.new(__FILE__).realpath)
14+
15+
bundle_binstub = File.expand_path("../bundle", __FILE__)
16+
17+
if File.file?(bundle_binstub)
18+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19+
load(bundle_binstub)
20+
else
21+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23+
end
24+
end
25+
26+
require "rubygems"
27+
require "bundler/setup"
28+
29+
load Gem.bin_path("jekyll-vite", "jekyll-vite")

bin/vite

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
#
5+
# This file was generated by Bundler.
6+
#
7+
# The application 'vite' is installed as part of a gem, and
8+
# this file is here to facilitate running it.
9+
#
10+
11+
require "pathname"
12+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13+
Pathname.new(__FILE__).realpath)
14+
15+
bundle_binstub = File.expand_path("../bundle", __FILE__)
16+
17+
if File.file?(bundle_binstub)
18+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19+
load(bundle_binstub)
20+
else
21+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23+
end
24+
end
25+
26+
require "rubygems"
27+
require "bundler/setup"
28+
29+
load Gem.bin_path("vite_ruby", "vite")

config/vite.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"all": {
3+
"sourceCodeDir": "_frontend",
4+
"watchAdditionalPaths": ["index.html", "_includes/**/*", "_layouts/**/*"]
5+
},
6+
"development": {
7+
"autoBuild": true,
8+
"publicOutputDir": "vite-dev",
9+
"port": 3036
10+
},
11+
"test": {
12+
"autoBuild": true,
13+
"publicOutputDir": "vite-test"
14+
}
15+
}

exe/dev

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
if which overmind >/dev/null; then
6+
overmind start -f Procfile.dev
7+
else
8+
echo "Install overmind or modify exe/dev to use a different Procfile launcher."
9+
echo "https://github.com/DarthSim/overmind"
10+
fi

0 commit comments

Comments
 (0)