Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gauravtiwari/webpacker-example-app

An example app to demonstrate webpacker with Rails 5.1
https://github.com/gauravtiwari/webpacker-example-app

javascript rails webpack webpacker

Last synced: 23 days ago
JSON representation

An example app to demonstrate webpacker with Rails 5.1

Awesome Lists containing this project

README

        

# Rails Webpacker Example App

Demo app that showcases Rails on webpack and yarn using Webpacker gem (default setup in upcoming Rails 5.1)

* [Webpacker](https://github.com/rails/webpacker)
* [PR](https://github.com/rails/rails/pull/26836)
* [Blog Post](https://medium.com/@gauravtiwari/introducing-webpacker-7136d66cddfb)

# Alpha Features

Supports bundling
* Javascript
* Stylesheets
* Images
* Fonts
* Linking assets
* CND - Cloudfront

# Running in development

The app is using [foreman](https://github.com/ddollar/foreman), famous process manager. Checkout the `Procfile.dev` in app root for more information.

```bash
git clone [email protected]:gauravtiwari/webpacker-example-app.git
cd webpacker-example-app
bundle install
brew install yarn # (if not installed)
./bin/yarn install
```

Then, run the server using this binstub,

```bash
./bin/server
```
(try `chmod 777 ./bin/server` incase it doesn't work)

Visit [http://localhost:5000/](http://localhost:5000/)

# Installing and using new node modules

```bash
# Using Yarn
./bin/yarn add material-ui
```

Then, import it in your component,

```js
import { Card } from 'material-ui/Card';
```