0.01
No release in over 3 years
Low commit activity in last 3 years
Ruby Gem wrapper for the Svelte compiler
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.16
>= 1.6
>= 0.1.3
~> 5.10
~> 3.3
~> 0.8

Runtime

= 2.7.0
 Project Readme

svelte-ruby

Ruby Gem wrapper for the Svelte compiler

Gem Version

Usage

require 'svelte'

Svelte.exec_eval('svelte.VERSION')
# => '1.12.1'

Svelte.exec_method('svelte.compile', '<h1>Hello {{name}}</h1>')
# => {code: 'function renderMainFragment ( root, component ) { [...], map: [...]}

Installation

Command Line

gem install svelte-ruby

Gemfile

gem "svelte-ruby", "~>0.1"

Development

Svelte Source

https://svelte.technology

The svelte-ruby gem ships with a working svelte source: lib/svelte.js. No need to regenerate it except for development or configuration.

The rollup task transpiles the svelte source to a format that's compatible with Execjs. The result is written to lib/svelte.js with these commands: cd svelte && rollup -c rollup/rollup.config.ruby.js

Copy config to svelte repo

rake svelte:copy_config

Transpile to Execjs compatible

rake svelte:rollup

Dev Requirements

  • hoe gem manager
  • hoe-bundler may need gem install hoe-bundler installation before using rake bundler:gemfile
  • YARD docs
  • redcarpet for yardoc
  • npm rollup is needed locally to regenerate the svelte source for Execjs

Testing

Tests written with minitest

rake test

Contributing

Send tested code. Thank you, contributors!

To Do

  • Finish command line bin/svelte

License

MIT License

Copyright (c) 2017 Bordee Inc.

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:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

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.

About

bordee

svelte-ruby is maintained and funded by Bordee Inc. The names and logos for Bordee are trademarks of Bordee Inc.

We love open source software! See our other projects and check out Seattle.rb!