README updates
This commit is contained in:
		
					parent
					
						
							
								ca7ba43b13
							
						
					
				
			
			
				commit
				
					
						e02098eefb
					
				
			
		
					 1 changed files with 20 additions and 19 deletions
				
			
		
							
								
								
									
										39
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										39
									
								
								README.md
									
										
									
									
									
								
							|  | @ -33,38 +33,39 @@ node, npm, and bower to change them. | ||||||
| 
 | 
 | ||||||
| ### Adding a bower component | ### Adding a bower component | ||||||
| 
 | 
 | ||||||
| Add the package to bower.json under 'dependencies' or | Add the package name and version to bower.json under 'dependencies' or `bower | ||||||
| 
 | install package-name --save` | ||||||
| `bower install *package-name* --save` |  | ||||||
| 
 | 
 | ||||||
| Next update the "preen" config in bower.json with the list of files we will | Next update the "preen" config in bower.json with the list of files we will | ||||||
| actually use from the new package, e.g.: | actually use from the new package, e.g.: | ||||||
| ``` | ``` | ||||||
|   "preen": { |   "preen": { | ||||||
|     "new-package": ["path/to/main.js", "directory/**/*.js"], |     "package-name": [ | ||||||
|  |       "path/to/main.js", | ||||||
|  |       "directory/**/*.js" | ||||||
|  |     ], | ||||||
|     ... |     ... | ||||||
|   } |   } | ||||||
| ``` | ``` | ||||||
| Now, run `grunt` to delete unused package files and concatenate the | 
 | ||||||
| remaining javascript files into `js-deps/bower_components.js`. Note that | Now, run `grunt` to delete unused package files and concatenate the remaining | ||||||
| packages will be concatenated **in order** as specified in the preen | javascript files into `js-deps/bower_components.js`. Note that packages will be | ||||||
| config. | concatenated **in the order** that they are listed in the preen config. | ||||||
| 
 | 
 | ||||||
| Finally, stage and commit changes to bower.json, js-deps/bower_components.js, | Finally, stage and commit changes to bower.json, js-deps/bower_components.js, | ||||||
| and bower_components/. The latter should be limited to files we actually use. | and bower_components/. The latter should be limited to files we actually use. | ||||||
| 
 | 
 | ||||||
| Tests | Tests | ||||||
| ===== | ===== | ||||||
| Please write tests! Our testing framework is mocha and our assertion library is | Please write tests! Our testing framework is | ||||||
| chai: | [mocha](http://visionmedia.github.io/mocha/) and our assertion library is | ||||||
|  | [chai](http://chaijs.com/api/assert/). | ||||||
| 
 | 
 | ||||||
|   * http://visionmedia.github.io/mocha/ | To run tests, open `test/index.html` in your browser. Note that | ||||||
|   * http://chaijs.com/api/assert/ |  | ||||||
| 
 | 
 | ||||||
| Tips/Tricks |  * Some tests depend on the native client module. These will fail unless you | ||||||
| =========== |    load the test page from the `chrome-extension://` namespace (as opposed to | ||||||
| * Loading the `test.html` page may read, write or clear localStorage. To avoid |    the `file://` namespace or via a local webserver. | ||||||
|   having to choose between running tests and preserving your existing messages, |  * Some tests may read, write or clear localStorage. It is recommended that you | ||||||
|   keys, and other extension data, much of the test suite can be run by starting |    create a Chrome user profile just for running tests to avoid clobbering any | ||||||
|   a local webserver in the repository root, e.g. `python -m SimpleHTTPServer`. |    existing account and message data. | ||||||
|   You can then access the test page at `http://0.0.0.0:8000/test.html`. |  | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 lilia
				lilia