Implemented URL query parsing for initial token /opa/?token=abcde
[src/app-framework-demo.git] / afb-client / bower_components / jszip / index.html
1 ---
2 title: JSZip
3 layout: default
4 section: main
5 ---
6
7 <div class="row">
8 <div class="col-md-5">
9
10 JSZip is a javascript library for creating, reading and editing .zip files, with a
11 lovely and simple API.
12
13 </div>
14 <div class="col-md-7">
15 <p>
16   <strong>Current version</strong> : v2.5.0
17 </p>
18 <p>
19   <strong>License</strong> : JSZip is dual-licensed. You may use it under the
20   MIT license <em>or</em> the GPLv3 license. See
21   <a href="https://github.com/Stuk/jszip/blob/master/LICENSE.markdown">LICENSE.markdown</a>.
22 </p>
23 </div>
24
25 <div class="row">
26 <div class="col-md-5">
27
28 <h3>Example</h3>
29
30 <script type="text/javascript">
31 imgData = "R0lGODdhBQAFAIACAAAAAP/eACwAAAAABQAFAAACCIwPkWerClIBADs=";
32
33 jQuery(function($) {
34   if(!JSZip.support.blob) {
35       $("#demo-not-supported").removeClass("hidden");
36       $("#demo").hide();
37       return;
38   }
39   $("#demo").click(function () {
40       try {
41           eval($("#demo-code").val());
42           $("#status")
43           .removeClass()
44           .addClass("text-success")
45           .text("Done!");
46       }
47       catch (e) {
48           $("#status")
49           .removeClass()
50           .addClass("text-danger")
51           .text(e);
52       }
53   });
54 });
55
56 </script>
57 <textarea class="form-control" id="demo-code" rows="7" spellcheck="false">
58 var zip = new JSZip();
59 zip.file("Hello.txt", "Hello World\n");
60 var img = zip.folder("images");
61 img.file("smile.gif", imgData, {base64: true});
62 var content = zip.generate({type:"blob"});
63 // see FileSaver.js
64 saveAs(content, "example.zip");</textarea>
65 <button id="demo" class="btn btn-primary">Run!</button>
66 <span id="status"></span>
67 <div id="demo-not-supported" class="alert alert-danger hidden">
68   This browser doesn't support blobs, this demo won't work :(
69   See <a href="{{site.baseurl}}/documentation/howto/write_zip.html" class="alert-link">here for more info</a>.
70 </div>
71 </div>
72 <div class="col-md-7">
73
74 <h3>Installation</h3>
75
76 <p>
77   <strong>With npm</strong> : <code>npm install jszip</code>
78 </p>
79 <p>
80   <strong>With bower</strong> : <code>bower install Stuk/jszip</code>
81 </p>
82 <p>
83   <strong>With component</strong> : <code>component install Stuk/jszip</code>
84 </p>
85 <p>
86   <strong>Manually</strong> : <a href="http://github.com/Stuk/jszip/zipball/master">download JSZip</a>
87   and include the file <code>dist/jszip.js</code> or <code>dist/jszip.min.js</code>
88 </p>
89 <br>
90 <p>
91   Installed ? Great ! You can now check our
92   <a href="{{site.baseurl}}/documentation/examples.html">guides and examples !</a>
93 </p>
94 </div>
95 </div>
96
97 <h3>Support</h3>
98
99 <table class="browser_support">
100   <tr>
101     <th class="support_op">Opera</th>
102     <th class="support_ff">Firefox</th>
103     <th class="support_sf">Safari</th>
104     <th class="support_cr">Chrome</th>
105     <th class="support_ie">Internet Explorer</th>
106     <th class="support_nd">Node.js</th>
107   </tr>
108   <tr>
109     <td>Yes</td>
110     <td>Yes</td>
111     <td>Yes</td>
112     <td>Yes</td>
113     <td>Yes</td>
114     <td>Yes</td>
115   </tr>
116   <tr>
117     <td>Tested with the latest version</td>
118     <td>Tested with 3.0 / 3.6 / latest version</td>
119     <td>Tested with the latest version</td>
120     <td>Tested with the latest version</td>
121     <td>Tested with IE 6 / 7 / 8 / 9 / 10</td>
122     <td>Tested with node.js 0.8 and 0.10</td>
123   </tr>
124 </table>
125
126 <h3>Getting help</h3>
127
128 <p>
129 Having trouble ? We'd like to help !
130 </p>
131 <ul>
132   <li>
133   Try the <a href="{{site.baseurl}}/documentation/faq.html">FAQ</a>, it has
134   answers to common questions.
135   </li>
136   <li>
137   If you're looking for informations about a specific method, try the
138   <a href="{{site.baseurl}}/documentation/api_jszip.html">documentation</a>.
139   </li>
140   <li>
141   Check the
142   <a href="{{site.baseurl}}/documentation/examples.html">examples</a>.
143   </li>
144   <li>
145   Report bugs in our
146   <a href="https://github.com/Stuk/jszip/issues">Bug tracker</a>.
147   </li>
148 </ul>
149
150 <h3>Test status</h3>
151
152 <dl class="dl-horizontal">
153   <dt>Travis build :</dt>
154   <dd>
155   <a href="http://travis-ci.org/Stuk/jszip">
156     <img src="https://api.travis-ci.org/Stuk/jszip.svg?branch=master" alt="" />
157   </a>
158   </dd>
159   <dt>Saucelabs build :</dt>
160   <dd>
161   <a href="https://saucelabs.com/u/jszip">
162     <img src="https://saucelabs.com/browser-matrix/jszip.svg" alt="" />
163   </a>
164   </dd>
165   <dt>Live tests :</dt>
166   <dd>
167   <a href="{{site.baseurl}}/test/">See for yourself !</a>
168   </dd>
169 </dl>