rails-frontend-cli 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +132 -0
- data/LICENSE +9 -0
- data/README.md +122 -0
- data/USER_MANUAL.md +502 -0
- data/exe/rails-frontend +7 -0
- data/lib/rails_frontend_cli/version.rb +5 -0
- data/lib/rails_frontend_cli.rb +1357 -0
- metadata +68 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 1ec869e69d114bf593c1c7006d81d506c43258e1704af073100165465989c6c9
|
|
4
|
+
data.tar.gz: 2134c602cc003fc25339308018fb882bddbc8c6684a539c18dc11860ad19d5dc
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 2f66351d98cbefb78cf91684bd019b726366a5836b102870de1c20542ce21076856270579f58c16b90fe446cc541706d3c8f5b7cc6b83608cc3d061084dc0b20
|
|
7
|
+
data.tar.gz: 4ec8b1c140f6a5d74855a0fe3d2a934c29e1fe9a0fc265b57a3860a5863552777f3a39dc0671ab211d02dbbc0c6ec7abce1476fbb2e95332597edb26a827d639
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
[Türkçe](CHANGELOG_tr.md) | **English**
|
|
4
|
+
|
|
5
|
+
## v1.0.4
|
|
6
|
+
|
|
7
|
+
### New Features
|
|
8
|
+
- **Static Site Generation:**
|
|
9
|
+
- Added `rails-frontend build` command (short: `b`)
|
|
10
|
+
- Asset organization (img, js, css, fonts folders)
|
|
11
|
+
- Automatic path corrections (HTML and CSS)
|
|
12
|
+
- HTML cleanup (csrf, index.html links)
|
|
13
|
+
- Ready output for static hosting
|
|
14
|
+
|
|
15
|
+
### Improvements
|
|
16
|
+
- Server check (detects server and port before build process)
|
|
17
|
+
- Asset folder structure: `build/assets/{img,js,css,fonts}/`
|
|
18
|
+
- Path corrections in HTML files:
|
|
19
|
+
- `assets/application.js` → `assets/js/application.js`
|
|
20
|
+
- `assets/controllers/index.js` → `assets/js/index.js`
|
|
21
|
+
- `assets/application.css` → `assets/css/application.css`
|
|
22
|
+
- Absolute path usage in CSS files:
|
|
23
|
+
- Font: `url("font.woff2")` → `url("/assets/fonts/font.woff2")`
|
|
24
|
+
- Image: `url("image.jpg")` → `url("/assets/img/image.jpg")`
|
|
25
|
+
- CSRF cleanup
|
|
26
|
+
- index.html link corrections
|
|
27
|
+
|
|
28
|
+
### Documentation
|
|
29
|
+
- README.md updated
|
|
30
|
+
- Static site generation section added to USER_MANUAL.md
|
|
31
|
+
- Help message updated
|
|
32
|
+
- Command reference tables updated
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## v1.0.3
|
|
37
|
+
|
|
38
|
+
### New Features
|
|
39
|
+
- **External JavaScript Management:**
|
|
40
|
+
- Added `rails-frontend add-pin PACKAGE_NAME` command (short: `pin`)
|
|
41
|
+
- Added `rails-frontend remove-pin PACKAGE_NAME` command (short: `unpin`)
|
|
42
|
+
- Error check when package not found
|
|
43
|
+
- Usage check before removing pin (in JavaScript and HTML files)
|
|
44
|
+
- Exact match check (partial matches ignored)
|
|
45
|
+
|
|
46
|
+
### Improvements
|
|
47
|
+
- Import check in JavaScript files (`app/javascript/**/*.js`)
|
|
48
|
+
- Usage check in HTML files (`app/views/**/*.html.erb`)
|
|
49
|
+
- Pin existence check (`config/importmap.rb`)
|
|
50
|
+
- Import reminder to user
|
|
51
|
+
- Improved error messages
|
|
52
|
+
|
|
53
|
+
### Documentation
|
|
54
|
+
- README.md updated
|
|
55
|
+
- External JavaScript management section added to USER_MANUAL.md
|
|
56
|
+
- Command reference tables updated
|
|
57
|
+
- Rails Frontend Coding training material added
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## v1.0.2
|
|
62
|
+
|
|
63
|
+
### New Features
|
|
64
|
+
- **Layout Management:**
|
|
65
|
+
- Added `rails-frontend add-layout LAYOUT_NAME` command (short: `al`)
|
|
66
|
+
- Added `rails-frontend remove-layout LAYOUT_NAME` command (short: `rl`)
|
|
67
|
+
- Automatic view matching (if layout name matches view name)
|
|
68
|
+
- Ask user for view selection (if no match)
|
|
69
|
+
- Duplicate layout check for same view
|
|
70
|
+
- Automatic layout directive add/remove to controller
|
|
71
|
+
|
|
72
|
+
### Improvements
|
|
73
|
+
- Layout file creation (`app/views/layouts/`)
|
|
74
|
+
- Add `layout "layout_name", only: :view_name` directive to `home_controller.rb`
|
|
75
|
+
- Confirmation mechanism before layout removal
|
|
76
|
+
- Prevent conflicts with existing layout check
|
|
77
|
+
|
|
78
|
+
### Documentation
|
|
79
|
+
- README.md updated
|
|
80
|
+
- Layout management section added to USER_MANUAL.md
|
|
81
|
+
- Command reference tables updated
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## v1.0.1
|
|
86
|
+
|
|
87
|
+
### New Features
|
|
88
|
+
- **Stimulus Controller Management:**
|
|
89
|
+
- Added `rails-frontend add-stimulus CONTROLLER_NAME` command (short: `as`)
|
|
90
|
+
- Added `rails-frontend remove-stimulus CONTROLLER_NAME` command (short: `ds`)
|
|
91
|
+
- Usage check in view files before removing Stimulus controller
|
|
92
|
+
- Warning and confirmation mechanism for used controllers
|
|
93
|
+
|
|
94
|
+
### Improvements
|
|
95
|
+
- Documentation updated (README.md and USER_MANUAL.md)
|
|
96
|
+
- Command reference tables updated
|
|
97
|
+
- Stimulus controller examples added
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## v1.0.0 (Initial Release)
|
|
102
|
+
|
|
103
|
+
### Core Features
|
|
104
|
+
- **Project Creation:**
|
|
105
|
+
- `rails-frontend new PROJECT_NAME` command
|
|
106
|
+
- Frontend-focused project creation with `--clean` parameter
|
|
107
|
+
- Automatic Tailwind CSS configuration
|
|
108
|
+
- Shared components (header, navbar, footer)
|
|
109
|
+
|
|
110
|
+
- **Page Management:**
|
|
111
|
+
- `rails-frontend add-page PAGE_NAME` command
|
|
112
|
+
- `rails-frontend remove-page PAGE_NAME` command
|
|
113
|
+
- Automatic view, CSS and route creation
|
|
114
|
+
|
|
115
|
+
- **Development Tools:**
|
|
116
|
+
- `rails-frontend run` command (start server)
|
|
117
|
+
- Turkish character support (automatic normalize)
|
|
118
|
+
- Asset folders (images, fonts)
|
|
119
|
+
|
|
120
|
+
- **Cleanup Features (`--clean`):**
|
|
121
|
+
- Skip test files
|
|
122
|
+
- Remove unnecessary Rails features (mailers, jobs, channels, models)
|
|
123
|
+
|
|
124
|
+
### Documentation
|
|
125
|
+
- README.md
|
|
126
|
+
- Detailed USER_MANUAL.md
|
|
127
|
+
|
|
128
|
+
### Technical Details
|
|
129
|
+
- Rails 7+ compatibility
|
|
130
|
+
- Ruby 3.0+ support
|
|
131
|
+
- Tailwind CSS integration
|
|
132
|
+
- Stimulus framework support
|
data/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Levent Özbilgiç
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Rails Frontend CLI
|
|
2
|
+
|
|
3
|
+
**English** | [Türkçe](README_tr.md)
|
|
4
|
+
|
|
5
|
+
A CLI tool that makes frontend development with Rails incredibly easy, allowing you to enjoy Rails frontend coding without needing to know Ruby or Rails.
|
|
6
|
+
|
|
7
|
+
## Documentation
|
|
8
|
+
|
|
9
|
+
For detailed usage guide, see [USER_MANUAL.md](USER_MANUAL.md)
|
|
10
|
+
|
|
11
|
+
## Rails Frontend Coding Tutorial
|
|
12
|
+
|
|
13
|
+
📚 [Training material](https://gamma.app/docs/Rails-ile-Frontend-Kodlama-Egitimi-i6q19pjb2jpw9ny) (Turkish)
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
✅ Compatible with Rails 7+
|
|
18
|
+
✅ Automatic Tailwind CSS configuration
|
|
19
|
+
✅ Stimulus controller support
|
|
20
|
+
✅ Shared components (header, navbar, footer)
|
|
21
|
+
✅ Layout management support
|
|
22
|
+
✅ External JavaScript library management
|
|
23
|
+
✅ Automatic route configuration
|
|
24
|
+
✅ Automatic CSS file imports
|
|
25
|
+
✅ Asset folders (images, fonts)
|
|
26
|
+
✅ Multi-language documentation
|
|
27
|
+
|
|
28
|
+
## Quick Start
|
|
29
|
+
|
|
30
|
+
### Installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
gem install rails-frontend-cli
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Uninstallation
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
gem uninstall rails-frontend-cli
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Test Installation
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
rails-frontend --version
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Usage
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Create new project (clean frontend - recommended)
|
|
52
|
+
# Unnecessary files for frontend won't be created
|
|
53
|
+
rails-frontend new blog --clean
|
|
54
|
+
cd blog
|
|
55
|
+
rails-frontend run
|
|
56
|
+
|
|
57
|
+
# Add pages
|
|
58
|
+
rails-frontend add-page about
|
|
59
|
+
rails-frontend add-page contact
|
|
60
|
+
|
|
61
|
+
# Add Stimulus controllers
|
|
62
|
+
rails-frontend add-stimulus dropdown
|
|
63
|
+
rails-frontend add-stimulus modal
|
|
64
|
+
|
|
65
|
+
# Remove page
|
|
66
|
+
rails-frontend remove-page contact
|
|
67
|
+
|
|
68
|
+
# Remove Stimulus controller (checks usage)
|
|
69
|
+
rails-frontend remove-stimulus dropdown
|
|
70
|
+
|
|
71
|
+
# Add layout
|
|
72
|
+
rails-frontend add-layout contact
|
|
73
|
+
|
|
74
|
+
# Remove layout
|
|
75
|
+
rails-frontend remove-layout contact
|
|
76
|
+
|
|
77
|
+
# Add external JavaScript library
|
|
78
|
+
rails-frontend add-pin alpinejs
|
|
79
|
+
rails-frontend add-pin sweetalert2
|
|
80
|
+
|
|
81
|
+
# Remove external JavaScript library (checks usage)
|
|
82
|
+
rails-frontend remove-pin alpinejs
|
|
83
|
+
rails-frontend remove-pin sweetalert2
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**`--clean` Parameter:**
|
|
87
|
+
Removes unnecessary Rails features for frontend (tests, mailers, jobs, channels, models, etc.). Recommended for frontend-focused projects.
|
|
88
|
+
|
|
89
|
+
## Commands
|
|
90
|
+
|
|
91
|
+
| Command | Short | Description |
|
|
92
|
+
|---------|-------|-------------|
|
|
93
|
+
| `rails-frontend new PROJECT [--clean]` | `n` | Create new project |
|
|
94
|
+
| `rails-frontend add-page PAGE` | `ap` | Add page |
|
|
95
|
+
| `rails-frontend remove-page PAGE` | `rp` | Remove page |
|
|
96
|
+
| `rails-frontend add-stimulus CONTROLLER` | `as` | Add Stimulus controller |
|
|
97
|
+
| `rails-frontend remove-stimulus CONTROLLER` | `rs` | Remove Stimulus controller |
|
|
98
|
+
| `rails-frontend add-layout LAYOUT` | `al` | Add layout |
|
|
99
|
+
| `rails-frontend remove-layout LAYOUT` | `rl` | Remove layout |
|
|
100
|
+
| `rails-frontend add-pin PACKAGE` | `pin` | Add external JavaScript library |
|
|
101
|
+
| `rails-frontend remove-pin PACKAGE` | `unpin` | Remove external JavaScript library |
|
|
102
|
+
| `rails-frontend run` | `r` | Start server |
|
|
103
|
+
| `rails-frontend build` | `b` | Build static site |
|
|
104
|
+
| `rails-frontend version` | `-v` | Show version |
|
|
105
|
+
| `rails-frontend help` | `-h` | Show help |
|
|
106
|
+
|
|
107
|
+
**Options:**
|
|
108
|
+
- `--clean`: Clean unnecessary files for frontend (recommended)
|
|
109
|
+
|
|
110
|
+
## Requirements
|
|
111
|
+
|
|
112
|
+
- Ruby 3.0+
|
|
113
|
+
- Rails 7+
|
|
114
|
+
|
|
115
|
+
## Author
|
|
116
|
+
|
|
117
|
+
Levent Özbilgiç
|
|
118
|
+
[](https://www.linkedin.com/in/leventozbilgic/)
|
|
119
|
+
|
|
120
|
+
## License
|
|
121
|
+
|
|
122
|
+
MIT
|