Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

work on package.json and related enchancements for npm packaging, etc.

  • Loading branch information...
commit 5cb88e41141da311a97cc34a0727b8153a3ae6a5 1 parent 43ab1d1
Michael Bradley authored May 04, 2013
10  .gitignore
@@ -2,11 +2,17 @@
2 2
 *jar
3 3
 /lib
4 4
 /classes
  5
+/target
5 6
 /native
6 7
 /.lein-failures
7 8
 /checkouts
8 9
 /.lein-deps-sum
9 10
 .lein*
10  
-mori.js
  11
+mori*.js
  12
+!/spec/mori*.js
  13
+tmp.js
11 14
 *.swp
12  
-_site
  15
+.#*
  16
+_site
  17
+node_modules
  18
+npm-debug.log
25  .npmignore
... ...
@@ -0,0 +1,25 @@
  1
+/pom.xml
  2
+*jar
  3
+/lib
  4
+/classes
  5
+/target
  6
+/native
  7
+/.lein-failures
  8
+/checkouts
  9
+/.lein-deps-sum
  10
+.lein*
  11
+mori-min.js
  12
+tmp.js
  13
+*.swp
  14
+.#*
  15
+_site
  16
+node_modules
  17
+npm-debug.log
  18
+
  19
+bin
  20
+scripts
  21
+spec
  22
+src
  23
+.npmignore
  24
+.travis.yml
  25
+project.clj
7  .travis.yml
... ...
@@ -0,0 +1,7 @@
  1
+language: node_js
  2
+branches:
  3
+  only:
  4
+    - master
  5
+node_js:
  6
+  - 0.10
  7
+before_script: "npm run-script build"
313  bin/lein
... ...
@@ -0,0 +1,313 @@
  1
+#!/usr/bin/env bash
  2
+
  3
+# Ensure this file is executable via `chmod a+x lein`, then place it
  4
+# somewhere on your $PATH, like ~/bin. The rest of Leiningen will be
  5
+# installed upon first run into the ~/.lein/self-installs directory.
  6
+
  7
+export LEIN_VERSION="2.1.3"
  8
+
  9
+case $LEIN_VERSION in
  10
+    *SNAPSHOT) SNAPSHOT="YES" ;;
  11
+    *) SNAPSHOT="NO" ;;
  12
+esac
  13
+
  14
+if [[ "$OSTYPE" == "cygwin" ]] || [[ "$OSTYPE" == "msys" ]]; then
  15
+    delimiter=";"
  16
+else
  17
+    delimiter=":"
  18
+fi
  19
+
  20
+function make_native_path {
  21
+    # ensure we have native paths
  22
+    if [[ "$OSTYPE" == "cygwin" && "$1"  == /* ]]; then
  23
+    echo -n "$(cygpath -wp "$1")"
  24
+    elif [[ "$OSTYPE" == "msys" && "$1"  == /* ]]; then
  25
+    echo -n "$(sh -c "(cd $1 2</dev/null && pwd -W) || echo $1 | sed 's/^\\/\([a-z]\)/\\1:/g'")"
  26
+    else
  27
+    echo -n "$1"
  28
+    fi
  29
+}
  30
+
  31
+#  usage : add_path PATH_VAR [PATH]...
  32
+function add_path {
  33
+    local path_var="$1"
  34
+    shift
  35
+    while [ -n "$1" ];do
  36
+        # http://bashify.com/?Useful_Techniques:Indirect_Variables:Indirect_Assignment
  37
+    export ${path_var}="${!path_var}${delimiter}$(make_native_path "$1")"
  38
+    shift
  39
+    done
  40
+}
  41
+
  42
+if [ `id -u` -eq 0 ] && [ "$LEIN_ROOT" = "" ]; then
  43
+    echo "WARNING: You're currently running as root; probably by accident."
  44
+    echo "Press control-C to abort or Enter to continue as root."
  45
+    echo "Set LEIN_ROOT to disable this warning."
  46
+    read _
  47
+fi
  48
+
  49
+NOT_FOUND=1
  50
+ORIGINAL_PWD="$PWD"
  51
+while [ ! -r "$PWD/project.clj" ] && [ "$PWD" != "/" ] && [ $NOT_FOUND -ne 0 ]
  52
+do
  53
+    cd ..
  54
+    if [ "$(dirname "$PWD")" = "/" ]; then
  55
+        NOT_FOUND=0
  56
+        cd "$ORIGINAL_PWD"
  57
+    fi
  58
+done
  59
+
  60
+export LEIN_HOME="${LEIN_HOME:-"$HOME/.lein"}"
  61
+
  62
+for f in "$LEIN_HOME/leinrc" ".leinrc"; do
  63
+  if [ -e "$f" ]; then
  64
+    source "$f"
  65
+  fi
  66
+done
  67
+
  68
+if [ "$OSTYPE" = "cygwin" ]; then
  69
+    export LEIN_HOME=`cygpath -w "$LEIN_HOME"`
  70
+fi
  71
+
  72
+LEIN_JAR="$LEIN_HOME/self-installs/leiningen-$LEIN_VERSION-standalone.jar"
  73
+
  74
+# normalize $0 on certain BSDs
  75
+if [ "$(dirname "$0")" = "." ]; then
  76
+    SCRIPT="$(which $(basename "$0"))"
  77
+else
  78
+    SCRIPT="$0"
  79
+fi
  80
+
  81
+# resolve symlinks to the script itself portably
  82
+while [ -h "$SCRIPT" ] ; do
  83
+    ls=`ls -ld "$SCRIPT"`
  84
+    link=`expr "$ls" : '.*-> \(.*\)$'`
  85
+    if expr "$link" : '/.*' > /dev/null; then
  86
+        SCRIPT="$link"
  87
+    else
  88
+        SCRIPT="$(dirname "$SCRIPT"$)/$link"
  89
+    fi
  90
+done
  91
+
  92
+BIN_DIR="$(dirname "$SCRIPT")"
  93
+
  94
+export LEIN_JVM_OPTS="${LEIN_JVM_OPTS-"-XX:+TieredCompilation -XX:TieredStopAtLevel=1"}"
  95
+
  96
+# When :eval-in :classloader we need more memory
  97
+grep -E -q '^\s*:eval-in\s+:classloader\s*$' project.clj 2> /dev/null && \
  98
+    export LEIN_JVM_OPTS="$LEIN_JVM_OPTS -Xms64m -Xmx512m"
  99
+
  100
+if [ -r "$BIN_DIR/../src/leiningen/version.clj" ]; then
  101
+    # Running from source checkout
  102
+    LEIN_DIR="$(dirname "$BIN_DIR")"
  103
+
  104
+    # Need to use lein release to bootstrap the leiningen-core library (for aether)
  105
+    if [ ! -r "$LEIN_DIR/leiningen-core/.lein-bootstrap" ]; then
  106
+        echo "Leiningen is missing its dependencies."
  107
+        echo "Please run \"lein bootstrap\" in the leiningen-core/ directory"
  108
+        echo "with a stable release of Leiningen. See CONTRIBUTING.md for details."
  109
+        exit 1
  110
+    fi
  111
+
  112
+    # If project.clj for lein or leiningen-core changes, we must recalculate
  113
+    LAST_PROJECT_CHECKSUM=$(cat "$LEIN_DIR/.lein-project-checksum" 2> /dev/null)
  114
+    PROJECT_CHECKSUM=$(sum "$LEIN_DIR/project.clj" "$LEIN_DIR/leiningen-core/project.clj")
  115
+    if [ "$PROJECT_CHECKSUM" != "$LAST_PROJECT_CHECKSUM" ]; then
  116
+        if [ -r "$LEIN_DIR/.lein-classpath" ]; then
  117
+            rm "$LEIN_DIR/.lein-classpath"
  118
+        fi
  119
+    fi
  120
+
  121
+    # Use bin/lein to calculate its own classpath.
  122
+    if [ ! -r "$LEIN_DIR/.lein-classpath" ] && [ "$1" != "classpath" ]; then
  123
+        echo "Recalculating Leiningen's classpath."
  124
+        ORIG_PWD="$PWD"
  125
+        cd "$LEIN_DIR"
  126
+
  127
+        $0 classpath .lein-classpath
  128
+        sum "$LEIN_DIR/project.clj" "$LEIN_DIR/leiningen-core/project.clj" > \
  129
+            .lein-project-checksum
  130
+        cd "$ORIG_PWD"
  131
+    fi
  132
+
  133
+    mkdir -p "$LEIN_DIR/target/classes"
  134
+    export LEIN_JVM_OPTS="$LEIN_JVM_OPTS -Dclojure.compile.path=$LEIN_DIR/target/classes"
  135
+    add_path CLASSPATH "$LEIN_DIR/leiningen-core/src/" "$LEIN_DIR/leiningen-core/resources/" \
  136
+        "$LEIN_DIR/test:$LEIN_DIR/target/classes" "$LEIN_DIR/src" ":$LEIN_DIR/resources"
  137
+
  138
+    if [ -r "$LEIN_DIR/.lein-classpath" ]; then
  139
+        add_path CLASSPATH "$(cat "$LEIN_DIR/.lein-classpath" 2> /dev/null)"
  140
+    else
  141
+        add_path CLASSPATH "$(cat "$LEIN_DIR/leiningen-core/.lein-bootstrap" 2> /dev/null)"
  142
+    fi
  143
+else # Not running from a checkout
  144
+    add_path CLASSPATH "$LEIN_JAR"
  145
+
  146
+    BOOTCLASSPATH="-Xbootclasspath/a:$LEIN_JAR"
  147
+
  148
+    if [ ! -r "$LEIN_JAR" -a "$1" != "self-install" ]; then
  149
+        "$0" self-install
  150
+    fi
  151
+fi
  152
+
  153
+if [ "$HTTP_CLIENT" = "" ]; then
  154
+    if type -p curl >/dev/null 2>&1; then
  155
+        if [ "$https_proxy" != "" ]; then
  156
+            CURL_PROXY="-x $https_proxy"
  157
+        fi
  158
+        HTTP_CLIENT="curl $CURL_PROXY -f -L -o"
  159
+    else
  160
+        HTTP_CLIENT="wget -O"
  161
+    fi
  162
+fi
  163
+
  164
+function download_failed_message {
  165
+    echo "Failed to download $1"
  166
+    echo "It's possible your HTTP client's certificate store does not have the"
  167
+    echo "correct certificate authority needed. This is often caused by an"
  168
+    echo "out-of-date version of libssl. Either upgrade it or set HTTP_CLIENT"
  169
+    echo "to turn off certificate checks:"
  170
+    echo "  export HTTP_CLIENT=\"wget --no-check-certificate -O\" # or"
  171
+    echo "  export HTTP_CLIENT=\"curl --insecure -f -L -o\""
  172
+    echo "It's also possible that you're behind a firewall haven't yet"
  173
+    echo "set HTTP_PROXY and HTTPS_PROXY."
  174
+}
  175
+
  176
+# TODO: explain what to do when Java is missing
  177
+export JAVA_CMD="${JAVA_CMD:-"java"}"
  178
+export LEIN_JAVA_CMD="${LEIN_JAVA_CMD:-$JAVA_CMD}"
  179
+
  180
+if [[ "$(basename "$LEIN_JAVA_CMD")" == *drip* ]]; then
  181
+    export DRIP_INIT="$(printf -- '-e\n(require (quote leiningen.repl))')"
  182
+fi
  183
+
  184
+# Support $JAVA_OPTS for backwards-compatibility.
  185
+export JVM_OPTS="${JVM_OPTS:-"$JAVA_OPTS"}"
  186
+
  187
+# TODO: investigate http://skife.org/java/unix/2011/06/20/really_executable_jars.html
  188
+# If you're packaging this for a package manager (.deb, homebrew, etc)
  189
+# you need to remove the self-install and upgrade functionality or see lein-pkg.
  190
+if [ "$1" = "self-install" ]; then
  191
+    if [ -r "$BIN_DIR/../src/leiningen/version.clj" ]; then
  192
+        echo "Running self-install from a checkout is not supported."
  193
+        echo "See CONTRIBUTING.md for SNAPSHOT-specific build instructions."
  194
+        exit 1
  195
+    elif [ -r "$LEIN_JAR" ]; then
  196
+      echo "The self-install jar already exists at $LEIN_JAR."
  197
+      echo "If you wish to re-download, delete it and rerun \"$0 self-install\"."
  198
+      exit 1
  199
+    fi
  200
+    echo "Downloading Leiningen to $LEIN_JAR now..."
  201
+    mkdir -p "$(dirname "$LEIN_JAR")"
  202
+    LEIN_URL="https://leiningen.s3.amazonaws.com/downloads/leiningen-$LEIN_VERSION-standalone.jar"
  203
+    $HTTP_CLIENT "$LEIN_JAR.pending" "$LEIN_URL"
  204
+    if [ $? == 0 ]; then
  205
+        # TODO: checksum
  206
+        mv -f "$LEIN_JAR.pending" "$LEIN_JAR"
  207
+    else
  208
+        rm "$LEIN_JAR.pending" 2> /dev/null
  209
+        download_failed_message "$LEIN_URL"
  210
+        exit 1
  211
+    fi
  212
+elif [ "$1" = "upgrade" ]; then
  213
+    if [ "$LEIN_DIR" != "" ]; then
  214
+        echo "The upgrade task is not meant to be run from a checkout."
  215
+        exit 1
  216
+    fi
  217
+    if [ $SNAPSHOT = "YES" ]; then
  218
+        echo "The upgrade task is only meant for stable releases."
  219
+        echo "See the \"Hacking\" section of the README."
  220
+        exit 1
  221
+    fi
  222
+    if [ ! -w "$SCRIPT" ]; then
  223
+        echo "You do not have permission to upgrade the installation in $SCRIPT"
  224
+        exit 1
  225
+    else
  226
+        TARGET_VERSION="${2:-stable}"
  227
+        echo "The script at $SCRIPT will be upgraded to the latest $TARGET_VERSION version."
  228
+        echo -n "Do you want to continue [Y/n]? "
  229
+        read RESP
  230
+        case "$RESP" in
  231
+            y|Y|"")
  232
+                echo
  233
+                echo "Upgrading..."
  234
+                TARGET="/tmp/lein-$$-upgrade"
  235
+                if [ "$OSTYPE" = "cygwin" ]; then
  236
+                    TARGET=`cygpath -w $TARGET`
  237
+                fi
  238
+                LEIN_SCRIPT_URL="https://github.com/technomancy/leiningen/raw/$TARGET_VERSION/bin/lein"
  239
+                $HTTP_CLIENT "$TARGET" "$LEIN_SCRIPT_URL"
  240
+                if [ $? == 0 ]; then
  241
+                    mv "$TARGET" "$SCRIPT" \
  242
+                        && chmod +x "$SCRIPT" \
  243
+                        && echo && "$SCRIPT" self-install \
  244
+                        && echo && echo "Now running" `$SCRIPT version`
  245
+                    exit $?
  246
+                else
  247
+                    download_failed_message "$LEIN_SCRIPT_URL"
  248
+                fi;;
  249
+            *)
  250
+                echo "Aborted."
  251
+                exit 1;;
  252
+        esac
  253
+    fi
  254
+else
  255
+    if [ "$OSTYPE" = "cygwin" ]; then
  256
+        # When running on Cygwin, use Windows-style paths for java
  257
+        ORIGINAL_PWD=`cygpath -w "$ORIGINAL_PWD"`
  258
+    fi
  259
+
  260
+    # apply context specific CLASSPATH entries
  261
+    if [ -f .lein-classpath ]; then
  262
+        add_path CLASSPATH "$(cat .lein-classpath)"
  263
+    fi
  264
+
  265
+    if [ $DEBUG ]; then
  266
+        echo "Leiningen's classpath: $CLASSPATH"
  267
+    fi
  268
+
  269
+    if ([ "$LEIN_FAST_TRAMPOLINE" != "" ] || [ -r .lein-fast-trampoline ]) &&
  270
+        [ -r project.clj ]; then
  271
+        INPUTS="$@ $(cat project.clj) $LEIN_VERSION $(test -f "$LEIN_HOME/profiles.clj" && cat "$LEIN_HOME/profiles.clj")"
  272
+        INPUT_CHECKSUM=$(echo $INPUTS | shasum - | cut -f 1 -d " ")
  273
+        # Just don't change :target-path in project.clj, mkay?
  274
+        TRAMPOLINE_FILE="target/trampolines/$INPUT_CHECKSUM"
  275
+    else
  276
+        TRAMPOLINE_FILE="/tmp/lein-trampoline-$$"
  277
+        trap "rm -f $TRAMPOLINE_FILE" EXIT
  278
+    fi
  279
+
  280
+    if [ "$OSTYPE" = "cygwin" ]; then
  281
+        TRAMPOLINE_FILE=`cygpath -w $TRAMPOLINE_FILE`
  282
+    fi
  283
+
  284
+    if [ "$INPUT_CHECKSUM" != "" ] && [ -r "$TRAMPOLINE_FILE" ]; then
  285
+        if [ $DEBUG ]; then
  286
+            echo "Fast trampoline with $TRAMPOLINE_FILE."
  287
+        fi
  288
+        exec sh -c "exec $(cat $TRAMPOLINE_FILE)"
  289
+    else
  290
+        export TRAMPOLINE_FILE
  291
+        "$LEIN_JAVA_CMD" -client \
  292
+            "${BOOTCLASSPATH[@]}" \
  293
+            $LEIN_JVM_OPTS \
  294
+            -Dfile.encoding=UTF-8 \
  295
+            -Dmaven.wagon.http.ssl.easy=false \
  296
+            -Dleiningen.original.pwd="$ORIGINAL_PWD" \
  297
+            -Dleiningen.script="$SCRIPT" \
  298
+            -classpath "$CLASSPATH" \
  299
+            clojure.main -m leiningen.core.main "$@"
  300
+
  301
+        EXIT_CODE=$?
  302
+
  303
+        if [ -r "$TRAMPOLINE_FILE" ] && [ "$LEIN_TRAMPOLINE_WARMUP" = "" ]; then
  304
+            TRAMPOLINE="$(cat $TRAMPOLINE_FILE)"
  305
+            if [ "$INPUT_CHECKSUM" = "" ]; then
  306
+                rm $TRAMPOLINE_FILE
  307
+            fi
  308
+            exec sh -c "exec $TRAMPOLINE"
  309
+        else
  310
+            exit $EXIT_CODE
  311
+        fi
  312
+    fi
  313
+fi
261  epl-v10.html
... ...
@@ -0,0 +1,261 @@
  1
+<?xml version="1.0" encoding="ISO-8859-1" ?>
  2
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3
+<html xmlns="http://www.w3.org/1999/xhtml">
  4
+
  5
+<head>
  6
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
  7
+<title>Eclipse Public License - Version 1.0</title>
  8
+<style type="text/css">
  9
+  body {
  10
+    size: 8.5in 11.0in;
  11
+    margin: 0.25in 0.5in 0.25in 0.5in;
  12
+    tab-interval: 0.5in;
  13
+    }
  14
+  p {  	
  15
+    margin-left: auto;
  16
+    margin-top:  0.5em;
  17
+    margin-bottom: 0.5em;
  18
+    }
  19
+  p.list {
  20
+  	margin-left: 0.5in;
  21
+    margin-top:  0.05em;
  22
+    margin-bottom: 0.05em;
  23
+    }
  24
+  </style>
  25
+
  26
+</head>
  27
+
  28
+<body lang="EN-US">
  29
+
  30
+<h2>Eclipse Public License - v 1.0</h2>
  31
+
  32
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
  33
+PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE, REPRODUCTION OR
  34
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
  35
+AGREEMENT.</p>
  36
+
  37
+<p><b>1. DEFINITIONS</b></p>
  38
+
  39
+<p>&quot;Contribution&quot; means:</p>
  40
+
  41
+<p class="list">a) in the case of the initial Contributor, the initial
  42
+code and documentation distributed under this Agreement, and</p>
  43
+<p class="list">b) in the case of each subsequent Contributor:</p>
  44
+<p class="list">i) changes to the Program, and</p>
  45
+<p class="list">ii) additions to the Program;</p>
  46
+<p class="list">where such changes and/or additions to the Program
  47
+originate from and are distributed by that particular Contributor. A
  48
+Contribution 'originates' from a Contributor if it was added to the
  49
+Program by such Contributor itself or anyone acting on such
  50
+Contributor's behalf. Contributions do not include additions to the
  51
+Program which: (i) are separate modules of software distributed in
  52
+conjunction with the Program under their own license agreement, and (ii)
  53
+are not derivative works of the Program.</p>
  54
+
  55
+<p>&quot;Contributor&quot; means any person or entity that distributes
  56
+the Program.</p>
  57
+
  58
+<p>&quot;Licensed Patents&quot; mean patent claims licensable by a
  59
+Contributor which are necessarily infringed by the use or sale of its
  60
+Contribution alone or when combined with the Program.</p>
  61
+
  62
+<p>&quot;Program&quot; means the Contributions distributed in accordance
  63
+with this Agreement.</p>
  64
+
  65
+<p>&quot;Recipient&quot; means anyone who receives the Program under
  66
+this Agreement, including all Contributors.</p>
  67
+
  68
+<p><b>2. GRANT OF RIGHTS</b></p>
  69
+
  70
+<p class="list">a) Subject to the terms of this Agreement, each
  71
+Contributor hereby grants Recipient a non-exclusive, worldwide,
  72
+royalty-free copyright license to reproduce, prepare derivative works
  73
+of, publicly display, publicly perform, distribute and sublicense the
  74
+Contribution of such Contributor, if any, and such derivative works, in
  75
+source code and object code form.</p>
  76
+
  77
+<p class="list">b) Subject to the terms of this Agreement, each
  78
+Contributor hereby grants Recipient a non-exclusive, worldwide,
  79
+royalty-free patent license under Licensed Patents to make, use, sell,
  80
+offer to sell, import and otherwise transfer the Contribution of such
  81
+Contributor, if any, in source code and object code form. This patent
  82
+license shall apply to the combination of the Contribution and the
  83
+Program if, at the time the Contribution is added by the Contributor,
  84
+such addition of the Contribution causes such combination to be covered
  85
+by the Licensed Patents. The patent license shall not apply to any other
  86
+combinations which include the Contribution. No hardware per se is
  87
+licensed hereunder.</p>
  88
+
  89
+<p class="list">c) Recipient understands that although each Contributor
  90
+grants the licenses to its Contributions set forth herein, no assurances
  91
+are provided by any Contributor that the Program does not infringe the
  92
+patent or other intellectual property rights of any other entity. Each
  93
+Contributor disclaims any liability to Recipient for claims brought by
  94
+any other entity based on infringement of intellectual property rights
  95
+or otherwise. As a condition to exercising the rights and licenses
  96
+granted hereunder, each Recipient hereby assumes sole responsibility to
  97
+secure any other intellectual property rights needed, if any. For
  98
+example, if a third party patent license is required to allow Recipient
  99
+to distribute the Program, it is Recipient's responsibility to acquire
  100
+that license before distributing the Program.</p>
  101
+
  102
+<p class="list">d) Each Contributor represents that to its knowledge it
  103
+has sufficient copyright rights in its Contribution, if any, to grant
  104
+the copyright license set forth in this Agreement.</p>
  105
+
  106
+<p><b>3. REQUIREMENTS</b></p>
  107
+
  108
+<p>A Contributor may choose to distribute the Program in object code
  109
+form under its own license agreement, provided that:</p>
  110
+
  111
+<p class="list">a) it complies with the terms and conditions of this
  112
+Agreement; and</p>
  113
+
  114
+<p class="list">b) its license agreement:</p>
  115
+
  116
+<p class="list">i) effectively disclaims on behalf of all Contributors
  117
+all warranties and conditions, express and implied, including warranties
  118
+or conditions of title and non-infringement, and implied warranties or
  119
+conditions of merchantability and fitness for a particular purpose;</p>
  120
+
  121
+<p class="list">ii) effectively excludes on behalf of all Contributors
  122
+all liability for damages, including direct, indirect, special,
  123
+incidental and consequential damages, such as lost profits;</p>
  124
+
  125
+<p class="list">iii) states that any provisions which differ from this
  126
+Agreement are offered by that Contributor alone and not by any other
  127
+party; and</p>
  128
+
  129
+<p class="list">iv) states that source code for the Program is available
  130
+from such Contributor, and informs licensees how to obtain it in a
  131
+reasonable manner on or through a medium customarily used for software
  132
+exchange.</p>
  133
+
  134
+<p>When the Program is made available in source code form:</p>
  135
+
  136
+<p class="list">a) it must be made available under this Agreement; and</p>
  137
+
  138
+<p class="list">b) a copy of this Agreement must be included with each
  139
+copy of the Program.</p>
  140
+
  141
+<p>Contributors may not remove or alter any copyright notices contained
  142
+within the Program.</p>
  143
+
  144
+<p>Each Contributor must identify itself as the originator of its
  145
+Contribution, if any, in a manner that reasonably allows subsequent
  146
+Recipients to identify the originator of the Contribution.</p>
  147
+
  148
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
  149
+
  150
+<p>Commercial distributors of software may accept certain
  151
+responsibilities with respect to end users, business partners and the
  152
+like. While this license is intended to facilitate the commercial use of
  153
+the Program, the Contributor who includes the Program in a commercial
  154
+product offering should do so in a manner which does not create
  155
+potential liability for other Contributors. Therefore, if a Contributor
  156
+includes the Program in a commercial product offering, such Contributor
  157
+(&quot;Commercial Contributor&quot;) hereby agrees to defend and
  158
+indemnify every other Contributor (&quot;Indemnified Contributor&quot;)
  159
+against any losses, damages and costs (collectively &quot;Losses&quot;)
  160
+arising from claims, lawsuits and other legal actions brought by a third
  161
+party against the Indemnified Contributor to the extent caused by the
  162
+acts or omissions of such Commercial Contributor in connection with its
  163
+distribution of the Program in a commercial product offering. The
  164
+obligations in this section do not apply to any claims or Losses
  165
+relating to any actual or alleged intellectual property infringement. In
  166
+order to qualify, an Indemnified Contributor must: a) promptly notify
  167
+the Commercial Contributor in writing of such claim, and b) allow the
  168
+Commercial Contributor to control, and cooperate with the Commercial
  169
+Contributor in, the defense and any related settlement negotiations. The
  170
+Indemnified Contributor may participate in any such claim at its own
  171
+expense.</p>
  172
+
  173
+<p>For example, a Contributor might include the Program in a commercial
  174
+product offering, Product X. That Contributor is then a Commercial
  175
+Contributor. If that Commercial Contributor then makes performance
  176
+claims, or offers warranties related to Product X, those performance
  177
+claims and warranties are such Commercial Contributor's responsibility
  178
+alone. Under this section, the Commercial Contributor would have to
  179
+defend claims against the other Contributors related to those
  180
+performance claims and warranties, and if a court requires any other
  181
+Contributor to pay any damages as a result, the Commercial Contributor
  182
+must pay those damages.</p>
  183
+
  184
+<p><b>5. NO WARRANTY</b></p>
  185
+
  186
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
  187
+PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS
  188
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
  189
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
  190
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
  191
+responsible for determining the appropriateness of using and
  192
+distributing the Program and assumes all risks associated with its
  193
+exercise of rights under this Agreement , including but not limited to
  194
+the risks and costs of program errors, compliance with applicable laws,
  195
+damage to or loss of data, programs or equipment, and unavailability or
  196
+interruption of operations.</p>
  197
+
  198
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
  199
+
  200
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
  201
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
  202
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
  203
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
  204
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  205
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
  206
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
  207
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
  208
+
  209
+<p><b>7. GENERAL</b></p>
  210
+
  211
+<p>If any provision of this Agreement is invalid or unenforceable under
  212
+applicable law, it shall not affect the validity or enforceability of
  213
+the remainder of the terms of this Agreement, and without further action
  214
+by the parties hereto, such provision shall be reformed to the minimum
  215
+extent necessary to make such provision valid and enforceable.</p>
  216
+
  217
+<p>If Recipient institutes patent litigation against any entity
  218
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
  219
+Program itself (excluding combinations of the Program with other
  220
+software or hardware) infringes such Recipient's patent(s), then such
  221
+Recipient's rights granted under Section 2(b) shall terminate as of the
  222
+date such litigation is filed.</p>
  223
+
  224
+<p>All Recipient's rights under this Agreement shall terminate if it
  225
+fails to comply with any of the material terms or conditions of this
  226
+Agreement and does not cure such failure in a reasonable period of time
  227
+after becoming aware of such noncompliance. If all Recipient's rights
  228
+under this Agreement terminate, Recipient agrees to cease use and
  229
+distribution of the Program as soon as reasonably practicable. However,
  230
+Recipient's obligations under this Agreement and any licenses granted by
  231
+Recipient relating to the Program shall continue and survive.</p>
  232
+
  233
+<p>Everyone is permitted to copy and distribute copies of this
  234
+Agreement, but in order to avoid inconsistency the Agreement is
  235
+copyrighted and may only be modified in the following manner. The
  236
+Agreement Steward reserves the right to publish new versions (including
  237
+revisions) of this Agreement from time to time. No one other than the
  238
+Agreement Steward has the right to modify this Agreement. The Eclipse
  239
+Foundation is the initial Agreement Steward. The Eclipse Foundation may
  240
+assign the responsibility to serve as the Agreement Steward to a
  241
+suitable separate entity. Each new version of the Agreement will be
  242
+given a distinguishing version number. The Program (including
  243
+Contributions) may always be distributed subject to the version of the
  244
+Agreement under which it was received. In addition, after a new version
  245
+of the Agreement is published, Contributor may elect to distribute the
  246
+Program (including its Contributions) under the new version. Except as
  247
+expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
  248
+rights or licenses to the intellectual property of any Contributor under
  249
+this Agreement, whether expressly, by implication, estoppel or
  250
+otherwise. All rights in the Program not expressly granted under this
  251
+Agreement are reserved.</p>
  252
+
  253
+<p>This Agreement is governed by the laws of the State of New York and
  254
+the intellectual property laws of the United States of America. No party
  255
+to this Agreement will bring a legal action under this Agreement more
  256
+than one year after the cause of action arose. Each party waives its
  257
+rights to a jury trial in any resulting litigation.</p>
  258
+
  259
+</body>
  260
+
  261
+</html>
49  package.json
... ...
@@ -1,25 +1,46 @@
1 1
 {
2 2
   "name": "mori",
3  
-  "version": "0.1.0",
  3
+  "version": "0.2.0-snapshot",
4 4
   "description": "Persistent Data Structures for JavaScript",
5  
-  "keywords": [ "data", "structure", "persistent", "clojure", "map", "filter", "reduce" ],
  5
+  "homepage": "https://github.com/swannodette/mori",
6 6
   "author": "David Nolen",
7  
-  "homepage": "http://github.com/swannodette/mori",
  7
+  "keywords": [
  8
+    "data",
  9
+    "structure",
  10
+    "persistent",
  11
+    "clojure",
  12
+    "clojurescript",
  13
+    "map",
  14
+    "filter",
  15
+    "reduce"
  16
+  ],
  17
+  "bugs": {
  18
+    "url": "https://github.com/swannodette/mori/issues"
  19
+  },
  20
+  "licenses": [
  21
+    {
  22
+      "type": "EPL",
  23
+      "url": "https://raw.github.com/swannodette/mori/master/epl-v10.html"
  24
+    }
  25
+  ],
  26
+  "main": "./mori.node.js",
8 27
   "repository": {
9 28
     "type": "git",
10  
-    "url": "http://github.com/swannodette/mori.git",
11  
-    "web": "http://github.com/swannodette/mori"
  29
+    "url": "git://github.com/swannodette/mori.git"
12 30
   },
13  
-  "bugs": {
14  
-    "url": "http://github.com/swannodette/mori/issues"
  31
+  "engines": {
  32
+      "node": ">=0.10.0"
  33
+  },
  34
+  "dependencies": {},
  35
+  "devDependencies": {
  36
+    "jasmine-node": "1.7.0"
15 37
   },
16  
-  "main": "./mori.node.js",
17 38
   "scripts": {
18  
-    "build": "lein deps && lein cljsbuild once release && echo ';module.exports = this.mori;\n' | cat mori.js - > mori.node.js",
19  
-    "prepublish": "lein deps && lein cljsbuild once release && echo ';module.exports = this.mori;\n' | cat mori.js - > mori.node.js"
  39
+    "build": "./bin/lein deps && ./bin/lein cljsbuild once release && echo ';module.exports = this.mori;\n' | cat mori-min.js - > mori.node.js",
  40
+    "prepublish": "./bin/lein deps && ./bin/lein cljsbuild once release && echo ';module.exports = this.mori;\n' | cat mori-min.js - > mori.node.js",
  41
+    "test": "jasmine-node spec"
20 42
   },
21  
-  "licenses": [{
22  
-    "type" : "ELP",
23  
-    "url" : "http://www.eclipse.org/legal/epl-v10.html"
24  
-  }]
  43
+  "directories": {
  44
+      "test": "./spec"
  45
+  }
25 46
 }
8  spec/mori-spec.js
... ...
@@ -0,0 +1,8 @@
  1
+var mori = require("../");
  2
+
  3
+describe("A suite", function() {
  4
+    it("contains spec with an expectation", function() {
  5
+        // will fail
  6
+	expect(true).toBe(false);
  7
+    });
  8
+});

0 notes on commit 5cb88e4

Please sign in to comment.
Something went wrong with that request. Please try again.