jspm 0.16.51 → 0.16.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +1 -1
  2. package/docs/getting-started.md +1 -1
  3. package/docs/production-workflows.md +3 -2
  4. package/lib/core.js +1 -1
  5. package/package.json +4 -4
  6. package/docs/_book/api.html +0 -449
  7. package/docs/_book/getting-started.html +0 -425
  8. package/docs/_book/gitbook/app.js +0 -25001
  9. package/docs/_book/gitbook/fonts/fontawesome/FontAwesome.otf +0 -0
  10. package/docs/_book/gitbook/fonts/fontawesome/fontawesome-webfont.eot +0 -0
  11. package/docs/_book/gitbook/fonts/fontawesome/fontawesome-webfont.svg +0 -504
  12. package/docs/_book/gitbook/fonts/fontawesome/fontawesome-webfont.ttf +0 -0
  13. package/docs/_book/gitbook/fonts/fontawesome/fontawesome-webfont.woff +0 -0
  14. package/docs/_book/gitbook/images/apple-touch-icon-precomposed-152.png +0 -0
  15. package/docs/_book/gitbook/images/favicon.ico +0 -0
  16. package/docs/_book/gitbook/plugins/gitbook-plugin-fontsettings/buttons.js +0 -151
  17. package/docs/_book/gitbook/plugins/gitbook-plugin-fontsettings/website.css +0 -291
  18. package/docs/_book/gitbook/plugins/gitbook-plugin-ga/plugin.js +0 -17
  19. package/docs/_book/gitbook/plugins/gitbook-plugin-highlight/ebook.css +0 -131
  20. package/docs/_book/gitbook/plugins/gitbook-plugin-highlight/website.css +0 -426
  21. package/docs/_book/gitbook/plugins/gitbook-plugin-search/lunr.min.js +0 -7
  22. package/docs/_book/gitbook/plugins/gitbook-plugin-search/search.css +0 -27
  23. package/docs/_book/gitbook/plugins/gitbook-plugin-search/search.js +0 -135
  24. package/docs/_book/gitbook/plugins/gitbook-plugin-sharing/buttons.js +0 -93
  25. package/docs/_book/gitbook/style.css +0 -9
  26. package/docs/_book/index.html +0 -344
  27. package/docs/_book/installing-packages.html +0 -448
  28. package/docs/_book/linking.html +0 -367
  29. package/docs/_book/nodejs-usage.html +0 -352
  30. package/docs/_book/plugins.html +0 -379
  31. package/docs/_book/production-workflows.html +0 -391
  32. package/docs/_book/publishing-packages.html +0 -425
  33. package/docs/_book/registries.html +0 -403
  34. package/docs/_book/registry-api.html +0 -423
  35. package/docs/_book/registry-property.html +0 -344
  36. package/docs/_book/search_index.json +0 -1
  37. package/docs/book.json +0 -8
  38. package/docs/node_modules/gitbook-plugin-ga/.npmignore +0 -25
  39. package/docs/node_modules/gitbook-plugin-ga/LICENSE +0 -201
  40. package/docs/node_modules/gitbook-plugin-ga/README.md +0 -48
  41. package/docs/node_modules/gitbook-plugin-ga/book/plugin.js +0 -17
  42. package/docs/node_modules/gitbook-plugin-ga/index.js +0 -8
  43. package/docs/node_modules/gitbook-plugin-ga/package.json +0 -63
@@ -1,425 +0,0 @@
1
- <!DOCTYPE HTML>
2
- <html lang="en" >
3
-
4
- <head>
5
-
6
- <meta charset="UTF-8">
7
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
8
- <title>Getting Started | JSPM</title>
9
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
10
- <meta name="description" content="">
11
- <meta name="generator" content="GitBook 2.6.3">
12
-
13
-
14
- <meta name="HandheldFriendly" content="true"/>
15
- <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
16
- <meta name="apple-mobile-web-app-capable" content="yes">
17
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
18
- <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
19
- <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
20
-
21
- <link rel="stylesheet" href="gitbook/style.css">
22
-
23
-
24
- <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-highlight/website.css">
25
-
26
-
27
-
28
- <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-search/search.css">
29
-
30
-
31
-
32
- <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-fontsettings/website.css">
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
- <link rel="next" href="./installing-packages.html" />
41
-
42
-
43
- <link rel="prev" href="./index.html" />
44
-
45
-
46
-
47
- </head>
48
- <body>
49
-
50
-
51
- <div class="book"
52
- data-level="1"
53
- data-chapter-title="Getting Started"
54
- data-filepath="getting-started.md"
55
- data-basepath="."
56
- data-revision="Mon Jan 25 2016 15:22:58 GMT+0200 (SAST)"
57
- data-innerlanguage="">
58
-
59
-
60
- <div class="book-summary">
61
- <nav role="navigation">
62
- <ul class="summary">
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
- <li class="chapter " data-level="0" data-path="index.html">
73
-
74
-
75
- <a href="./index.html">
76
-
77
- <i class="fa fa-check"></i>
78
-
79
- Introduction
80
- </a>
81
-
82
-
83
- </li>
84
-
85
- <li class="chapter active" data-level="1" data-path="getting-started.html">
86
-
87
-
88
- <a href="./getting-started.html">
89
-
90
- <i class="fa fa-check"></i>
91
-
92
- <b>1.</b>
93
-
94
- Getting Started
95
- </a>
96
-
97
-
98
- </li>
99
-
100
- <li class="chapter " data-level="2" data-path="installing-packages.html">
101
-
102
-
103
- <a href="./installing-packages.html">
104
-
105
- <i class="fa fa-check"></i>
106
-
107
- <b>2.</b>
108
-
109
- Installing Packages
110
- </a>
111
-
112
-
113
- </li>
114
-
115
- <li class="chapter " data-level="3" data-path="linking.html">
116
-
117
-
118
- <a href="./linking.html">
119
-
120
- <i class="fa fa-check"></i>
121
-
122
- <b>3.</b>
123
-
124
- Linking
125
- </a>
126
-
127
-
128
- </li>
129
-
130
- <li class="chapter " data-level="4" data-path="api.html">
131
-
132
-
133
- <a href="./api.html">
134
-
135
- <i class="fa fa-check"></i>
136
-
137
- <b>4.</b>
138
-
139
- API
140
- </a>
141
-
142
-
143
- </li>
144
-
145
- <li class="chapter " data-level="5" data-path="plugins.html">
146
-
147
-
148
- <a href="./plugins.html">
149
-
150
- <i class="fa fa-check"></i>
151
-
152
- <b>5.</b>
153
-
154
- Plugins
155
- </a>
156
-
157
-
158
- </li>
159
-
160
- <li class="chapter " data-level="6" data-path="production-workflows.html">
161
-
162
-
163
- <a href="./production-workflows.html">
164
-
165
- <i class="fa fa-check"></i>
166
-
167
- <b>6.</b>
168
-
169
- Production Workflows
170
- </a>
171
-
172
-
173
- </li>
174
-
175
- <li class="chapter " data-level="7" data-path="publishing-packages.html">
176
-
177
-
178
- <a href="./publishing-packages.html">
179
-
180
- <i class="fa fa-check"></i>
181
-
182
- <b>7.</b>
183
-
184
- Publishing Packages
185
- </a>
186
-
187
-
188
- </li>
189
-
190
- <li class="chapter " data-level="8" data-path="nodejs-usage.html">
191
-
192
-
193
- <a href="./nodejs-usage.html">
194
-
195
- <i class="fa fa-check"></i>
196
-
197
- <b>8.</b>
198
-
199
- NodeJS Usage
200
- </a>
201
-
202
-
203
- </li>
204
-
205
- <li class="chapter " data-level="9" data-path="registries.html">
206
-
207
-
208
- <a href="./registries.html">
209
-
210
- <i class="fa fa-check"></i>
211
-
212
- <b>9.</b>
213
-
214
- Registries
215
- </a>
216
-
217
-
218
- </li>
219
-
220
- <li class="chapter " data-level="10" data-path="registry-api.html">
221
-
222
-
223
- <a href="./registry-api.html">
224
-
225
- <i class="fa fa-check"></i>
226
-
227
- <b>10.</b>
228
-
229
- Registry API
230
- </a>
231
-
232
-
233
- </li>
234
-
235
- <li class="chapter " data-level="11" data-path="registry-property.html">
236
-
237
-
238
- <a href="./registry-property.html">
239
-
240
- <i class="fa fa-check"></i>
241
-
242
- <b>11.</b>
243
-
244
- Registry Property
245
- </a>
246
-
247
-
248
- </li>
249
-
250
-
251
-
252
-
253
- <li class="divider"></li>
254
- <li>
255
- <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
256
- Published with GitBook
257
- </a>
258
- </li>
259
-
260
- </ul>
261
- </nav>
262
- </div>
263
-
264
- <div class="book-body">
265
- <div class="body-inner">
266
- <div class="book-header" role="navigation">
267
- <!-- Actions Left -->
268
-
269
-
270
- <!-- Title -->
271
- <h1>
272
- <i class="fa fa-circle-o-notch fa-spin"></i>
273
- <a href="./" >JSPM</a>
274
- </h1>
275
- </div>
276
-
277
- <div class="page-wrapper" tabindex="-1" role="main">
278
- <div class="page-inner">
279
-
280
-
281
- <section class="normal" id="section-">
282
-
283
- <h3 id="1-install-jspm-cli">1. Install jspm CLI:</h3>
284
- <pre><code> npm install jspm -g
285
- </code></pre><h3 id="2-create-a-project">2. Create a project:</h3>
286
- <p>Optionally lock down jspm for the project:</p>
287
- <pre><code> cd my-project
288
- npm install jspm --save-dev
289
- </code></pre><blockquote>
290
- <p>It is advisable to locally install to lock the version of jspm.
291
- This will ensure upgrades to the global jspm will not alter the behavior of your application.
292
- Use <code>jspm -v</code> to confirm the local version.</p>
293
- </blockquote>
294
- <p>Create a new project configuration:</p>
295
- <pre><code> jspm init
296
-
297
- Package.json file does not exist, create it? [yes]:
298
- Would you like jspm to prefix the jspm package.json properties under jspm? [yes]:
299
- Enter server baseURL (public folder path) [.]:
300
- Enter jspm packages folder [./jspm_packages]:
301
- Enter config file path [./config.js]:
302
- Configuration file config.js doesn&apos;t exist, create it? [yes]:
303
- Enter client baseURL (public folder URL) [/]:
304
- Which ES6 transpiler would you like to use, Traceur or Babel? [traceur]:
305
- </code></pre><p> Sets up the package.json and configuration file.
306
- Note <code>jspm init</code> happens automatically if you try installing into an empty project too.</p>
307
- <ul>
308
- <li><strong>baseURL</strong>: This should be set to the public folder where your server will serve from, relative to the package.json file. <em>Defaults to the package.json folder itself.</em></li>
309
- <li><strong>jspm packages folder</strong>: The folder where jspm will install external dependencies.</li>
310
- <li><strong>Config file path</strong>: The jspm config file for your application. Should be within the baseURL and checked in to version control.</li>
311
- <li><strong>Client baseURL</strong>: The URL from the browser where the public folder is hosted.</li>
312
- <li><strong>Transpiler</strong>: Change this option at any time with <code>jspm dl-loader babel</code>. Custom transpilation options can also be set through <code>babelOptions</code> or <code>traceurOptions</code> in the jspm config file.</li>
313
- </ul>
314
- <p>If you ever need to reset any of these properties, you can modify the package.json, which will update the configuration when you next run <code>jspm install</code> or <code>jspm init</code> to refresh.</p>
315
- <p>It is possible to run through the above prompts again at any time with <code>jspm init -p</code>.</p>
316
- <h3 id="3-install-any-packages-from-the-jspm-registry-github-or-npm">3. Install any packages from the jspm Registry, GitHub or npm:</h3>
317
- <pre><code> jspm install npm:lodash-node
318
- jspm install github:components/jquery
319
- jspm install jquery
320
- jspm install myname=npm:underscore
321
- </code></pre><p> Multiple installs can also be combined into a single line separated by spaces.</p>
322
- <p> Any npm or Github package can be installed in this way.</p>
323
- <p> Most npm packages will install without any configuration necessary.
324
- This is because the npm registry endpoint applies conversion operations based on the assumption of
325
- Node require resolution making the Node and npm-style code compatible with jspm.</p>
326
- <p>Github packages may need to be configured for jspm first.
327
- <a href="https://github.com/jspm/registry/wiki/Configuring-Packages-for-jspm" target="_blank">Read the guide here on configuring packages for jspm</a>.</p>
328
- <p> All installs are saved into the package.json, so that the jspm_packages folder and
329
- configuration file can be entirely recreated with a single <code>jspm install</code> call with no arguments.
330
- This is ideal for version-controlled projects where third party packages aren&apos;t saved in the repo itself.</p>
331
- <p> The config.js file is updated with the version information and the version is locked down,
332
- this configuration file itself forming the lock, which should be added to version control.</p>
333
- <h3 id="4-write-application-code">4. Write application code</h3>
334
- <p>We can now write into our <code>lib</code> folder code that loads our dependencies, in any module format (including ES6):</p>
335
- <p> lib/bootstrap.js</p>
336
- <pre><code class="lang-javascript"> <span class="hljs-keyword">import</span> _ <span class="hljs-keyword">from</span> <span class="hljs-string">&apos;lodash-node/modern/lang/isEqual.js&apos;</span>;
337
- <span class="hljs-keyword">import</span> $ from <span class="hljs-string">&apos;jquery&apos;</span>;
338
- <span class="hljs-keyword">import</span> underscore <span class="hljs-keyword">from</span> <span class="hljs-string">&apos;myname&apos;</span>;
339
-
340
- <span class="hljs-keyword">export</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">bootstrap</span>(<span class="hljs-params"></span>) </span>{
341
- <span class="hljs-comment">// bootstrap code here</span>
342
- }
343
- </code></pre>
344
- <p> lib/main.js</p>
345
- <pre><code class="lang-javascript"> <span class="hljs-keyword">import</span> {bootstrap} <span class="hljs-keyword">from</span> <span class="hljs-string">&apos;./bootstrap.js&apos;</span>;
346
- bootstrap();
347
- </code></pre>
348
- <blockquote>
349
- <p>Note modules are only detected as ES6 when module syntax is present. This is because the module loader transpilation is linked to the ES module format currently, althought this transpilation layer will be separated in future. Read more about SystemJS module formats at <a href="https://github.com/systemjs/systemjs/blob/master/docs/module-formats.md" target="_blank">https://github.com/systemjs/systemjs/blob/master/docs/module-formats.md</a>.</p>
350
- </blockquote>
351
- <h3 id="5-run-the-code">5. Run the code</h3>
352
- <p>In an HTML page include the automatically downloaded SystemJS loader along with the config file, then import our application main entry point:</p>
353
- <pre><code class="lang-html"> <span class="hljs-doctype">&lt;!doctype html&gt;</span>
354
- <span class="hljs-tag">&lt;<span class="hljs-title">script</span> <span class="hljs-attribute">src</span>=<span class="hljs-value">&quot;jspm_packages/system.js&quot;</span>&gt;</span><span class="undefined"></span><span class="hljs-tag">&lt;/<span class="hljs-title">script</span>&gt;</span>
355
- <span class="hljs-tag">&lt;<span class="hljs-title">script</span> <span class="hljs-attribute">src</span>=<span class="hljs-value">&quot;config.js&quot;</span>&gt;</span><span class="undefined"></span><span class="hljs-tag">&lt;/<span class="hljs-title">script</span>&gt;</span>
356
- <span class="hljs-tag">&lt;<span class="hljs-title">script</span>&gt;</span><span class="actionscript">
357
- System.<span class="hljs-keyword">import</span>(<span class="hljs-string">&apos;lib/main.js&apos;</span>);
358
- </span><span class="hljs-tag">&lt;/<span class="hljs-title">script</span>&gt;</span>
359
- </code></pre>
360
- <p>Run a local server to view the page.</p>
361
- <blockquote>
362
- <p>jspm makes requests for many files. For best performance, ideally try to use a performant HTTP/2-enabled development server
363
- and set up <code>jspm_packages</code> to be served with far-future expires from the local server so that it is cached in the browser
364
- and separate requests don&apos;t need to be made.</p>
365
- </blockquote>
366
- <h3 id="6-bundle-for-production">6. Bundle for production</h3>
367
- <pre><code> jspm bundle lib/main --inject
368
- </code></pre><p>Refresh the browser, and see the entire app loaded from a single bundle file.</p>
369
- <p>Alternatively, use <code>jspm bundle-sfx lib/main</code> to create a bundle script that can be used on its own with a <code>&lt;script&gt;</code> tag independent of <code>config.js</code> and <code>system.js</code>.</p>
370
- <h3 id="next-steps">Next Steps</h3>
371
- <p><a href="production-workflows.html">Read more about the production workflows</a></p>
372
- <p><a href="https://github.com/jspm/registry/wiki/Configuring-Packages-for-jspm" target="_blank">Read the guide on configuring packages for jspm here</a>.</p>
373
- <p><em>If you are having any trouble configuring a package for jspm, please just <a href="https://github.com/jspm/registry/" target="_blank">post an issue to the registry</a> and we&apos;ll help get it configured.</em></p>
374
-
375
-
376
- </section>
377
-
378
-
379
- </div>
380
- </div>
381
- </div>
382
-
383
-
384
- <a href="./index.html" class="navigation navigation-prev " aria-label="Previous page: Introduction"><i class="fa fa-angle-left"></i></a>
385
-
386
-
387
- <a href="./installing-packages.html" class="navigation navigation-next " aria-label="Next page: Installing Packages"><i class="fa fa-angle-right"></i></a>
388
-
389
- </div>
390
- </div>
391
-
392
-
393
- <script src="gitbook/app.js"></script>
394
-
395
-
396
- <script src="gitbook/plugins/gitbook-plugin-ga/plugin.js"></script>
397
-
398
-
399
-
400
- <script src="gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
401
-
402
-
403
-
404
- <script src="gitbook/plugins/gitbook-plugin-search/search.js"></script>
405
-
406
-
407
-
408
- <script src="gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
409
-
410
-
411
-
412
- <script src="gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
413
-
414
-
415
- <script>
416
- require(["gitbook"], function(gitbook) {
417
- var config = {"ga":{"token":"UA-40327700-1","configuration":"auto"},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
418
- gitbook.start(config);
419
- });
420
- </script>
421
-
422
-
423
- </body>
424
-
425
- </html>