Permalink
Browse files

init

  • Loading branch information...
0 parents commit 8383bfa7ede97eb7effb9f9c9fe861182807e0dc @jamesward committed Jun 15, 2012
Showing with 94 additions and 0 deletions.
  1. +3 −0 .gitignore
  2. +27 −0 README.md
  3. +64 −0 pom.xml
@@ -0,0 +1,3 @@
+/target
+/*.iml
+/.idea
@@ -0,0 +1,27 @@
+github-files
+------------
+
+A simple jQuery plugin that pulls a file from github.com and returns it.
+
+This uses the public GitHub API (v3) over JSONP to pull a raw file from GitHub.
+
+API:
+
+ $.getGithubFile(user, repo, sha, callback, startLineNum, endLineNum)
+
+Examples:
+
+ // fetch this README.md file and return all of the lines
+ $.getGithubFile("jamesward", "github-files", "", function(contents) {
+ console.log(contents)
+ });
+
+ // fetch this README.md file and return all of the lines beginning with line 6
+ $.getGithubFile("jamesward", "github-files", "", function(contents) {
+ console.log(contents)
+ }, 6);
+
+ // fetch this README.md file and return lines 6 - 15
+ $.getGithubFile("jamesward", "github-files", "", function(contents) {
+ console.log(contents)
+ }, 6, 15);
64 pom.xml
@@ -0,0 +1,64 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>com.jamesward</groupId>
+ <artifactId>github-files</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+
+ <name>github-files</name>
+ <url>http://github.com/jamesward/github-files</url>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.jquery</groupId>
+ <artifactId>jquery</artifactId>
+ <version>1.7.2-1</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+
+ <resources>
+ <resource>
+ <directory>src/main/javascript</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+
+ <plugins>
+ <plugin>
+ <groupId>com.github.searls</groupId>
+ <artifactId>jasmine-maven-plugin</artifactId>
+ <version>1.1.0</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <preloadSources>
+ <source>/jquery/jquery-1.6.2.min.js</source> <!-- todo: pull from webjar -->>
+ </preloadSources>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>net.alchim31.maven</groupId>
+ <artifactId>yuicompressor-maven-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+ <execution>
+ <id>compress-js</id>
+ <goals>
+ <goal>compress</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+
+ </build>
+
+</project>

0 comments on commit 8383bfa

Please sign in to comment.