Browse Source

Front matter

Steven Silvester 9 years ago
commit
2828380356
11 changed files with 224 additions and 0 deletions
  1. 12 0
      .gitignore
  2. 15 0
      .travis.yml
  3. 5 0
      CONTRIBUTING.md
  4. 28 0
      LICENSE
  5. 104 0
      README.md
  6. 2 0
      scripts/copycss.js
  7. 2 0
      scripts/copythemecss.js
  8. 14 0
      scripts/tdoptions.json
  9. 17 0
      scripts/travis_after_success.sh
  10. 13 0
      scripts/travis_install.sh
  11. 12 0
      scripts/travis_script.sh

+ 12 - 0
.gitignore

@@ -0,0 +1,12 @@
+*.suo
+*.user
+.DS_Store
+node_modules
+npm-debug.log
+test/build
+test/coverage
+lib/
+example/build
+docs
+
+.ipynb_checkpoints

+ 15 - 0
.travis.yml

@@ -0,0 +1,15 @@
+language: node_js
+node_js:
+- '0.12'
+sudo: false
+env:
+  matrix:
+  - GROUP=
+  global:
+  - GH_REF: github.com/jupyter/jupyter-js-ui.git
+install:
+- bash ./scripts/travis_install.sh
+script:
+- bash ./scripts/travis_script.sh
+after_success:
+- bash ./scripts/travis_after_success.sh

+ 5 - 0
CONTRIBUTING.md

@@ -0,0 +1,5 @@
+# Contributing
+
+We follow the [IPython Contributing Guide](https://github.com/ipython/ipython/blob/master/CONTRIBUTING.md).
+
+All source code is written in [TypeScript](http://www.typescriptlang.org/Handbook). See the [Style Guide](https://github.com/phosphorjs/phosphor/wiki/Style-Guide).

+ 28 - 0
LICENSE

@@ -0,0 +1,28 @@
+Copyright (c) 2015, Project Jupyter
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+  list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* Neither the name of jupyter-js-filebrowser nor the names of its
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+

+ 104 - 0
README.md

@@ -0,0 +1,104 @@
+Jupyter JS UI
+=============
+
+JavaScript UI Componenets for Jupyter.
+
+[API Docs](http://jupyter.github.io/jupyter-js-ui/)
+
+
+Package Install
+---------------
+
+**Prerequisites**
+- [node](http://nodejs.org/)
+- [python](https://www.continuum.io/downloads)
+
+```bash
+npm install --save jupyter-js-ui
+conda install notebook  # notebook 4.1+ required
+```
+
+
+Source Build
+------------
+
+**Prerequisites**
+- [git](http://git-scm.com/)
+- [node 0.12+](http://nodejs.org/)
+- [python](https://www.continuum.io/downloads)
+
+```bash
+git clone https://github.com/jupyter/jupyter-js-ui.git
+cd jupyter-js-ui
+npm install
+npm run build
+conda install notebook  # notebook 4.1+ required
+```
+
+**Rebuild**
+```bash
+npm run clean
+npm run build
+```
+
+
+Run Tests
+---------
+
+Follow the source build instructions first.
+
+```bash
+npm test
+```
+
+
+Build Example
+-------------
+
+Follow the source build instructions first.
+Requires a Python install with the Jupyter notebook.
+
+```bash
+npm run build:example
+```
+
+Change to `example` directory and run `python main.py`.
+
+
+Build Docs
+----------
+
+Follow the source build instructions first.
+
+```bash
+npm run docs
+```
+
+Navigate to `docs/index.html`.
+
+
+Supported Runtimes
+------------------
+
+The runtime versions which are currently *known to work* are listed below.
+Earlier versions may also work, but come with no guarantees.
+
+- IE 11+
+- Firefox 32+
+- Chrome 38+
+
+
+Bundle for the Browser
+----------------------
+
+Follow the package install instructions first.
+
+Any bundler that understands how to `require()` files with `.js` and `.css`
+extensions can be used with this package.
+
+
+Usage Examples
+--------------
+
+**Note:** This module is fully compatible with Node/Babel/ES6/ES5. Simply
+omit the type declarations when using a language other than TypeScript.

+ 2 - 0
scripts/copycss.js

@@ -0,0 +1,2 @@
+var fs = require('fs-extra');
+fs.copySync('src/', 'lib/', { filter: /\.css$/ });

+ 2 - 0
scripts/copythemecss.js

@@ -0,0 +1,2 @@
+var fs = require('fs-extra');
+fs.copySync('src/default-theme/', 'example/build/');

+ 14 - 0
scripts/tdoptions.json

@@ -0,0 +1,14 @@
+{
+  "module": "commonjs",
+  "target": "ES5",
+  "excludeNotExported": true,
+  "experimentalDecorators": true,
+  "mode": "file",
+  "out": "docs",
+  "src": [
+    "src/index.ts",
+    "typings/codemirror/codemirror.d.ts",
+    "typings/es6-promise.d.ts",
+    "typings/moment/moment.d.ts"
+  ]
+}

+ 17 - 0
scripts/travis_after_success.sh

@@ -0,0 +1,17 @@
+#!/bin/bash
+if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_BRANCH == "master" ]]
+then
+    echo "-- pushing docs --"
+
+    ( cd docs
+    git init
+    git config user.email "travis@travis-ci.com"
+    git config user.name "Travis Bot"
+
+    git add .
+    git commit -m "Deploy to GitHub Pages"
+    git push --force --quiet "https://${GHTOKEN}@${GH_REF}" master:gh-pages > /dev/null 2>&1
+    ) && echo "-- pushed docs --"
+else
+    echo "-- will only push docs from master --"
+fi

+ 13 - 0
scripts/travis_install.sh

@@ -0,0 +1,13 @@
+#!/bin/bash
+npm install
+wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
+bash miniconda.sh -b -p $HOME/miniconda
+export PATH="$HOME/miniconda/bin:$PATH"
+hash -r
+conda config --set always_yes yes --set changeps1 no
+conda update -q conda
+conda info -a
+conda install jupyter
+
+# create jupyter base dir (needed for config retreival)
+mkdir ~/.jupyter

+ 12 - 0
scripts/travis_script.sh

@@ -0,0 +1,12 @@
+#!/bin/bash
+set -e
+export DISPLAY=:99.0
+sh -e /etc/init.d/xvfb start || true
+
+npm run clean
+npm run build
+npm test
+npm run test:coverage
+export PATH="$HOME/miniconda/bin:$PATH"
+npm run build:example
+npm run docs