From c8e9c66f092795014036056fed62daff30d790e0 Mon Sep 17 00:00:00 2001 From: Jorge Davila Date: Tue, 21 May 2013 18:36:01 -0400 Subject: [PATCH 1/2] fix typo on Getting_Started.md file: JSS to JS --- GETTING_STARTED.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index 744cbef..b5034bb 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -17,7 +17,7 @@ specify order (A should come before B). Your pipeline is written in an `Assetfile`. The `Assetfile` uses a nice DSL to make things easier. The `Assetfile` should live in your project's -root directory. +root directory. Let's get started by writing a basic pipeline. Assume we have this directory structure: @@ -26,12 +26,12 @@ directory structure: /source /css /javascript -/compiled +/compiled Assetfile ``` -The pipeline should simply concatenate all the individual JSS and CSS -files into single files. So the JSS and CSS directories are the inputs +The pipeline should simply concatenate all the individual JS and CSS +files into single files. So the JS and CSS directories are the inputs and 2 files are outputs. The `source` directory is input and the output will go into `compiled`. Here's the `Assetfile` to do just that: @@ -135,7 +135,7 @@ concatenate files. You must write your own filters to do this. Luckily, writing filters is pretty easy. Filters are classes that have `generate_output` method. This is core API requirement. There also other method you may implement, but this is the most important. Let's take a -stab at writing a coffeescript filter. +stab at writing a coffeescript filter. Filters are Ruby classes. They map a set of inputs to outputs and finally generate the output. Here is an absolute bare bones filter: @@ -190,7 +190,7 @@ you may have noticed they are compiled "in place". This means This works in our simple example, but what happens when we need to work with Javascript later in the pipeline or next build steps expect ".js" files? The filter has to customize the name. The most correct thing to -do is make the output file has the same name except as ".js". +do is make the output file has the same name except as ".js". This behavior is defined in the filter's initializer. This may seem odd to you. It was odd to me until I understood what was happening. @@ -228,7 +228,7 @@ input "source" do filter CoffeeScript end - # Select the JS generated by previous filters. + # Select the JS generated by previous filters. match "javascript/**/*.js" do concat "application.js" end @@ -258,7 +258,7 @@ end That covers the basics of writing filters. There is much more you can do with filters that are outside the scope of this guide. You can find many useful (as well as plenty of examples) in the -[rake-pipeline-web-filters](https://github.com/wycats/rake-pipeline-web-filters) +[rake-pipeline-web-filters](https://github.com/wycats/rake-pipeline-web-filters) project. That also concludes this guide. You should know everything you need to From 85fcfa3791ab77504d23c5edcef06c4083d4923c Mon Sep 17 00:00:00 2001 From: Jorge Davila Date: Tue, 21 May 2013 18:48:51 -0400 Subject: [PATCH 2/2] more clarity on the Getting_started docs --- GETTING_STARTED.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index b5034bb..589568a 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -190,7 +190,7 @@ you may have noticed they are compiled "in place". This means This works in our simple example, but what happens when we need to work with Javascript later in the pipeline or next build steps expect ".js" files? The filter has to customize the name. The most correct thing to -do is make the output file has the same name except as ".js". +do is make the output file have the same name except with a ".js" extension. This behavior is defined in the filter's initializer. This may seem odd to you. It was odd to me until I understood what was happening.