README.md in gulp_assets-1.0.0.pre.3 vs README.md in gulp_assets-1.0.0.pre.4
- old
+ new
@@ -11,11 +11,11 @@
Livereload client into Rails-renderd pages, updates are triggered from
gulp.
## Usage
-1. Add `gem 'gulp_assets' to your Gemfile and run `bundle install`.
+1. Add `gem 'gulp_assets'` to your Gemfile and run `bundle install`.
2. Run `rails generate gulp_assets` to generate all necessary files.
3. Develop your frontend code in the `frontend` directory
4. Reference files generated by gulp using the `gulp_asset_path` helper
5. Run `npm start` during development for livereload/Webpack
Hot Module replacement.
@@ -93,5 +93,26 @@
- `frontend/javscripts/main.js` Input file
- `public/assets/javscripts/main.js` Output File
- `<script src="<%=gulp_asset_path('javascripts/main.js')%>"></script>`
- `<%= gulp_javascript "main" %>` or `<%= gulp_javascript %>` also generate correct links
+
+## Development
+
+To test while changing the JS files, run
+
+```shell
+./cli create_testapp
+```
+
+inside the root of the gem. This will generate a testapp directory that
+contains a Rails app using the gem from source. All the gulp_assets
+specific files are symlinked to the files and directories in the template
+directory. If you want to use npm commands you have to run those inside
+the template directory, otherwise npm will replace the symlink with a
+new package.json.
+
+The rails app has the following features:
+
+- A layout requiring `main.js` and `main.css`.
+- A default route rendering a static template in
+ `app/views/application/index.html.erb`