Permalink
Browse files

its/it's trip; sentence flow; putting a camel in javascript

  • Loading branch information...
1 parent 60cc5e5 commit 026d76c68ed3a1eb7b8bb843e0d72dc68d03bf0a @randomecho randomecho committed Aug 3, 2012
@@ -1,6 +1,6 @@
h2. Asset Customization
-This guide covers how Spree manages it's javascript, stylesheet and image assets and how you can extend and customize them including:
+This guide covers how Spree manages its JavaScript, stylesheet and image assets and how you can extend and customize them including:
* Understanding Spree's use of the Rails asset pipeline
* Managing application specific assets
@@ -13,9 +13,9 @@ endprologue.
h3. Spree's Asset Pipeline
-With the release of 3.1 Rails now supports powerful asset management features and Spree fully leverages these features to futher extend and simplify it's customization potential. Using asset customization techniques outlined below you be able to adapt all the javascript, stylesheets and images contained in Spree to easily provide a fully custom experience.
+With the release of 3.1 Rails now supports powerful asset management features and Spree fully leverages these features to further extend and simplify its customization potential. Using asset customization techniques outlined below you be able to adapt all the JavaScript, stylesheets and images contained in Spree to easily provide a fully custom experience.
-All Spree generated (or upgraded) applications include an <tt>app/assets</tt> directory (as is standard for all Rails 3.1 apps). We've taken this one step further by subdividing each top level asset directory (images, javascripts, stylesheets) into store and admin directories, this is designed to keep assets from the front end (store) and back end (admin) from conflicting with each other.
+All Spree generated (or upgraded) applications include an <tt>app/assets</tt> directory (as is standard for all Rails 3.1 apps). We've taken this one step further by subdividing each top level asset directory (images, JavaScript files, stylesheets) into store and admin directories. This is designed to keep assets from the front end (store) and back end (admin) from conflicting with each other.
A typical assets directory for a Spree application will look like:
@@ -35,12 +35,12 @@ A typical assets directory for a Spree application will look like:
| |-- admin
| |-- all.css</pre>
-Spree also generates four top level manifests (all.css & all.js, see above) that require all the core extension's and site specific stylesheets / javascripts.
+Spree also generates four top level manifests (all.css & all.js, see above) that require all the core extension's and site specific stylesheets / JavaScript files.
h4. How core extensions (engines) manage assets
-All core engines have been updated to provide four asset manifests that are responsible for bundling up all the javascripts and stylesheets required for that engine.
+All core engines have been updated to provide four asset manifests that are responsible for bundling up all the JavaScript files and stylesheets required for that engine.
For example, spree_core provides the following manifests:
@@ -66,15 +66,15 @@ These core (engine specific) manifests are included by default by the relevant a
//= require admin/spree_promo
//= require_tree .</css>
-External javascript libraries, stylesheets and images have also be relocated into vendor/assets (again Rails 3.1 standard approach), and all core extensions no longer have public directories.
+External JavaScript libraries, stylesheets and images have also be relocated into vendor/assets (again Rails 3.1 standard approach), and all core extensions no longer have public directories.
h3. Managing your application's assets
-All of your application's assets should be stored in the appropriate <tt>app/assets</tt>, <tt>lib/assets</tt> or <tt>vendor/assets</tt> sub-directory. All javascript and stylesheet files in <tt>app/assets</tt> sub-directories will be automatically included by the relevant all.(js|css) manifests.
+All of your application's assets should be stored in the appropriate <tt>app/assets</tt>, <tt>lib/assets</tt> or <tt>vendor/assets</tt> sub-directory. All JavaScript and stylesheet files in <tt>app/assets</tt> sub-directories will be automatically included by the relevant all.(js|css) manifests.
-Javascript & stylesheet files in <tt>lib/assets</tt> or <tt>vendor/assets</tt> sub-directories should be manually required in the appropriate all.(js|css) manifests.
+JavaScript & stylesheet files in <tt>lib/assets</tt> or <tt>vendor/assets</tt> sub-directories should be manually required in the appropriate all.(js|css) manifests.
INFO: Images will be served in development mode, or compiled into the public directory automatically in production mode.
@@ -91,13 +91,13 @@ For an example of an extension using a generator to install assets and migration
h3. Overriding Spree's core assets
-Overriding or replacing any of Spree's internal assets is even easier than before, it's recommended to attempt to replace as little as possible in a given javascript or stylesheet file to help ease future upgrade work required.
+Overriding or replacing any of Spree's internal assets is even easier than before. It's recommended to attempt to replace as little as possible in a given JavaScript or stylesheet file to help ease future upgrade work required.
The methods listed below will work for both applications, extensions and themes with one noticeable difference: Extension & theme asset files will not be automatically included (see above for instructions on how to include asset files from your extensions / themes).
-h4. Overriding individual css styles
+h4. Overriding individual CSS styles
-Say for example you want to replace the following, css snippet:
+Say for example you want to replace the following CSS snippet:
<css>
/* app/assets/stylesheets/store/screen.css */
@@ -120,17 +120,17 @@ div#footer {
The <tt>store/all.css</tt> manifest will automatically include <tt>foo.css</tt> and it will actually include both definitions with the one from <tt>foo.css</tt> being included last, hence it will be the rule applied.
-h4. Overriding entire css files
+h4. Overriding entire CSS files
To replace an entire stylesheet as provided by Spree you simply need to create a file with the same name and save it to the corresponding path within your application's or extension's <tt>app/assets/stylesheets</tt> directory.
-For example to replace <tt>store/all.css</tt> you would save the replacement to <tt>your_app/app/assets/stylesheets/store/all.css</tt>.
+For example, to replace <tt>store/all.css</tt> you would save the replacement to <tt>your_app/app/assets/stylesheets/store/all.css</tt>.
NOTE: This same method can be used to override stylesheets provided by third-party extensions.
-h4. Overriding individual javascript functions
+h4. Overriding individual JavaScript functions
-A similar approach can be used for javascript functions, for example if you wanted to override the <tt>show_variant_images</tt> method:
+A similar approach can be used for JavaScript functions. For example, if you wanted to override the <tt>show_variant_images</tt> method:
<javascript>
// app/assets/javascripts/store/product.js
@@ -153,7 +153,7 @@ A similar approach can be used for javascript functions, for example if you want
}
</javascript>
-Again, just create a new javascript file inside <tt>your_app/app/assets/stylesheets/store</tt> and include the new method definition:
+Again, just create a new JavaScript file inside <tt>your_app/app/assets/stylesheets/store</tt> and include the new method definition:
<javascript filename="app/assets/javascripts/store/foo.js">
// app/assets/javascripts/store/foo.js
@@ -163,19 +163,19 @@ Again, just create a new javascript file inside <tt>your_app/app/assets/styleshe
}
</javascript>
-The resulting <tt>store/all.js</tt> would include both methods, with the later being one executed on request.
+The resulting <tt>store/all.js</tt> would include both methods, with the latter being the one executed on request.
-h4. Overriding entire javascript files
+h4. Overriding entire JavaScript files
-To replace an entire javascript file as provided by Spree you simply need to create a file with the same name and save it to the corresponding path within your application's or extension's <tt>app/assets/javascripts</tt> directory.
+To replace an entire JavaScript file as provided by Spree you simply need to create a file with the same name and save it to the corresponding path within your application's or extension's <tt>app/assets/javascripts</tt> directory.
-For example to replace <tt>store/all.js</tt> you would save the replacement to <tt>your_app/app/assets/javascripts/store/all.js</tt>.
+For example, to replace <tt>store/all.js</tt> you would save the replacement to <tt>your_app/app/assets/javascripts/store/all.js</tt>.
-NOTE: This same method can be used to override javascript files provided by third-party extensions.
+NOTE: This same method can be used to override JavaScript files provided by third-party extensions.
h4. Overriding images
-Finally images can be replaced by substituting the required file into the same path within your application or extension as the file you would like to replace.
+Finally, images can be replaced by substituting the required file into the same path within your application or extension as the file you would like to replace.
For example, to replace the Spree logo you would simply copy your logo to: <tt>your_app/app/assets/images/admin/bg/spree_50.png</tt>.
Oops, something went wrong.

0 comments on commit 026d76c

Please sign in to comment.