Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: components-first-release #7

Merged
merged 37 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
af8e810
feat: building .jar
Felipe-gsilva Sep 9, 2024
7781d6f
doc: enhance installation process
Felipe-gsilva Sep 9, 2024
657cd4b
feat: creating node library (unfinished)
Felipe-gsilva Sep 11, 2024
15826a9
fix: node-lib building config
Felipe-gsilva Sep 12, 2024
84ff0fa
doc: code rabbit snippets
Felipe-gsilva Sep 12, 2024
aefd082
fix: glob, rimraf and cliui deps
Felipe-gsilva Sep 12, 2024
207a668
fix: adds prop test unit (back)
Felipe-gsilva Sep 12, 2024
73ab5c5
feat: mockingbird as npm-module
Felipe-gsilva Sep 12, 2024
5c550a6
fix: comma on package.json
Felipe-gsilva Sep 12, 2024
9b58fd2
feat: adds webpack config
Felipe-gsilva Sep 17, 2024
cccbe1a
chore: webpack and npm module config
Felipe-gsilva Sep 18, 2024
7cd6fed
feat: build jar back and gh releases
Felipe-gsilva Sep 18, 2024
f8100cc
fix: minor issues
Felipe-gsilva Sep 18, 2024
33477ad
fix: testing compiling options
Felipe-gsilva Sep 20, 2024
8edc81c
test: exporting fn button
Felipe-gsilva Sep 23, 2024
ee3a393
feat: diff prod and dev on webpack bundle
J0sueTM Sep 23, 2024
e48e40a
Update webpack.config.js
avelino Sep 23, 2024
99e1d8c
feat: submit button
Felipe-gsilva Sep 24, 2024
8baba22
feat: loading prop and fixes on example page
Felipe-gsilva Sep 24, 2024
cbd05c4
doc: updates README.md for clojar and new usage
Felipe-gsilva Sep 25, 2024
eb13794
docs: improves text cohesion
Felipe-gsilva Sep 25, 2024
c72bf5a
feat: enhance on navbar
Felipe-gsilva Sep 25, 2024
f5ff6b6
feat: better compiling on css and component enhancement
Felipe-gsilva Sep 25, 2024
f541320
feat: copy the css file from .jar (on build hook)
Felipe-gsilva Sep 27, 2024
c6d97bf
fix: css build hook
Felipe-gsilva Sep 28, 2024
dfc1798
fix: unit test for props
Felipe-gsilva Sep 28, 2024
935f48b
feat: copy target.css on any project to a specified path
Felipe-gsilva Sep 30, 2024
7dc6e58
fix: formatting
Felipe-gsilva Sep 30, 2024
2f3e319
fix: gray-50 color error
Felipe-gsilva Oct 1, 2024
ca98734
fix: button, input and props fix
Felipe-gsilva Oct 1, 2024
0c84712
fix: props test
Felipe-gsilva Oct 1, 2024
1987956
fix: component style enhance
Felipe-gsilva Oct 2, 2024
efd5257
fix: ci workflow
Felipe-gsilva Oct 3, 2024
46df98a
fix: npm install
Felipe-gsilva Oct 3, 2024
4dc125b
docs: improve reading flow
Felipe-gsilva Oct 4, 2024
bf83370
doc: adds more context on README.md
Felipe-gsilva Oct 4, 2024
ff9a234
feat: export tag for shadow npm compiling
Felipe-gsilva Oct 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react"]
}
2 changes: 1 addition & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
java-version: '11'

- name: Install clojure cli
uses: DeLaGuardo/setup-clojure@master
uses: DeLaGuardo/setup-clojure@12.5
with:
cli: 1.11.1.1113

Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Npm-Release

on:
push:
tags:
- 'v*'
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
steps:
Felipe-gsilva marked this conversation as resolved.
Show resolved Hide resolved
- uses: actions/checkout@v4
- uses: DeLaGuardo/[email protected]
- uses: actions/setup-node@v3
with:
node-version: "20"
Felipe-gsilva marked this conversation as resolved.
Show resolved Hide resolved
- name: npm release
run: |
npm ci && \
npm run lib
Felipe-gsilva marked this conversation as resolved.
Show resolved Hide resolved
- uses: JS-DevTools/[email protected]
with:
token: ${{ secrets.NPM_TOKEN }}
Felipe-gsilva marked this conversation as resolved.
Show resolved Hide resolved
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release

on:
push:
tags:
- 'v*'
workflow_dispatch:
Comment on lines +1 to +7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

LGTM! The workflow name and triggers are well-defined.

The workflow name "Release" is clear and descriptive. The triggers are appropriate for a release workflow, allowing for both automated releases on version tags and manual triggering.

Consider adding a brief description comment at the beginning of the file to provide more context:

# Workflow for releasing the project to Clojars
# Triggered on pushing tags starting with 'v' or manually
name: Release
🧰 Tools
🪛 yamllint

[warning] 3-3: truthy value should be one of [false, true]

(truthy)


[error] 5-5: wrong indentation: expected 8 but found 6

(indentation)


[error] 6-6: wrong indentation: expected 10 but found 8

(indentation)


jobs:
clojars:
runs-on: ubuntu-latest
environment: env
defaults:
run:
shell: bash
Comment on lines +9 to +15
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Job setup looks good, but there are some indentation issues.

The job setup is appropriate for a Clojure release workflow. Using a specific environment is good for managing secrets.

There are some indentation inconsistencies. Please adjust the indentation as follows:

jobs:
  clojars:
    runs-on: ubuntu-latest
    environment: env
    defaults:
      run:
        shell: bash

This will resolve the yamllint warnings and improve readability.

steps:
- uses: actions/checkout@v4
- uses: "DeLaGuardo/[email protected]"
with:
cli: "1.11.1.1139"
- uses: actions/setup-node@v3
with:
node-version: "20"
Felipe-gsilva marked this conversation as resolved.
Show resolved Hide resolved
- name: Clojars release
env:
CLOJARS_USERNAME: ${{ secrets.CLOJARS_USERNAME }}
CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASSWORD }}
run: |
npm run release && \
clojure -T:dev:build clean && \
clojure -T:dev:build jar && \
clojure -X:deploy-clojars
Felipe-gsilva marked this conversation as resolved.
Show resolved Hide resolved

Felipe-gsilva marked this conversation as resolved.
Show resolved Hide resolved
Felipe-gsilva marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ pom.xml.asc
/.shadow-cljs/
/resources/public/index.html
/resources/public/assets
/resources/public/css/site.css
/resources/public/css/
/resources/test/

/dist/
63 changes: 52 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Design System using [tailwind](https://tailwindcss.com/) and [helix](https://git

A simple way to develop a user interface with a consistent user experience, without the need to clutter `cljs` code with **CSS**.

> if your desire is to use mockingbird without ClojureScript (how you dare!) you can of course use our npm package into your JS application. Read more [here](#Installation).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Improve clarity and fix the link in the added note.

The note about using mockingbird without ClojureScript is informative. However, consider the following improvements:

  1. Add commas for better readability.
  2. Replace "into" with "in" for better grammar.
  3. Fix the link fragment to match the correct section heading.

Here's a suggested revision:

-> if your desire is to use mockingbird without ClojureScript (how you dare!) you can of course use our npm package into your JS application. Read more [here](#Installation).
+> If your desire is to use mockingbird without ClojureScript (how you dare!), you can, of course, use our npm package in your JS application. Read more [here](#installation).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
> if your desire is to use mockingbird without ClojureScript (how you dare!) you can of course use our npm package into your JS application. Read more [here](#Installation).
> If your desire is to use mockingbird without ClojureScript (how you dare!), you can, of course, use our npm package in your JS application. Read more [here](#installation).
🧰 Tools
LanguageTool

[typographical] ~7-~7: Consider adding two commas here.
Context: ...ut ClojureScript (how you dare!) you can of course use our npm package into your JS applic...

(OF_COURSE_COMMA)

Markdownlint

7-7: Expected: #installation; Actual: #Installation
Link fragments should be valid

(MD051, link-fragments)


## name reference?

> "mockingbird" is for everyone!
Expand All @@ -16,38 +18,77 @@ It's impossible to talk about *"mockingbird"* without remembering the song [Mock

# Overview

Mockingbird offers a set of reusable components and utilities that increases speed and beauty on your UI development. By integrating Tailwind, Helix and ReFx, Mockingbird combines functional programming, a powerful component model together creating a fast and lightweight design system. This allows your team (or simply yourself) to focus on building robust, reactive interfaces without getting bogged down in styling and local state management concerns.
Mockingbird offers a set of reusable components and utilities that increases speed and beauty on your UI development. By integrating Tailwind, Helix and ReFx, Mockingbird combines functional programming and a powerful component model in order to create a fast and lightweight design system. This allows your team to focus on building robust, reactive interfaces without getting bogged down in styling and local state management concerns.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Approve the Overview section with minor suggestions for improvement.

The Overview section provides valuable information about Mockingbird's features and benefits. Consider these minor improvements for better readability and grammar:

-Mockingbird offers a set of reusable components and utilities that increases speed and beauty on your UI development. By integrating Tailwind, Helix and ReFx, Mockingbird combines functional programming and a powerful component model in order to create a fast and lightweight design system. This allows your team to focus on building robust, reactive interfaces without getting bogged down in styling and local state management concerns.
+Mockingbird offers a set of reusable components and utilities that increase speed and beauty in your UI development. By integrating Tailwind, Helix, and ReFx, Mockingbird combines functional programming and a powerful component model to create a fast and lightweight design system. This allows your team to focus on building robust, reactive interfaces without getting bogged down in styling and local state management concerns.

These changes improve grammar and remove unnecessary wordiness.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Mockingbird offers a set of reusable components and utilities that increases speed and beauty on your UI development. By integrating Tailwind, Helix and ReFx, Mockingbird combines functional programming and a powerful component model in order to create a fast and lightweight design system. This allows your team to focus on building robust, reactive interfaces without getting bogged down in styling and local state management concerns.
Mockingbird offers a set of reusable components and utilities that increase speed and beauty in your UI development. By integrating Tailwind, Helix, and ReFx, Mockingbird combines functional programming and a powerful component model to create a fast and lightweight design system. This allows your team to focus on building robust, reactive interfaces without getting bogged down in styling and local state management concerns.
🧰 Tools
🪛 LanguageTool

[style] ~21-~21: Consider a shorter alternative to avoid wordiness.
Context: ...gramming and a powerful component model in order to create a fast and lightweight design sy...

(IN_ORDER_TO_PREMIUM)


# Getting Started

Prerequisites

Before you begin, ensure you have the following installed:
- Clojure: Follow the [Clojure Installation guide](https://clojure.org/guides/install_clojure) to set up your environment.
- Node.js: Required for managing dependencies and building your project. Download it from [here](https://www.npmjs.com/package/downloads).
- [Node](https://nodejs.org/en/download/prebuilt-installer/current).
- [npm](https://www.npmjs.com/package/downloads).
Comment on lines +29 to +30
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Approve the added links with a minor formatting suggestion.

The addition of direct links to the Node.js and npm installation pages is helpful for users. To improve readability, consider adding a blank line before the list:

Prerequisites

Before you begin, ensure you have the following installed:
- Clojure: Follow the [Clojure Installation guide](https://clojure.org/guides/install_clojure) to set up your environment.
+
- [Node](https://nodejs.org/en/download/prebuilt-installer/current).
- [npm](https://www.npmjs.com/package/downloads).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- [Node](https://nodejs.org/en/download/prebuilt-installer/current).
- [npm](https://www.npmjs.com/package/downloads).
Prerequisites
Before you begin, ensure you have the following installed:
- Clojure: Follow the [Clojure Installation guide](https://clojure.org/guides/install_clojure) to set up your environment.
- [Node](https://nodejs.org/en/download/prebuilt-installer/current).
- [npm](https://www.npmjs.com/package/downloads).


# Installation

- Set up your project: Start by creating a new ClojureScript project, or use an existing one.
We distribute our software via clojars (and intend to do so also by npm):

- Install node dependencies with a simple command:
deps.edn:
``` clj
moclojer/mockingbird {:mvn/version "0.0.1"}
```

You will also need to start a project with shadow-cljs and install the npm deps.

npm:

``` sh
npm i

$ npx create-cljs-project your-project
$ npm install react autoprefixer babel-loader css-loader cssnano karma karma-chrome-launcher karma-cljs-test msw npm-run-all postcss postcss-cli postcss-loade postcss-preset-env shadow-cljs tailwindcss webpack webpack-cli rimraf glob @isaacs/cliui --save-dev

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Approve the updated installation instructions with suggestions for improvement.

The updated installation instructions for both Clojars and npm are helpful. However, consider the following improvements:

  1. Surround code blocks with blank lines for better readability.
  2. Consider simplifying the npm installation process:
    • Create a package.json with pre-configured dependencies.
    • Provide a shorter command for users to run.

Here's a suggested improvement for the formatting:

 We distribute our software via clojars (and intend to do so also by npm):

 deps.edn:
+
 ``` clj
   moclojer/mockingbird {:mvn/version "0.0.1"}

You will also need to start a project with shadow-cljs and install the npm deps.

npm:
+

$ npx create-cljs-project your-project
$ npm install react autoprefixer babel-loader css-loader cssnano karma karma-chrome-launcher karma-cljs-test msw npm-run-all postcss postcss-cli postcss-loade postcss-preset-env shadow-cljs tailwindcss webpack webpack-cli rimraf glob @isaacs/cliui --save-dev

Consider creating a `package.json` file with these dependencies pre-configured, allowing users to simply run `npm install` instead of the long command.





<!-- suggestion_start -->
<details>
<summary>:memo: Committable suggestion</summary>

> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
We distribute our software via clojars (and intend to do so also by npm):

deps.edn:

``` clj
  moclojer/mockingbird {:mvn/version "0.0.1"}

You will also need to start a project with shadow-cljs and install the npm deps.

npm:

$ npx create-cljs-project your-project
$ npm install react autoprefixer babel-loader css-loader cssnano karma karma-chrome-launcher karma-cljs-test msw npm-run-all postcss postcss-cli postcss-loade postcss-preset-env shadow-cljs tailwindcss webpack webpack-cli rimraf glob @isaacs/cliui --save-dev

</details>
<!-- suggestion_end -->

<details>
<summary>:toolbox: Tools</summary>

<details>
<summary>Markdownlint</summary><blockquote>

47-47: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)

---

48-48: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)

---

37-37: null
Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit -->

```

- configure your shadow cljs:
# Usage

> for better understanding, follow the offcial [guide](https://github.com/thheller/shadow-cljs)
add a import on a specific component or layout component you want and load it in your screen

``` clj
(:require
[mockingbird.components.button :refer [button]]
[helix.core :refer [$]])
;; use it then
($ button)

# Usage
```

you can pass arguments into our components simply as this:

;; TODO

# Testing
``` clj
($ button {:class "special-class-i-want-to-add"
:theme :mockingbird
:size :sm
:label "My-special-label"})

And you are now done, you can clone and build this repo in order to see some examples of good usage of our dear Mockingbird. You can read more [here](docs/test.md).
```
As you can see, our components have specific built-in styles for you. You can see a handful tutorial on the parameters for styling the components [here](docs/params.md)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Approve the expanded Usage section with suggestions for improvement.

The expanded Usage section with examples is very helpful for users. However, consider the following improvements:

  1. Fix the grammar: use "an import" instead of "a import".
  2. Improve formatting:
    • Surround code blocks with blank lines.
    • Remove extra blank lines within code blocks.
  3. Consider adding a brief explanation of the parameters in the second example.

Here's a suggested improvement:

 # Usage 

-add a import on a specific component or layout component you want and load it in your screen
+Add an import for a specific component or layout component you want and load it in your screen:
+
 ``` clj
 (:require 
   [mockingbird.components.button :refer [button]]
   [helix.core :refer [$]])
 ;; use it then
   ($ button)
-

you can pass arguments into our components simply as this:

  ($ button {:class "special-class-i-want-to-add"
             :theme :mockingbird
             :size :sm 
             :label "My-special-label"})
-

As you can see, our components have specific built-in styles for you. You can see a handful tutorial on the parameters for styling the components here


Consider adding a brief explanation of the parameters in the second example, such as what `:theme`, `:size`, and `:label` do.





<!-- suggestion_start -->
<details>
<summary>:memo: Committable suggestion</summary>

> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
# Usage 

Add an import for a specific component or layout component you want and load it in your screen:

``` clj
(:require 
  [mockingbird.components.button :refer [button]]
  [helix.core :refer [$]])
;; use it then
  ($ button)

you can pass arguments into our components simply as this:

  ($ button {:class "special-class-i-want-to-add"
             :theme :mockingbird
             :size :sm 
             :label "My-special-label"})

As you can see, our components have specific built-in styles for you. You can see a handful tutorial on the parameters for styling the components here


</details>
<!-- suggestion_end -->

<details>
<summary>:toolbox: Tools</summary>

<details>
<summary>LanguageTool</summary><blockquote>

[misspelling] ~54-~54: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...cs/cliui --save-dev  ```  # Usage   add a import on a specific component or layou...

(EN_A_VS_AN)

</blockquote></details>
<details>
<summary>Markdownlint</summary><blockquote>

52-52: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)

---

67-67: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

---

52-52: null
Multiple top-level headings in the same document

(MD025, single-title, single-h1)

---

74-74: null
Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit -->


# Testing Locally

You can clone and build this repo, to see some examples of good usage of our dear Mockingbird. You can read more [here](docs/test.md).

- Set up your project: Start by creating a new ClojureScript project, or use an existing one.

- Install node dependencies with a simple command:

``` sh
npm ci
```

- configure your shadow cljs

> for better understanding, follow the offcial [guide](https://github.com/thheller/shadow-cljs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Approve the updated Testing Locally section with suggestions for improvement.

The renamed section and added instructions for local testing are very helpful. However, consider the following improvements:

  1. Fix formatting issues:
    • Remove trailing spaces.
    • Surround the code block with blank lines.
  2. Consider adding a brief explanation of what npm ci does and how it differs from npm install.

Here's a suggested improvement:

 # Testing Locally 

 You can clone and build this repo, to see some examples of good usage of our dear Mockingbird. You can read more [here](docs/test.md).

 - Set up your project: Start by creating a new ClojureScript project, or use an existing one.

-
- Install node dependencies with a simple command: 
+- Install node dependencies with a simple command:
+
 ``` sh
 npm ci

+npm ci is used for clean installs, which is ideal for testing and continuous integration environments.

  • configure your shadow cljs

for better understanding, follow the offcial guide






<!-- suggestion_start -->
<details>
<summary>:memo: Committable suggestion</summary>

> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
# Testing Locally 

You can clone and build this repo, to see some examples of good usage of our dear Mockingbird. You can read more [here](docs/test.md).

- Set up your project: Start by creating a new ClojureScript project, or use an existing one.

- Install node dependencies with a simple command:

``` sh
npm ci

npm ci is used for clean installs, which is ideal for testing and continuous integration environments.

  • configure your shadow cljs

for better understanding, follow the offcial guide


</details>
<!-- suggestion_end -->

<details>
<summary>:toolbox: Tools</summary>

<details>
<summary>Markdownlint</summary><blockquote>

77-77: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)

---

83-83: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)

---

77-77: null
Multiple top-level headings in the same document

(MD025, single-title, single-h1)

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit -->


# Contributing

Expand Down
31 changes: 31 additions & 0 deletions build.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
(ns build
(:require
[clojure.tools.build.api :as b]))

(def lib 'com.github.moclojer/mockingbird)
(def version "0.0.1")
Felipe-gsilva marked this conversation as resolved.
Show resolved Hide resolved
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def jar-file (format "target/%s-%s.jar" (name lib) version))
Comment on lines +5 to +9
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Consider Centralizing the Version Number

The version number "0.0.1" is hardcoded in multiple files (build.clj, package.json, and package-lock.json). To enhance maintainability and ensure consistency across the project, consider implementing a centralized version management system for future releases.

🔗 Analysis chain

LGTM: Project metadata definitions are correct

The project metadata definitions look good for a first release. However, for future releases, consider implementing a more flexible version management system.

To ensure consistency across the project, let's verify if the version is used elsewhere:


To accurately verify if the version number "0.0.1" is used elsewhere in the codebase, please run the following script:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for other occurrences of the version number
rg --type-add 'json:*.json' --type-add 'edn:*.edn' --type json,edn,clojure '"0.0.1"'

Length of output: 127


Script:

# 
#!/bin/bash
# Description: Check for other occurrences of the version number
rg -tjson -tedn -tclojure '"0.0.1"'

Length of output: 470



(defn clean [_]
(b/delete {:path "target"}))

(defn jar [_]
(b/write-pom {:class-dir class-dir
:lib lib
:version version
:basis basis
:src-dirs ["src"]})
(b/copy-dir {:src-dirs ["src" "resources"]
:target-dir class-dir})
(b/jar {:class-dir class-dir
:jar-file jar-file}))
Felipe-gsilva marked this conversation as resolved.
Show resolved Hide resolved

(defn install [_]
(b/install {:basis basis
:lib lib
:version version
:jar-file jar-file
:class-dir class-dir}))
14 changes: 11 additions & 3 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
{:paths ["src" "resources"]
:deps {org.clojure/clojure {:mvn/version "1.11.1"}
org.clojure/clojurescript {:mvn/version "1.11.60"}
org.clojure/tools.deps {:mvn/version "0.21.1449"}
com.google.javascript/closure-compiler-unshaded {:mvn/version "v20220803"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using a more recent version of the Closure Compiler.

Adding the Closure Compiler dependency is a great choice for optimizing the JavaScript output. However, the specified version v20220803 is quite dated. Consider using a more recent version to ensure you have access to the latest optimizations and bug fixes.

com.fbeyer/refx {:mvn/version "0.0.49"}
lilactown/helix {:mvn/version "0.1.9"}
lilactown/helix {:mvn/version "0.1.11"}
funcool/promesa {:mvn/version "9.0.494"}
metosin/reitit-schema {:mvn/version "0.5.18"}
metosin/reitit-frontend {:mvn/version "0.5.18"}
lambdaisland/fetch {:mvn/version "1.1.60"}
com.teknql/shadow-cljs-tailwind-jit {:mvn/version "1.0.0"}}

:aliases
{:dev {:extra-paths ["test"]
:extra-deps {cider/cider-nrepl {:mvn/version "0.28.6"}
thheller/shadow-cljs {:mvn/version "2.20.10"}}}
:clojure-lsp {:replace-deps {com.github.clojure-lsp/clojure-lsp-standalone {:mvn/version "2024.08.05_18.16.00-1"}}
:main-opts ["-m" "clojure-lsp.main"]}
:build {:deps {io.github.clojure/tools.build {:mvn/version "0.9.4"}}
:ns-default build}}}
:ns-default build}
:deploy-clojars {:extra-deps {slipset/deps-deploy {:mvn/version "RELEASE"}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specify an explicit version instead of "RELEASE" for 'slipset/deps-deploy'

Using {:mvn/version "RELEASE"} can lead to non-reproducible builds because it may resolve to different versions over time. Please specify an explicit version number to ensure build consistency and reliability.

Apply this diff to set a specific version (replace x.y.z with the desired version):

    :deploy-clojars {:extra-deps {slipset/deps-deploy {:mvn/version "RELEASE"}}
+                                {:mvn/version "x.y.z"}}
                     :exec-fn deps-deploy.deps-deploy/deploy
                     :exec-args {:installer :remote
                                 :sign-releases? false
                                 :pom-file "target/classes/META-INF/maven/com.github.moclojer/mockingbird/pom.xml"
                                 :artifact "target/mockingbird-0.0.1.jar"}}}}

Committable suggestion was skipped due to low confidence.

:exec-fn deps-deploy.deps-deploy/deploy
:exec-args {:installer :remote
:sign-releases? false
:pom-file "target/classes/META-INF/maven/com.github.moclojer/mockingbird/pom.xml"
:artifact "target/mockingbird-0.0.1.jar"}}}}
14 changes: 12 additions & 2 deletions docs/params.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Props parameters

In order to get specific parameters while not having to pass tailwind classes (as w-64 for width or h-64 for height), we added a simple parameter list for your team. The idea is to pass a keyword, such as `:sm` or `:full`,making it easier to just plug and play our componentes.
In order to get specific parameters while not having to pass tailwind classes (as w-64 for width or h-64 for height), we added keyword-based parameters for easy configuration. The idea is to pass a keyword, such as `:sm` or `:full`, making it easier to just plug and play our componentes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Remove trailing space

There is a trailing space at the end of line 3. While this doesn't affect the rendered output, it's good practice to remove trailing spaces for cleaner markdown.

Please remove the trailing space at the end of line 3.

🧰 Tools
Markdownlint

3-3: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


## Examples
- component roundness:
Expand All @@ -16,4 +16,14 @@ you can pass on your component the key roundness and a value into it, such as :f
:roundness :full}))

```
;; TODO list of all these new types

## Parameter Overview

The available options (until now) are:

- **Size**: `:none`, `:sm`, `:md`, `:lg`, `:xl`, `:full`
- **Roundness**: `:none`, `:sm`, `:md`, `:full`
- **Shadow**: `:none`, `:sm`, `:md`, `:lg`
- **Padding**: `:none`, `:sm`, `:md`, `:lg`
- **Margin**: `:none`, `:sm`, `:md`, `:lg`

Loading