Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 52 lines (28 sloc) 1.964 kb
8f99e46 @benvinegar Update README
benvinegar authored
1 # Third-party JavaScript - the code #
2
3 This repository contains companion source code to [Third-party JavaScript](http://thirdpartyjs.com), written by Ben Vinegar and Anton Kovalyov and available via [Manning Publishing](http://manning.com/vinegar).
4
5 The examples correspond to material from the book, and mostly illustrate third-party scripting concepts.
6
7 Feedback and comments are welcome.
8
9 ![Third-party JavaScript](http://github.com/thirdpartyjs/thirdpartyjs-code/raw/master/book.png)
10
11 ## Install instructions
12
a83921b @benvinegar Add Windows instructions
benvinegar authored
13 You'll need both Python and its packaging library, setuptools, in order to build and serve the example code. On OS X, these come pre-installed. On Windows? See <a href="#windows">Windows Instructions</a> first.
8f99e46 @benvinegar Update README
benvinegar authored
14
a83921b @benvinegar Add Windows instructions
benvinegar authored
15 1) Install the Frozen-Flask Python package.
8f99e46 @benvinegar Update README
benvinegar authored
16
17 ```$ easy_install Frozen-Flask```
18
a83921b @benvinegar Add Windows instructions
benvinegar authored
19 2) Build the source code examples:
8f99e46 @benvinegar Update README
benvinegar authored
20
21 ```$ python freeze.py```
22
352e098 @benvinegar Update README w/ link to hosts wikipedia page
benvinegar authored
23 3) Add the following entries to your <a href="http://en.wikipedia.org/wiki/Hosts_(file)#Location_in_the_file_system">hosts</a> file:
8f99e46 @benvinegar Update README
benvinegar authored
24
352e098 @benvinegar Update README w/ link to hosts wikipedia page
benvinegar authored
25 ```
5107729 @valueof Fixed NameTransport for Chrome and fixed README for correct /etc/host…
valueof authored
26 127.0.0.1 publisher.dev
27 127.0.0.1 proxy.publisher.dev
28 127.0.0.1 widget.dev
8f99e46 @benvinegar Update README
benvinegar authored
29 ```
30
a83921b @benvinegar Add Windows instructions
benvinegar authored
31 4) Run the embedded server:
8f99e46 @benvinegar Update README
benvinegar authored
32
33 ```$ python server.py```
34
1cb7601 @benvinegar Forgot to mention port 5000
benvinegar authored
35 Once the server is running, access the examples through http://publisher.dev:5000/examples/index.html.
8f99e46 @benvinegar Update README
benvinegar authored
36
a83921b @benvinegar Add Windows instructions
benvinegar authored
37 <a name="windows"/>
38
39 ## Installing Python on Windows
40
41 Download and install Python 2.7.x from the <a href="http://python.org/getit/">Python download page</a>.
42
43 Next, setuptools. Download and run the 2.7.x installer from: http://pypi.python.org/pypi/setuptools#downloads
44
45 Afterwards, you'll need to add both the Python directory (C:\Python27) and the scripts directory (C:\Python27\Scripts) to your PATH. To do this, go to My Computer ‣ Properties ‣ Advanced ‣ Environment Variables.
46
47 You should now be able to run the 'python' and 'easy_install' executables from the Windows shell. Success!
48
8f99e46 @benvinegar Update README
benvinegar authored
49 ## Need help?
50
a83921b @benvinegar Add Windows instructions
benvinegar authored
51 Visit Manning's Author Online forums for this book: http://www.manning-sandbox.com/forum.jspa?forumID=791
Something went wrong with that request. Please try again.