[KSS-checkins] r51982 - kukit/kss.base/trunk/src/kss/base

gotcha at codespeak.net gotcha at codespeak.net
Sat Mar 1 12:10:08 CET 2008


Author: gotcha
Date: Sat Mar  1 12:10:07 2008
New Revision: 51982

Modified:
   kukit/kss.base/trunk/src/kss/base/javascript.txt
Log:
Some hopefully better wording


Modified: kukit/kss.base/trunk/src/kss/base/javascript.txt
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/javascript.txt	(original)
+++ kukit/kss.base/trunk/src/kss/base/javascript.txt	Sat Mar  1 12:10:07 2008
@@ -5,42 +5,38 @@
 The javascript module has some helpers which can be used to easily get
 the Javascript files from the active plugins.
 
-Concatinated
+Concatenated
 ============
 
-With the concatenated function you can get the a single string
-containing all the Javascript from each active plugin.
+With the `concatenated` function, you get a string that
+contains the Javascript from all active plugins.
 
   >>> from kss.base.javascript import concatenated
 
-When we run the code without activating any plugin we will get an
-empty string.
+Without any active plugin, we get an empty string.
 
   >>> concatenated()
   ''
 
-Now if we run the code again after we activate a plugin we get
-something more interesting.
+If we activate a plugin, we get something more interesting.
 
   >>> from kss.base import activate
   >>> activate('kss-core')
   >>> concatenated()
   '/*\n* Copyright (c) 2005-2007\n* Authors: KSS Project Contributors...'
 
-An optimization you might want to enable is concatenate the extra
-dependencies along side with the plugin code. This will reduce the
-number of requests a browser has to make to a website therefore making
+As an optimization, you might want to concatenate the extra
+dependencies along side with the plugin code. This reduces the
+number of requests a browser has to make to the web server therefore making
 it slightly faster (only for the first page load).
 
-  >>> 'XPathParser' in concatenated(include_extras=True)
-  True
-
-This example was not there in the previous concatination.
-
   >>> 'XPathParser' in concatenated()
   False
 
-Finally we will unregister the core plugin to clean up.
+  >>> 'XPathParser' in concatenated(include_extras=True)
+  True
+
+Finally, we deactivate the core plugin to clean up.
 
   >>> from kss.base.plugin import deactivate
   >>> deactivate('kss-core')
@@ -50,18 +46,18 @@
 ======
 
 The kss.base package ships with a Javascript packer. This can reduce
-the filesize of the Javascript. It will also do the concatination of
-all registered plugin code.
+the filesize of the Javascript.
+It also concatenates all registered plugin code.
 
   >>> from kss.base.javascript import packed
 
-Like with the concatination we will get an empty string if we just run
-it.
+Like with the concatenation, we get an empty string if we run
+it without any active plugin.
 
   >>> packed()
   ''
 
-So now we activate a plugin.
+Now we activate a plugin.
 
   >>> activate('kss-core')
 
@@ -71,7 +67,7 @@
   >>> no_compression
   '/*\n* Copyright (c) 2005-2007\n* Authors: KSS Project Contributors...'
 
-To enable compression we need to pass in a a compression level. There
+To enable compression, we need to pass the compression level. There
 are a few available options of which only `safe` is currently usable.
 
   >>> with_compression = packed(compression_level='safe')
@@ -82,7 +78,7 @@
   >>> len(with_compression) < len(no_compression)
   True
 
-We will again unregister the core plugin to clean up.
+We again deactivate the core plugin to clean up.
 
   >>> from kss.base.plugin import deactivate
   >>> deactivate('kss-core')
@@ -97,12 +93,12 @@
 
   >>> from kss.base.javascript import extra_scripts
 
-By default we get an empty dictionary.
+When no plugins are active, we get an empty dictionary.
 
   >>> extra_scripts()
   {}
 
-If we activate a plugin we get something more interesting.
+If we activate a plugin, we get something more interesting.
 
   >>> activate('kss-core')
   >>> extra_scripts()
@@ -111,7 +107,7 @@
 This dictionary contains the base names of all the registered
 Javascripts with their file contents as the value.
 
-Now we can cleanup the registry again.
+Let us cleanup the registry again.
 
   >>> from kss.base.plugin import deactivate
   >>> deactivate('kss-core')


More information about the Kukit-checkins mailing list