mikekelly / hal-browser

An API browser for the hal+json media type
MIT License
835 stars 157 forks source link

Convert to bower component #32

Open mikekelly opened 10 years ago

mikekelly commented 10 years ago

Convert the project into a bower component.

gagabla commented 10 years ago

Please dont! This is great as is! I just came over from Collection+JSON because i was so frustrated that i was not able to use anything without learning node.js, CoffeeScript and browserify. This is just plain old download-unzip-go, it works, no magic involved, KISS!

Maybe you can provide both, bower for the cool nerds and zip-download for old fashioned guys like me?

(i just came here so see how to tell you that this worked out of the box, couldn't find where to leave comments, and then found this issue ...)

mikekelly commented 10 years ago

I think this is a fair comment. I will make sure if/when we do this that we take a middle ground that can satisfy both approaches

On Mon, Dec 23, 2013 at 12:32 PM, gagabla notifications@github.com wrote:

Please dont! This is great as is! I just came over from Collection+JSON because i was so frustrated that i was not able to use anything without learning node.js, CoffeeScript and browserify. This is just plain old download-unzip-go, it works, no magic involved, KISS http://en.wikipedia.org/wiki/KISS_principle!

Maybe you can provide both, bower for the cool nerds and zip-download for old fashioned guys like me?

(i just came here so see how to tell you that this worked out of the box, couldn't find where to leave comments, and then found this issue ...)

— Reply to this email directly or view it on GitHubhttps://github.com/mikekelly/hal-browser/issues/32#issuecomment-31116784 .

Mike

http://twitter.com/mikekelly85 http://github.com/mikekelly http://linkedin.com/in/mikekelly123

joshco commented 10 years ago

+1 I look at hal-browser as a learning tool for understanding HAL and hypermedia. It's more important to me that it be easy to understand and modify without depending on a bunch of other dependencies or magic than being super efficient or "production ready" If someone is just learning to tie their shoes with HAL + hypermedia, having to learn a bunch of other things, especially if they are not always trivial to set up on various development platforms this can be an obstacle

mdiskin commented 10 years ago

To ease the embedding of these into multiple module war files I did create a simple maven assembly for it. Below is the code I used if you want to release this out to the maven central at some future point.

pom.xml

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <appendAssemblyId>false</appendAssemblyId>
                    <descriptors>
                        <descriptor>src/main/assembly/assembly.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

assembly.xml

<assembly
    xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 "
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd ">

    <includeBaseDirectory>false </includeBaseDirectory>
    <id>hal-browser</id>
    <formats>
        <format>zip</format>
    </formats>
    <fileSets>
        <fileSet>
            <includes>
                <include>README*</include>
                <include>MIT-LICENSE*</include>
                <include>browser.html</include>
                <include>styles.css</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>js</directory>
        </fileSet>
        <fileSet>
            <directory>vendor</directory>
        </fileSet>
    </fileSets>
</assembly>
gregturn commented 9 years ago

For Java folks, you can access this project as a webjar at https://github.com/webjars/hal-browser. That gives you gradle and maven support among other things.

P.S. It's super simple with Spring Boot apps.

But for other projects, adding either a package.json or bower.json would be handy option assuming it doesn't preclude the others.