Socket
Book a DemoInstallSign in
Socket

fronton

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fronton

0.5.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

Fronton

A command-line tool for build frontend apps in Ruby.

It uses Sprockets and Tilt to creates an environment for assets compiling similar to Rails Assets Pipeline. It support all engines supported by Sprockets and Tilt like Javascript, Sass, CoffeeScript, Haml, Slim, etc.

Status

Gem Version

This project is still experimental, use with caution!

Installation

$ gem install fronton

Features

  • Support for RailsAssets.
  • Support for LiveReload in fronton server command using --livereload.

Getting Started

Available commands

  • fronton new: generate a new blank app with a default skeleton.
  • fronton server: start a development server for html & assets.
  • fronton compile: compile html & assets files for distribution.
  • fronton clean: remove old compiled html & assets files.
  • fronton clobber: remove all compiled html & assets files.
  • fronton info: show information about the environment.
  • fronton help: show commands help.

Config file

Configuration options are readed from a fronton.yml file located in project top folder. application.js, application.css and all non js&css files in assets_paths are already added.

assets:
  - otherfile.js
assets_paths:
  - assets/javascripts
  - assets/stylesheets
  - assets/fonts
  - assets/images
  - vendor/javascripts
  - vendor/stylesheets
  - vendor/fonts
  - vendor/images
base_url: https://assets.example.com
compressors:
  css: scss
  js: uglifier
dependencies:
  - rails-assets-jquery: 3.1.0
  - slim: 3.0.7
fallback_page: index.slim
output: public
pages:
  - index.slim: /
pages_paths:
  - pages
AttributeTypeDescription
assetsArrayList of assets to compile (non js&css already included)
assets_pathsArrayList of directories where Sprockets find files for require
base_urlStringBase URL for assets in production
compressorsHashHash with selected compressors by type
dependenciesArrayList of gems to install and require
fallback_pageStringFallback page (i.e HTML5 mode in frontend routers)
outputStringPath to a directory where compiled assets will be written
pagesArrayList of pages to compile
pages_pathsArrayList of directories where Fronton find html files

Gem sources

In order to allow Fronton to install project gem dependencies automatically, if you use gems from others sources than https://rubygems.org like https://rails-assets.org, you must add these sources to rubygems configuration file.

$ gem sources --add https://rails-assets.org

Proposed folders hierarchy

.
├── assets
│   ├── fonts
│   ├── images
│   ├── javascripts
│   └── stylesheets
├── fronton.yml
├── locales
│   └── es
│       └── index.yml
├── pages
├── public
└── vendor
    ├── fonts
    ├── images
    ├── javascripts
    └── stylesheets

Testing

Tests are written using Minitest.

$ bundle exec rake

Contributing

Contributions are welcome, please follow GitHub Flow

Versioning

fronton uses Semantic Versioning 2.0.0

License

Copyright © 2016 Javier Aranda. Released under MIT license.

FAQs

Package last updated on 19 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.