Permalink
Browse files

update Guard and bookmarklets

  • Loading branch information...
1 parent 603917f commit f29e2153d0c237a7b9d72473847a38ab198f22d6 @cantino committed Jun 3, 2013
View
@@ -2,10 +2,10 @@
# More info at https://github.com/guard/guard#readme
guard 'sprockets', :destination => 'build', :asset_paths => ['lib', 'vendor'] do #, :minify => true do
- watch (%r{^lib/js/.*}) { |m| "lib/js/selectorgadget.js" }
- watch (%r{^lib/css/.*}) { |m| "lib/css/selectorgadget.css.scss" }
+ watch (%r{^lib/js/[^\.].*\.(js|coffee)$}) { |m| "lib/js/selectorgadget_combined.js" }
+ watch (%r{^lib/css/[^\.].*\.(scss|css)$}) { |m| "lib/css/selectorgadget_combined.css" }
end
guard 'sprockets', :destination => 'spec/compiled', :asset_paths => ['spec'] do
- watch (%r{^spec/.*\.(coffee|js)})# { |m| "spec/specs.js" }
+ watch (%r{^spec/[^\.].*\.(coffee|js)})# { |m| "spec/specs.js" }
end
View
@@ -1,6 +1,6 @@
The MIT License
-Copyright (c) 2012 Andrew Cantino
+Copyright (c) 2013 Andrew Cantino
Copyright (c) 2009 Kyle Maxwell
Permission is hereby granted, free of charge, to any person obtaining a copy
View
@@ -1,8 +0,0 @@
-[SelectorGadget](http://www.selectorgadget.com) is an open source bookmarklet that makes CSS selector generation and discovery on complicated sites a breeze.
-
-Please visit [http://www.selectorgadget.com](http://www.selectorgadget.com) to try it out.
-
-= Local Development
-
-We're testing with [http://pivotal.github.com/jasmine/](jasmine) now, so be sure to run `git submodule update --init` after you pull.
-
View
@@ -0,0 +1,23 @@
+# SelectorGadget
+
+[SelectorGadget](http://www.selectorgadget.com) is an open source bookmarklet that makes CSS selector generation and discovery on complicated sites a breeze.
+
+Please visit [http://www.selectorgadget.com](http://www.selectorgadget.com) to try it out.
+
+# Local Development
+
+## Compiling
+
+Start by installing development dependencies with
+
+ bundle
+
+and then run
+
+ guard
+
+to watch and regenerate SelectorGadget's `.coffee` and `.scss` file.
+
+## Testing
+
+SelectorGadget is tested with [http://pivotal.github.com/jasmine/](jasmine). With guard running, open spec/SpecRunner.html in your browser to run the tests. (On a Mac, just do `open spec/SpecRunner.html`)
View
@@ -1,5 +0,0 @@
-# Todo
-
-* Move hosting and use https.
-* Make Chrome extension.
-* Seek a logo.
@@ -202,10 +202,8 @@ div#selectorgadget_main .selectorgadget_wizard #selectorgadget_path_field {
img.selectorgadget_rejected {
border: 5px solid #F00 !important; }
-
img.selectorgadget_suggested {
border: 5px solid #FF5 !important; }
-
img.selectorgadget_selected {
border: 5px solid #0F0 !important; }
File renamed without changes.
@@ -1,5 +1,5 @@
div#selectorgadget_main {
- azimuth: center !important;
+ azimuth: center !important;
background-attachment: scroll !important;
background-image: none !important;
background-position: 0% 0% !important;
@@ -221,16 +221,18 @@ div#selectorgadget_main .selectorgadget_wizard #selectorgadget_path_field {
background-image:none !important;
}
-img.selectorgadget_rejected {
- border:5px solid #F00 !important;
-}
+img {
+ &.selectorgadget_rejected {
+ border:5px solid #F00 !important;
+ }
-img.selectorgadget_suggested {
- border:5px solid #FF5 !important;
-}
+ &.selectorgadget_suggested {
+ border:5px solid #FF5 !important;
+ }
-img.selectorgadget_selected {
- border:5px solid #0F0 !important;
+ &.selectorgadget_selected {
+ border:5px solid #0F0 !important;
+ }
}
#selectorgadget_main.selectorgadget_top {
@@ -260,4 +262,4 @@ img.selectorgadget_selected {
#selectorgadget_main .selectorgadget_selected_option {
text-decoration: underline;
-}
+}
@@ -418,4 +418,4 @@ window.DomPredictionHelper = class DomPredictionHelper
out += expressions[i]
out += ' and ' if i < expressions.length - 1
out += ']' if expressions.length > 0
- out
+ out
File renamed without changes.
@@ -36,13 +36,11 @@ function wait_for_script_load(look_for, callback) {
}
(function(){
- importCSS('https://dv0akt2986vzh.cloudfront.net/unstable/lib/selectorgadget.css.scss');
+ importCSS('https://dv0akt2986vzh.cloudfront.net/unstable/build/selectorgadget_combined.css');
importJS('https://dv0akt2986vzh.cloudfront.net/unstable/vendor/jquery.js', 'jQuery', function() { // Load everything else when it is done.
window.jQuerySG = jQuery.noConflict(true);
importJS('https://dv0akt2986vzh.cloudfront.net/unstable/vendor/diff/diff_match_patch.js', 'diff_match_patch', function() {
- importJS('https://dv0akt2986vzh.cloudfront.net/unstable/lib/dom.js', 'DomPredictionHelper', function() {
- importJS('https://dv0akt2986vzh.cloudfront.net/unstable/lib/core.js');
- });
+ importJS('https://dv0akt2986vzh.cloudfront.net/unstable/build/selectorgadget_combined.js');
});
});
})();
@@ -13,8 +13,8 @@
window.jQuerySG = jQuery.noConflict(true);
</script>
- <script type="text/javascript" src="../build/selectorgadget.js"></script>
- <link rel="stylesheet" type="text/css" href="../build/selectorgadget.css">
+ <script type="text/javascript" src="../build/selectorgadget_combined.js"></script>
+ <link rel="stylesheet" type="text/css" href="../build/selectorgadget_combined.css">
<!-- include spec files here... -->
<script type="text/javascript" src="compiled/spec-helper.js"></script>
@@ -76,4 +76,4 @@ describe "SelectorGadget wizard features", ->
expect(sg.handleSkipIfs(struct.cards[1], struct)).toEqual(struct.cards[2])
struct.cards[2].skip_if = (json) -> json.selectors.card2
- expect(sg.handleSkipIfs(struct.cards[1], struct)).toEqual(struct.cards[3])
+ expect(sg.handleSkipIfs(struct.cards[1], struct)).toEqual(struct.cards[3])

0 comments on commit f29e215

Please sign in to comment.