All Projects → ElMassimo → js_from_routes

ElMassimo / js_from_routes

Licence: MIT license
🛣️ Generate path helpers and API methods from your Rails routes

Programming Languages

ruby
36898 projects - #4 most used programming language
typescript
32286 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
Vue
7211 projects
CSS
56736 projects

Projects that are alternatives of or similar to js from routes

admin-one-vue-tailwind
Free Vue.js 3.x Tailwind 3.x admin dashboard template with dark mode. Vite builds. Pinia state. Laravel integration available
Stars: ✭ 742 (+889.33%)
Mutual labels:  vitejs
dl-model
Dragalia Lost Model Viewer
Stars: ✭ 30 (-60%)
Mutual labels:  vitejs
vitawind
Install and Setting Tailwindcss automatically for Vite
Stars: ✭ 46 (-38.67%)
Mutual labels:  vitejs
templatus
Opinionated template for starting new web applications with Ruby on Rails and Vue.js 3
Stars: ✭ 50 (-33.33%)
Mutual labels:  vitejs
reactjs-vite-tailwindcss-boilerplate
ReactJS + Vite boilerplate to be used with Tailwindcss.
Stars: ✭ 103 (+37.33%)
Mutual labels:  vitejs
electron-vue-vite-boilerplate
Electron Vue Vite Boilerplate for you next project
Stars: ✭ 26 (-65.33%)
Mutual labels:  vitejs
vite-bundle
Integration with your Symfony app & Vite
Stars: ✭ 56 (-25.33%)
Mutual labels:  vitejs
tailwind-dashboard-template
Mosaic Lite is a free admin dashboard template built on top of Tailwind CSS and fully coded in React. Made by
Stars: ✭ 1,662 (+2116%)
Mutual labels:  vitejs
admin-antd-vue
Vue3.x + Ant Design Admin template (vite/webpack)
Stars: ✭ 111 (+48%)
Mutual labels:  vitejs
phaser3-rollup-typescript
Phaser 3 TypeScript Starter
Stars: ✭ 129 (+72%)
Mutual labels:  vitejs
vite-plugin-image-presets
🖼 Image Presets for Vite.js apps
Stars: ✭ 164 (+118.67%)
Mutual labels:  vitejs
admin-two-vue-bulma-dashboard
Free Vue.js Bulma Buefy Admin Dashboard Template. Vite & Vue CLI supported
Stars: ✭ 68 (-9.33%)
Mutual labels:  vitejs
ak-vue3
组件库包含了 AutoForm 自动表单、BackTop 返回顶部、Breadcrumb 面包屑、 Button 按钮、Cascader 级联选择器、Checkbox 多选框、Collapse 折叠面板、ColorPicker 颜色选择器、DataPicker 时间选择器、Dialog 弹层对话框、Alert 弹框、Echarts 图形图表、Form 表单、Input 输入框、Lazy 图片延时加载、Loading 加载等待、Menu 菜单、Pagination 分页、Progress 进度条、Radio 单选框、Select 选择器、Steps 步骤条、Swiper 图片轮播、Switch 开关、Table 表格、Tabs 标签页、Textarea 文本框、Tooltip 提示、Tr…
Stars: ✭ 24 (-68%)
Mutual labels:  vitejs
vite-plugin-environment
Easily expose environment variables in Vite.js
Stars: ✭ 57 (-24%)
Mutual labels:  vitejs
vui-vc-next
Vue 3 with Vite Playground - Mobile web UI components - (vue3+vite2).
Stars: ✭ 15 (-80%)
Mutual labels:  vitejs
vite-plugin-vue-gql
⚡ GraphQL Tags for your Vue SFC ⚡
Stars: ✭ 188 (+150.67%)
Mutual labels:  vitejs
rapide
WIP! do not use just yet - Opinionated Vite + Alpine.js starter PWA template
Stars: ✭ 15 (-80%)
Mutual labels:  vitejs
vue-next-admin
🎉🎉🔥基于vue3.x 、Typescript、vite、Element plus等,适配手机、平板、pc 的后台开源免费模板库(vue2.x请切换vue-prev-admin分支)
Stars: ✭ 1,002 (+1236%)
Mutual labels:  vitejs
electron-vue-template
A very simplistic Electron + Vue 3 template including ViteJS and Electron Builder
Stars: ✭ 60 (-20%)
Mutual labels:  vitejs
cloud-design
阿里云前端组件库,由混合云&公有云前端团队共建
Stars: ✭ 74 (-1.33%)
Mutual labels:  vitejs


Build Status Maintainability Test Coverage Gem Version License

JS From Routes generates path helpers and API methods from your Rails routes, allowing you to be more productive and prevent routing-related errors.

Since code generation is fully customizable it can be used in very diverse scenarios.

Why? 🤔

Path helpers in Rails make it easy to build URLs, while avoiding typos and mistakes.

With JS From Routes, it's possible the enjoy the same benefits in JS, and even more if using TypeScript.

Read more about it in the blog announcement.

Features ⚡️

  • 🚀 Path and Request Helpers
  • 🔁 Serialization / Deserialization
  • Prevent Routing Errors
  • 🤖 Automatic Generation
  • 🛠 Customizable Generation
  • And more!

Documentation 📖

Visit the documentation website to check out the guides and searchable configuration reference.

Installation 💿

For a one liner, you can use this template:

rails app:template LOCATION='https://railsbytes.com/script/X6ksgn'

Else, add this line to your application's Gemfile in the development group and execute bundle:

group :development, :test do
  gem 'js_from_routes'
end

Then, add the client library to your package.json:

npm install @js-from-routes/client # yarn add @js-from-routes/client

There are more client libraries available.

Getting Started 🚀

The following is a short excerpt from the guide.

Specify the routes you want

Use the export attribute to determine which routes should be taken into account when generating JS.

Rails.application.routes.draw do
  resources :video_clips, export: true do
    get :download, on: :member
  end
end

Use the path helpers in your JS application

Path helpers will be automatically generated when refreshing the page.

import { videoClips } from '~/api'

const video = await videoClips.get({ id: 'oHg5SJYRHA0' })

const downloadPath = videoClips.download.path(video)

Check the documentation website for more information.

For a working example, check this repo.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].