From 27e8947e793a6523b4f74bd70116a2ab400b3973 Mon Sep 17 00:00:00 2001 From: "Brian E. Granger" Date: Wed, 15 May 2013 13:53:22 -0700 Subject: [PATCH] Reorg of the js/less/css files. --- IPython/frontend/html/notebook/README.md | 50 ++++++++++++++++-- .../auth/less/login.less} | 0 .../auth/less/logout.less} | 0 .../static/{js => ipython/auth}/loginmain.js | 0 .../{js => ipython/auth}/loginwidget.js | 0 .../static/{js => ipython/auth}/logoutmain.js | 0 .../static/{ => ipython/base}/css/custom.css | 0 .../static/{js => ipython/base}/custom.js | 0 .../static/{js => ipython/base}/events.js | 0 .../{ => ipython/base/images}/favicon.ico | Bin .../page.css => ipython/base/less/page.less} | 0 .../static/{js => ipython/base}/namespace.js | 0 .../static/{js => ipython/base}/page.js | 0 .../static/{js => ipython/base}/pagemain.js | 0 .../static/{js => ipython/base}/utils.js | 0 .../static/{js => ipython/kernels}/kernel.js | 0 .../static/{js => ipython/notebooks}/cell.js | 0 .../{js => ipython/notebooks}/celltoolbar.js | 0 .../notebooks}/celltoolbarpresets/default.js | 0 .../notebooks}/celltoolbarpresets/example.js | 0 .../celltoolbarpresets/slideshow.js | 0 .../{js => ipython/notebooks}/codecell.js | 0 .../notebooks}/codemirror-ipython.js | 0 .../{js => ipython/notebooks}/completer.js | 0 .../{js => ipython/notebooks}/contexthint.js | 0 .../notebooks/less/celltoolbar.less} | 0 .../{js => ipython/notebooks}/maintoolbar.js | 0 .../{js => ipython/notebooks}/mathjaxutils.js | 0 .../{js => ipython/notebooks}/menubar.js | 0 .../{js => ipython/notebooks}/notebook.js | 0 .../{js => ipython/notebooks}/notebookmain.js | 0 .../notebooks}/notificationarea.js | 0 .../notebooks}/notificationwidget.js | 0 .../{js => ipython/notebooks}/outputarea.js | 0 .../static/{js => ipython/notebooks}/pager.js | 0 .../{js => ipython/notebooks}/quickhelp.js | 0 .../{js => ipython/notebooks}/savewidget.js | 0 .../{js => ipython/notebooks}/textcell.js | 0 .../{js => ipython/notebooks}/toolbar.js | 0 .../{js => ipython/notebooks}/tooltip.js | 0 .../{js => ipython/tree}/clusterlist.js | 0 .../tree/less/alternateuploadform.less} | 0 .../tree/less/tree.less} | 0 .../{js => ipython/tree}/notebooklist.js | 0 .../tree}/projectdashboardmain.js | 0 45 files changed, 47 insertions(+), 3 deletions(-) rename IPython/frontend/html/notebook/static/{css/login.css => ipython/auth/less/login.less} (100%) rename IPython/frontend/html/notebook/static/{css/logout.css => ipython/auth/less/logout.less} (100%) rename IPython/frontend/html/notebook/static/{js => ipython/auth}/loginmain.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/auth}/loginwidget.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/auth}/logoutmain.js (100%) rename IPython/frontend/html/notebook/static/{ => ipython/base}/css/custom.css (100%) rename IPython/frontend/html/notebook/static/{js => ipython/base}/custom.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/base}/events.js (100%) rename IPython/frontend/html/notebook/static/{ => ipython/base/images}/favicon.ico (100%) rename IPython/frontend/html/notebook/static/{css/page.css => ipython/base/less/page.less} (100%) rename IPython/frontend/html/notebook/static/{js => ipython/base}/namespace.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/base}/page.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/base}/pagemain.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/base}/utils.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/kernels}/kernel.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/cell.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/celltoolbar.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/celltoolbarpresets/default.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/celltoolbarpresets/example.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/celltoolbarpresets/slideshow.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/codecell.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/codemirror-ipython.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/completer.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/contexthint.js (100%) rename IPython/frontend/html/notebook/static/{css/celltoolbar.css => ipython/notebooks/less/celltoolbar.less} (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/maintoolbar.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/mathjaxutils.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/menubar.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/notebook.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/notebookmain.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/notificationarea.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/notificationwidget.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/outputarea.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/pager.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/quickhelp.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/savewidget.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/textcell.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/toolbar.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/notebooks}/tooltip.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/tree}/clusterlist.js (100%) rename IPython/frontend/html/notebook/static/{css/alternateuploadform.css => ipython/tree/less/alternateuploadform.less} (100%) rename IPython/frontend/html/notebook/static/{css/projectdashboard.css => ipython/tree/less/tree.less} (100%) rename IPython/frontend/html/notebook/static/{js => ipython/tree}/notebooklist.js (100%) rename IPython/frontend/html/notebook/static/{js => ipython/tree}/projectdashboardmain.js (100%) diff --git a/IPython/frontend/html/notebook/README.md b/IPython/frontend/html/notebook/README.md index cf2889af4..e52816791 100644 --- a/IPython/frontend/html/notebook/README.md +++ b/IPython/frontend/html/notebook/README.md @@ -1,6 +1,6 @@ # IPython Notebook development -# Development dependencies +## Development dependencies Developers of the IPython Notebook will need to install the following tools: @@ -9,7 +9,7 @@ Developers of the IPython Notebook will need to install the following tools: * less (`npm install -g less`) * bower (`npm install -g bower`) -# Components +## Components We are moving to a model where our JavaScript dependencies are managed using [bower](http://bower.io/). These packages are installed in `static/components` @@ -22,8 +22,52 @@ we maintain our own fork of CodeMirror that is used with bower. This fork should track the upstream CodeMirror exactly; the only difference is that we are adding semantic versioned tags to our repo. -# less +## less If you edit our `.less` files you will need to run the less compiler to build our minified css files. This can be done by running `fab css` from this directory. +## JavaScript Documentation + + +How to Build/ view the doc for JavaScript. JavaScript documentation should follow a +style close to JSDoc one, so you should be able to build them with your favorite +documentation builder. Still the documentation comment are mainly written to be read +with YUI doc. You can either build a static version, or start a YUIdoc server that +will live update the doc at every page request. + + + +To do so, you will need to install YUIdoc. + +### Install NodeJS + +Node is a browser less javascript interpreter. To install it please refer to +the documentation for your platform. Install also NPM (node package manager) if +it does not come bundled with it. + +### Get YUIdoc + +npm does by default install package in `./node_modules` instead of doing a +system wide install. I'll leave you to yuidoc docs if you want to make a system +wide install. + +First, cd into js directory : +```bash +cd IPython/frontend/html/notebook/static/js/ +# install yuidoc +npm install yuidocjs +``` + + +### Run YUIdoc server + +From IPython/frontend/html/notebook/static/js/ +```bash +# run yuidoc for install dir +./node_modules/yuidocjs/lib/cli.js --server . +``` + +Follow the instruction and the documentation should be available on localhost:3000 + +Omitting `--server` will build a static version in the `out` folder by default. \ No newline at end of file diff --git a/IPython/frontend/html/notebook/static/css/login.css b/IPython/frontend/html/notebook/static/ipython/auth/less/login.less similarity index 100% rename from IPython/frontend/html/notebook/static/css/login.css rename to IPython/frontend/html/notebook/static/ipython/auth/less/login.less diff --git a/IPython/frontend/html/notebook/static/css/logout.css b/IPython/frontend/html/notebook/static/ipython/auth/less/logout.less similarity index 100% rename from IPython/frontend/html/notebook/static/css/logout.css rename to IPython/frontend/html/notebook/static/ipython/auth/less/logout.less diff --git a/IPython/frontend/html/notebook/static/js/loginmain.js b/IPython/frontend/html/notebook/static/ipython/auth/loginmain.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/loginmain.js rename to IPython/frontend/html/notebook/static/ipython/auth/loginmain.js diff --git a/IPython/frontend/html/notebook/static/js/loginwidget.js b/IPython/frontend/html/notebook/static/ipython/auth/loginwidget.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/loginwidget.js rename to IPython/frontend/html/notebook/static/ipython/auth/loginwidget.js diff --git a/IPython/frontend/html/notebook/static/js/logoutmain.js b/IPython/frontend/html/notebook/static/ipython/auth/logoutmain.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/logoutmain.js rename to IPython/frontend/html/notebook/static/ipython/auth/logoutmain.js diff --git a/IPython/frontend/html/notebook/static/css/custom.css b/IPython/frontend/html/notebook/static/ipython/base/css/custom.css similarity index 100% rename from IPython/frontend/html/notebook/static/css/custom.css rename to IPython/frontend/html/notebook/static/ipython/base/css/custom.css diff --git a/IPython/frontend/html/notebook/static/js/custom.js b/IPython/frontend/html/notebook/static/ipython/base/custom.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/custom.js rename to IPython/frontend/html/notebook/static/ipython/base/custom.js diff --git a/IPython/frontend/html/notebook/static/js/events.js b/IPython/frontend/html/notebook/static/ipython/base/events.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/events.js rename to IPython/frontend/html/notebook/static/ipython/base/events.js diff --git a/IPython/frontend/html/notebook/static/favicon.ico b/IPython/frontend/html/notebook/static/ipython/base/images/favicon.ico similarity index 100% rename from IPython/frontend/html/notebook/static/favicon.ico rename to IPython/frontend/html/notebook/static/ipython/base/images/favicon.ico diff --git a/IPython/frontend/html/notebook/static/css/page.css b/IPython/frontend/html/notebook/static/ipython/base/less/page.less similarity index 100% rename from IPython/frontend/html/notebook/static/css/page.css rename to IPython/frontend/html/notebook/static/ipython/base/less/page.less diff --git a/IPython/frontend/html/notebook/static/js/namespace.js b/IPython/frontend/html/notebook/static/ipython/base/namespace.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/namespace.js rename to IPython/frontend/html/notebook/static/ipython/base/namespace.js diff --git a/IPython/frontend/html/notebook/static/js/page.js b/IPython/frontend/html/notebook/static/ipython/base/page.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/page.js rename to IPython/frontend/html/notebook/static/ipython/base/page.js diff --git a/IPython/frontend/html/notebook/static/js/pagemain.js b/IPython/frontend/html/notebook/static/ipython/base/pagemain.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/pagemain.js rename to IPython/frontend/html/notebook/static/ipython/base/pagemain.js diff --git a/IPython/frontend/html/notebook/static/js/utils.js b/IPython/frontend/html/notebook/static/ipython/base/utils.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/utils.js rename to IPython/frontend/html/notebook/static/ipython/base/utils.js diff --git a/IPython/frontend/html/notebook/static/js/kernel.js b/IPython/frontend/html/notebook/static/ipython/kernels/kernel.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/kernel.js rename to IPython/frontend/html/notebook/static/ipython/kernels/kernel.js diff --git a/IPython/frontend/html/notebook/static/js/cell.js b/IPython/frontend/html/notebook/static/ipython/notebooks/cell.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/cell.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/cell.js diff --git a/IPython/frontend/html/notebook/static/js/celltoolbar.js b/IPython/frontend/html/notebook/static/ipython/notebooks/celltoolbar.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/celltoolbar.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/celltoolbar.js diff --git a/IPython/frontend/html/notebook/static/js/celltoolbarpresets/default.js b/IPython/frontend/html/notebook/static/ipython/notebooks/celltoolbarpresets/default.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/celltoolbarpresets/default.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/celltoolbarpresets/default.js diff --git a/IPython/frontend/html/notebook/static/js/celltoolbarpresets/example.js b/IPython/frontend/html/notebook/static/ipython/notebooks/celltoolbarpresets/example.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/celltoolbarpresets/example.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/celltoolbarpresets/example.js diff --git a/IPython/frontend/html/notebook/static/js/celltoolbarpresets/slideshow.js b/IPython/frontend/html/notebook/static/ipython/notebooks/celltoolbarpresets/slideshow.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/celltoolbarpresets/slideshow.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/celltoolbarpresets/slideshow.js diff --git a/IPython/frontend/html/notebook/static/js/codecell.js b/IPython/frontend/html/notebook/static/ipython/notebooks/codecell.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/codecell.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/codecell.js diff --git a/IPython/frontend/html/notebook/static/js/codemirror-ipython.js b/IPython/frontend/html/notebook/static/ipython/notebooks/codemirror-ipython.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/codemirror-ipython.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/codemirror-ipython.js diff --git a/IPython/frontend/html/notebook/static/js/completer.js b/IPython/frontend/html/notebook/static/ipython/notebooks/completer.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/completer.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/completer.js diff --git a/IPython/frontend/html/notebook/static/js/contexthint.js b/IPython/frontend/html/notebook/static/ipython/notebooks/contexthint.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/contexthint.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/contexthint.js diff --git a/IPython/frontend/html/notebook/static/css/celltoolbar.css b/IPython/frontend/html/notebook/static/ipython/notebooks/less/celltoolbar.less similarity index 100% rename from IPython/frontend/html/notebook/static/css/celltoolbar.css rename to IPython/frontend/html/notebook/static/ipython/notebooks/less/celltoolbar.less diff --git a/IPython/frontend/html/notebook/static/js/maintoolbar.js b/IPython/frontend/html/notebook/static/ipython/notebooks/maintoolbar.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/maintoolbar.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/maintoolbar.js diff --git a/IPython/frontend/html/notebook/static/js/mathjaxutils.js b/IPython/frontend/html/notebook/static/ipython/notebooks/mathjaxutils.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/mathjaxutils.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/mathjaxutils.js diff --git a/IPython/frontend/html/notebook/static/js/menubar.js b/IPython/frontend/html/notebook/static/ipython/notebooks/menubar.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/menubar.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/menubar.js diff --git a/IPython/frontend/html/notebook/static/js/notebook.js b/IPython/frontend/html/notebook/static/ipython/notebooks/notebook.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/notebook.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/notebook.js diff --git a/IPython/frontend/html/notebook/static/js/notebookmain.js b/IPython/frontend/html/notebook/static/ipython/notebooks/notebookmain.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/notebookmain.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/notebookmain.js diff --git a/IPython/frontend/html/notebook/static/js/notificationarea.js b/IPython/frontend/html/notebook/static/ipython/notebooks/notificationarea.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/notificationarea.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/notificationarea.js diff --git a/IPython/frontend/html/notebook/static/js/notificationwidget.js b/IPython/frontend/html/notebook/static/ipython/notebooks/notificationwidget.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/notificationwidget.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/notificationwidget.js diff --git a/IPython/frontend/html/notebook/static/js/outputarea.js b/IPython/frontend/html/notebook/static/ipython/notebooks/outputarea.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/outputarea.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/outputarea.js diff --git a/IPython/frontend/html/notebook/static/js/pager.js b/IPython/frontend/html/notebook/static/ipython/notebooks/pager.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/pager.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/pager.js diff --git a/IPython/frontend/html/notebook/static/js/quickhelp.js b/IPython/frontend/html/notebook/static/ipython/notebooks/quickhelp.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/quickhelp.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/quickhelp.js diff --git a/IPython/frontend/html/notebook/static/js/savewidget.js b/IPython/frontend/html/notebook/static/ipython/notebooks/savewidget.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/savewidget.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/savewidget.js diff --git a/IPython/frontend/html/notebook/static/js/textcell.js b/IPython/frontend/html/notebook/static/ipython/notebooks/textcell.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/textcell.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/textcell.js diff --git a/IPython/frontend/html/notebook/static/js/toolbar.js b/IPython/frontend/html/notebook/static/ipython/notebooks/toolbar.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/toolbar.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/toolbar.js diff --git a/IPython/frontend/html/notebook/static/js/tooltip.js b/IPython/frontend/html/notebook/static/ipython/notebooks/tooltip.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/tooltip.js rename to IPython/frontend/html/notebook/static/ipython/notebooks/tooltip.js diff --git a/IPython/frontend/html/notebook/static/js/clusterlist.js b/IPython/frontend/html/notebook/static/ipython/tree/clusterlist.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/clusterlist.js rename to IPython/frontend/html/notebook/static/ipython/tree/clusterlist.js diff --git a/IPython/frontend/html/notebook/static/css/alternateuploadform.css b/IPython/frontend/html/notebook/static/ipython/tree/less/alternateuploadform.less similarity index 100% rename from IPython/frontend/html/notebook/static/css/alternateuploadform.css rename to IPython/frontend/html/notebook/static/ipython/tree/less/alternateuploadform.less diff --git a/IPython/frontend/html/notebook/static/css/projectdashboard.css b/IPython/frontend/html/notebook/static/ipython/tree/less/tree.less similarity index 100% rename from IPython/frontend/html/notebook/static/css/projectdashboard.css rename to IPython/frontend/html/notebook/static/ipython/tree/less/tree.less diff --git a/IPython/frontend/html/notebook/static/js/notebooklist.js b/IPython/frontend/html/notebook/static/ipython/tree/notebooklist.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/notebooklist.js rename to IPython/frontend/html/notebook/static/ipython/tree/notebooklist.js diff --git a/IPython/frontend/html/notebook/static/js/projectdashboardmain.js b/IPython/frontend/html/notebook/static/ipython/tree/projectdashboardmain.js similarity index 100% rename from IPython/frontend/html/notebook/static/js/projectdashboardmain.js rename to IPython/frontend/html/notebook/static/ipython/tree/projectdashboardmain.js