Skip to content

Commit 93da16b

Browse files
Update CLI to use V2 dependencies
- Update shard.yml version to 2.0.0 - Change generated apps to use crimson-knight/amber (V2) - Add Grant ORM, Asset Pipeline, Gemma dependencies - Update .amber.yml to use model: grant instead of granite - Include all database adapters (pg, mysql, sqlite3) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 3800441 commit 93da16b

File tree

3 files changed

+48
-37
lines changed

3 files changed

+48
-37
lines changed

shard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: amber_cli
2-
version: 0.1.0
2+
version: 2.0.0
33

44
authors:
55
- crimson-knight <[email protected]>

src/amber_cli/commands/new.cr

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,18 +149,45 @@ module AmberCLI::Commands
149149
authors:
150150
- Your Name <[email protected]>
151151
152-
crystal: ">= 1.0.0, < 2.0"
152+
crystal: ">= 1.10.0"
153153
154-
license: MIT
154+
license: UNLICENSED
155155
156156
targets:
157157
#{name}:
158158
main: src/#{name}.cr
159159
160160
dependencies:
161+
# Amber Framework V2
161162
amber:
162-
github: amberframework/amber
163-
version: ~> 1.0
163+
github: crimson-knight/amber
164+
branch: master
165+
166+
# Grant ORM (ActiveRecord-style, replaces Granite in V2)
167+
grant:
168+
github: crimson-knight/grant
169+
branch: main
170+
171+
# Asset Pipeline (native ESM, no Webpack/npm required)
172+
asset_pipeline:
173+
github: amberframework/asset_pipeline
174+
175+
# File uploads (optional)
176+
gemma:
177+
github: amberframework/gemma
178+
179+
# Database adapters (all required by Grant at compile time)
180+
pg:
181+
github: will/crystal-pg
182+
mysql:
183+
github: crystal-lang/crystal-mysql
184+
sqlite3:
185+
github: crystal-lang/crystal-sqlite3
186+
187+
development_dependencies:
188+
ameba:
189+
github: crystal-ameba/ameba
190+
version: ~> 1.4.3
164191
SHARD
165192

166193
File.write(File.join(path, "shard.yml"), shard_content)
@@ -173,7 +200,7 @@ module AmberCLI::Commands
173200
174201
database: #{database}
175202
language: crystal
176-
model: granite
203+
model: grant
177204
recipe_source: amberframework/recipes
178205
template: #{template}
179206
AMBER

src/amber_cli/templates/app/shard.yml.ecr

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,58 +4,42 @@ version: 0.1.0
44
authors:
55
- {{author_name | "Your Name <email@example.com>"}}
66

7-
crystal: 1.0.0
7+
crystal: ">= 1.10.0"
88

99
license: UNLICENSED
1010

1111
targets:
1212
{{snake_case}}:
1313
main: src/{{snake_case}}.cr
1414

15-
amber:
16-
main: lib/amber/src/amber/cli.cr
17-
1815
dependencies:
16+
# Amber Framework V2
1917
amber:
20-
github: amberframework/amber
21-
version: ~> {{amber_framework_version}}
18+
github: crimson-knight/amber
19+
branch: master
2220

23-
granite:
24-
github: amberframework/granite
25-
version: ~> 0.24.0
21+
# Grant ORM (ActiveRecord-style, replaces Granite in V2)
22+
grant:
23+
github: crimson-knight/grant
24+
branch: main
2625

27-
quartz_mailer:
28-
github: amberframework/quartz-mailer
29-
version: ~> 0.8.0
26+
# Asset Pipeline (native ESM, no Webpack/npm required)
27+
asset_pipeline:
28+
github: amberframework/asset_pipeline
3029

31-
jasper_helpers:
32-
github: amberframework/jasper-helpers
33-
version: ~> 1.2.2
30+
# File uploads (optional)
31+
gemma:
32+
github: amberframework/gemma
3433

35-
<% case @database when "pg" -%>
34+
# Database adapters (all required by Grant at compile time)
3635
pg:
3736
github: will/crystal-pg
38-
version: ~> 0.23.2
39-
<% when "mysql" -%>
4037
mysql:
4138
github: crystal-lang/crystal-mysql
42-
version: ~> 0.13.0
43-
<% when "sqlite" -%>
4439
sqlite3:
4540
github: crystal-lang/crystal-sqlite3
46-
version: ~> 0.18.0
47-
<% else -%>
48-
<% end -%>
49-
50-
citrine-i18n:
51-
github: dare892/citrine-i18n
52-
version: ~> 1.0.0
5341

5442
development_dependencies:
5543
ameba:
5644
github: crystal-ameba/ameba
5745
version: ~> 1.4.3
58-
59-
spec-kemal:
60-
github: kemalcr/spec-kemal
61-
version: ~> 1.0.0

0 commit comments

Comments
 (0)