Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update to CodeMirror 3 and start to ship our components #3232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Apr 29, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a0cc2fb
Bower has changed component.json to bower.json. Complying.
ellisonbg Apr 28, 2013
6339028
Updating bower.json for our CodeMirror repo.
ellisonbg Apr 28, 2013
9b11915
Removing static/components from .gitignore-we want to ship this.
ellisonbg Apr 28, 2013
647f4b0
Adding our current components directory.
ellisonbg Apr 28, 2013
2571b05
Removing tests from fabfile that are no longer needed.
ellisonbg Apr 28, 2013
dfb847d
Moving CodeMirror -> cmtemp
ellisonbg Apr 28, 2013
f6bdcd1
Moving cmtemp -> codemirror.
ellisonbg Apr 28, 2013
5590af4
Updating bower.json files.
ellisonbg Apr 28, 2013
40537f2
Updating path to codemirror.
ellisonbg Apr 28, 2013
4728c84
Updating tooltip.js to work with CM3.
ellisonbg Apr 28, 2013
f398099
In CM3, the class that needs autogrow has changed.
ellisonbg Apr 28, 2013
b978375
Updating tooltip.less for CM3 behavior.
ellisonbg Apr 28, 2013
e2e3fd3
Add components to static URLs.
ellisonbg Apr 28, 2013
da0782d
Updating style.min.css.
ellisonbg Apr 28, 2013
66de4c5
Copying CodeMirror's python mode into place for our ipython mode.
ellisonbg Apr 28, 2013
22418c9
Updating ipython CM mode.
ellisonbg Apr 28, 2013
688001c
Fixing typo in ntoebook.html.
ellisonbg Apr 28, 2013
a0c4e41
Changing mode name from python -> ipython.
ellisonbg Apr 28, 2013
61a613e
Fixing broken URLs to CM assets.
ellisonbg Apr 28, 2013
5dafbbd
Give the .CodeMirror class no background so ours shows through.
ellisonbg Apr 28, 2013
f2bc065
Fixing CM3 style related issues.
ellisonbg Apr 28, 2013
d077f91
Removing old codemirror assets - we now use the 1 in components.
ellisonbg Apr 28, 2013
198b5d5
Fix CM related sizing issues for completer and tooltip.
ellisonbg Apr 28, 2013
7d3938c
Put back the components fab function as we can still use it.
ellisonbg Apr 29, 2013
3940682
Adding README.md about notebook development.
ellisonbg Apr 29, 2013
77d9286
Fixing indentation in fabfile.py.
ellisonbg Apr 29, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ docs/man/*.gz
docs/source/api/generated
docs/gh-pages
IPython/frontend/html/notebook/static/mathjax
IPython/frontend/html/notebook/static/components
*.py[co]
__pycache__
build
Expand Down
29 changes: 29 additions & 0 deletions IPython/frontend/html/notebook/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# IPython Notebook development

# Development dependencies

Developers of the IPython Notebook will need to install the following tools:

* fabric
* node.js
* less (`npm install -g less`)
* bower (`npm install -g bower`)

# 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`
and commited into our git repo. Our dependencies are described in the file
`static/bower.json`. To update our bower packages, run `fab components` in this
directory.

Because CodeMirror does not use proper semantic versioning for its GitHub tags,
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

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.

5 changes: 0 additions & 5 deletions IPython/frontend/html/notebook/fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
static_dir = 'static'
components_dir = os.path.join(static_dir,'components')

def test_component(name):
if not os.path.exists(os.path.join(components_dir,name)):
components()

def components():
"""install components with bower"""
Expand All @@ -18,8 +15,6 @@ def components():

def css(minify=True):
"""generate the css from less files"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove the components command? Won't we still want to use this when we update the versions we use?

test_component('bootstrap')
test_component('less.js')
if minify not in ['True', 'False', True, False]:
abort('minify must be Boolean')
minify = (minify in ['True',True])
Expand Down
9 changes: 9 additions & 0 deletions IPython/frontend/html/notebook/static/bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "ipython-notebook",
"version": "1.0.0",
"dependencies": {
"bootstrap": "2.3.1",
"less.js": "1.3.3",
"codemirror": "git://github.com/ipython/CodeMirror.git#3.12.0"
}
}

This file was deleted.

8 changes: 0 additions & 8 deletions IPython/frontend/html/notebook/static/codemirror/README.md

This file was deleted.

Loading