Skip to content

Commit 6ca747e

Browse files
feat(cli/templates) add clojurescript (#185)
* feat(cli/templates): add clojurescript * fix(cli/fragments/clojurescript): code review improvements - add a post init note about installing `java` and `clojure` - add an example using the `greet` command - move some resources to the `clojurescript` template - change ports for `shadow-cljs` and `tauri` - update ci pipeline - fix code formatting * fix(cli/fragments/clojurescript): remove test stuff * refactor(cli/templates): move `base/src/style.css` to the `_assets_` directory We can't import styles into cljs. * fix(cli/fragments/clojurescript): code review improvements - added the recommended `calva` plugin for `vscode` - updated deps - removed exclusions for the `reagent` dependency * refactor(cli/fragments/clojurescript): switch from `deps.edn` to `shadow-cljs` directly * fix(cli/fragments/clojurescript): fix issue with the `pnpm` These settings allow us to use `pnpm` as a package manager. Without these settings, we will receive several errors from the compiler: `object-assign`, `scheduler`, `scheduler/tracing` is not available. * Update .changes/clojurescript.md
1 parent 0a498d0 commit 6ca747e

33 files changed

Lines changed: 239 additions & 15 deletions

File tree

.changes/clojurescript.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"create-tauri-app": minor
3+
"create-tauri-app-js": minor
4+
---
5+
6+
Add `clojurescript` template.

.scripts/generate-templates-matrix.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const nodeJsTemplates = [
1616
"next-ts",
1717
"preact",
1818
"preact-ts",
19+
"clojurescript",
1920
];
2021

2122
const matrixConfig = [

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ Currently supported template presets include:
8787
- `preact`
8888
- `preact-ts`
8989
- `angular`
90+
- `clojurescript`
9091

9192
You can use `.` for the project name to scaffold in the current directory.
9293

packages/cli/fragments/fragment-angular/_cta_manifest_

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ devPath = http://localhost:1420
88
distDir = ../dist
99

1010
[files]
11-
tauri.svg = src/assets/tauri.svg
11+
tauri.svg = src/assets/tauri.svg
12+
style.css = src/style.css
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"tauri-apps.tauri-vscode",
4+
"rust-lang.rust-analyzer",
5+
"betterthantomorrow.calva"
6+
]
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Tauri + ClojureScript
2+
3+
This template should help get you started developing with Tauri and ClojureScript + shadow-cljs.
4+
5+
## Recommended IDE Setup
6+
7+
- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) + [calva](https://marketplace.visualstudio.com/items?itemName=betterthantomorrow.calva)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# You can remove these settings if you use `yarn` or `npm`.
2+
# These settings allow us to use `pnpm` as a package manager.
3+
# Without these settings, we will receive several errors from the compiler:
4+
# `object-assign`, `scheduler`, `scheduler/tracing` is not available.
5+
6+
public-hoist-pattern[]='object-assign'
7+
public-hoist-pattern[]='scheduler'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
2+
# SPDX-License-Identifier: Apache-2.0
3+
# SPDX-License-Identifier: MIT
4+
5+
beforeDevCommand = {{pkg_manager_run_command}} dev
6+
beforeBuildCommand = {{pkg_manager_run_command}} build
7+
devPath = http://localhost:1420
8+
distDir = ../public
9+
10+
[files]
11+
tauri.svg = public/tauri.svg
12+
style.css = public/style.css
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
.cpcache
21+
.clj-kondo/.cache
22+
.shadow-cljs
23+
target

0 commit comments

Comments
 (0)