Permalink
Browse files

fixed conflicts

  • Loading branch information...
2 parents 305de2c + 57d02a4 commit 76b9821bd7e2a2a7d733e947ba1838ebcc090755 @tmpvar committed Jul 3, 2011
View
@@ -105,21 +105,18 @@ Using JSDOM, we can easily create a DOM, load some libraries and read a file. Le
var fs = require('fs'),
jsdom = require('jsdom');
- jsdom.env({
- code: [
- '/../lib/jquery.js',
- require('weld').filepath
- ],
- html: '/../files/contexts.html'
- },
- function(errors, window) {
+ jsdom.env(
+ './test.html',
+ ['./jquery.js', './weld.js'],
+ function(errors, window) {
- var data = [{ name: 'hij1nx', title : 'code slayer' },
- { name: 'tmpvar', title : 'code pimp' }];
+ var data = [{ name: 'hij1nx', title : 'code slayer' },
+ { name: 'tmpvar', title : 'code pimp' }];
- window.weld(window.$('.contact')[0], data);
+ window.weld(window.$('.contact')[0], data);
- });
+ }
+ );
Here is the corresponding markup that our script above will load...
@@ -227,7 +224,7 @@ Weld will automatically import the nodes into the proper document (dest.html)...
jsdom.env(path.join(__dirname, 'files', 'source.html'), function(serrs, sw) {
var sources = sw.document.getElementsByTagName("span");
- jsdom.env(path.join(__dirname, 'files', 'dest.html'),[jqpath, wpath], function(errors, window) {
+ jsdom.env(path.join(__dirname, 'files', 'dest.html'), [jqpath, wpath], function(errors, window) {
var $ = window.jQuery;
@@ -314,14 +311,22 @@ Debugging recursive data can be a real pain. With the `debug` option, you can se
};
-## Credits
-developed by [hij1nx][2] and [tmpvar][3]
-
If you want to learn more about JSDOM, go [here][1] it's an awesome project.
## Version
-0.2.0
+0.2.1
+
+## Licence
+
+(The MIT License)
+
+Copyright (c) 2011 hij1nx <http://www.twitter.com/hij1nx>, tmpvar <http://www.twitter.com/tmpvar>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
-[1]: https://github.com/tmpvar/jsdom
-[2]: http://twitter.com/hij1nx
-[3]: http://twitter.com/tmpvar
+[1]: https://github.com/tmpvar/jsdom
View
@@ -1,115 +0,0 @@
-/* HTML5 ✰ Boilerplate */
-
-html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre,
-abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
-small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
-fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td,
-article, aside, canvas, details, figcaption, figure, footer, header, hgroup,
-menu, nav, section, summary, time, mark, audio, video {
- margin:0;
- padding:0;
- border:0;
- outline:0;
- font-size:100%;
- vertical-align:baseline;
- background:transparent;
-}
-article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
- display:block;
-}
-nav ul { list-style:none; }
-blockquote, q { quotes:none; }
-blockquote:before, blockquote:after,
-q:before, q:after { content:''; content:none; }
-a { margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; }
-ins { background-color:#ff9; color:#000; text-decoration:none; }
-mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }
-del { text-decoration: line-through; }
-abbr[title], dfn[title] { border-bottom:1px dotted; cursor:help; }
-table { border-collapse:collapse; border-spacing:0; }
-hr { display:block; height:1px; border:0; border-top:1px solid #ccc; margin:1em 0; padding:0; }
-input, select { vertical-align:middle; }
-
-
-body { font:13px/1.231 sans-serif; *font-size:small; }
-select, input, textarea, button { font:99% sans-serif; }
-pre, code, kbd, samp { font-family: monospace, sans-serif; }
-
-body, select, input, textarea { color: #444; }
-h1,h2,h3,h4,h5,h6 { font-weight: bold; }
-html { overflow-y: scroll; }
-
-a:hover, a:active { outline: none; }
-a, a:active, a:visited { color: #607890; }
-a:hover { color: #036; }
-
-ul, ol { margin-left: 1.8em; }
-ol { list-style-type: decimal; }
-
-nav ul, nav li { margin: 0; }
-small { font-size: 85%; }
-strong, th { font-weight: bold; }
-td, td img { vertical-align: top; }
-sub { vertical-align: sub; font-size: smaller; }
-sup { vertical-align: super; font-size: smaller; }
-pre { padding: 15px; white-space: pre; white-space: pre-wrap; white-space: pre-line; word-wrap: break-word; }
-textarea { overflow: auto; }
-.ie6 legend, .ie7 legend { margin-left: -7px; }
-input[type="radio"] { vertical-align: text-bottom; }
-input[type="checkbox"] { vertical-align: bottom; }
-.ie7 input[type="checkbox"] { vertical-align: baseline; }
-.ie6 input { vertical-align: text-bottom; }
-label, input[type=button], input[type=submit], button { cursor: pointer; }
-button, input, select, textarea { margin: 0; }
-input:valid, textarea:valid { }
-input:invalid, textarea:invalid { border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; }
-.no-boxshadow input:invalid,
-.no-boxshadow textarea:invalid { background-color: #f0dddd; }
-
-::-moz-selection{ background: #FF5E99; color:#fff; text-shadow: none; }
-::selection { background:#FF5E99; color:#fff; text-shadow: none; }
-a:link { -webkit-tap-highlight-color: #FF5E99; }
-
-button { width: auto; overflow: visible; }
-.ie7 img { -ms-interpolation-mode: bicubic; }
-
-.ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; }
-.hidden { display: none; visibility: hidden; }
-.visuallyhidden { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px); }
-.invisible { visibility: hidden; }
-.clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; visibility: hidden; }
-.clearfix:after { clear: both; }
-.clearfix { zoom: 1; }
-
-body {
- background-color: #f8f8f8;
-}
-
-@media all and (orientation:portrait) {
-
-}
-
-@media all and (orientation:landscape) {
-
-}
-
-@media screen and (max-device-width: 480px) {
-
-
- /* html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */
-}
-
-@media print {
- * { background: transparent !important; color: #444 !important; text-shadow: none !important; }
- a, a:visited { color: #444 !important; text-decoration: underline; }
- a:after { content: " (" attr(href) ")"; }
- abbr:after { content: " (" attr(title) ")"; }
- .ir a:after { content: ""; }
- pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
- thead { display: table-header-group; }
- tr, img { page-break-inside: avoid; }
- @page { margin: 0.5cm; }
- p, h2, h3 { orphans: 3; widows: 3; }
- h2, h3{ page-break-after: avoid; }
-}
-
View
Deleted file not rendered
View
@@ -1,28 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- </head>
- <body>
-
- <div id="accordion">
- <div class="templateRow">
- <h3><a href="#" class="shortName"></a></h3>
- <div class="content"></div>
- </div>
- </div>
-
- <ul class='contacts'>
- <li class='contact'>
- <span class='name'>My Name</span>
- <p class='title'>Leet Developer</p>
- </li>
- </ul>
- <script src="js/weld.js" type="text/javascript" charset="utf-8"></script>
- <script src="js/index.js" type="text/javascript" charset="utf-8"></script>
- <script type="text/javascript" charset="utf-8">
- data.games = [{shortName:'some name', content:'some content'},{shortName:'some name', content:'some content'}]
-
- weld(document.querySelector('.templateRow'), data.games);
- </script>
- </body>
-</html>
View
@@ -1,6 +0,0 @@
-
- var data = [{ name: 'hij1nx', title : 'code slayer' },
- { name: 'tmpvar', title : 'code pimp' }];
-
- window.weld(document.querySelector('.contact'), data);
-
Oops, something went wrong.

0 comments on commit 76b9821

Please sign in to comment.