Skip to content

Commit 90dd837

Browse files
author
Steven Silvester
authored
Merge pull request jupyterlab#40 from GordonSmith/UMD
feat(build): Add UMD support
2 parents 35b0020 + c66e402 commit 90dd837

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+3277
-192
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
*.suo
22
*.user
33
.DS_Store
4+
dist
45
lib
6+
types
57
node_modules
68
build
79
review/api/temp

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ script:
1414
set -e;
1515
pushd packages/widgets;
1616
yarn build;
17+
yarn minimize;
1718
popd;
1819
yarn clean;
1920
yarn build;
21+
yarn minimize;
2022
yarn build:test;
2123
yarn test;
2224
yarn docs;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# example-dockpanel-amd
2+
_AMD_ version of [example-dockpanel](../example-dockpanel)
3+
4+
## Prerequisites
5+
From the root lumino folder run:
6+
```
7+
yarn install
8+
yarn run build
9+
yarn run minimize
10+
```
11+
12+
You should now be able to open [index.html](./index.html) directly into your web browser.
13+
14+
## Notable differences
15+
16+
* All dependencies loaded via AMD + RequireJS, see `head` section of [index.html](./index.html)
17+
* TypeScript converted to IE compatible JavaScript
18+
* CSS files manually imported as needed via [style/index.css](style/index.css)
19+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<title>example-dockpanel-iife</title>
6+
7+
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
8+
9+
<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.js"></script>
10+
<script src="https://cdn.jsdelivr.net/npm/requirejs@2.3.6/require.js"></script>
11+
12+
<script>
13+
require.config({
14+
baseUrl: ".",
15+
paths: {
16+
// CDN testing ---
17+
// "@lumino": "https://cdn.jsdelivr.net/npm/@lumino",
18+
19+
// Local testing ---
20+
"@lumino/algorithm": "../../packages/algorithm/dist/index.min",
21+
"@lumino/collections": "../../packages/collections/dist/index.min",
22+
"@lumino/properties": "../../packages/properties/dist/index.min",
23+
"@lumino/messaging": "../../packages/messaging/dist/index.min",
24+
"@lumino/signaling": "../../packages/signaling/dist/index.min",
25+
"@lumino/disposable": "../../packages/disposable/dist/index.min",
26+
"@lumino/domutils": "../../packages/domutils/dist/index.min",
27+
"@lumino/coreutils": "../../packages/coreutils/dist/index.min",
28+
"@lumino/keyboard": "../../packages/keyboard/dist/index.min",
29+
"@lumino/commands": "../../packages/commands/dist/index.min",
30+
"@lumino/dragdrop": "../../packages/dragdrop/dist/index.min",
31+
"@lumino/virtualdom": "../../packages/virtualdom/dist/index.min",
32+
"@lumino/widgets": "../../packages/widgets/dist/index.min"
33+
}
34+
});
35+
</script>
36+
37+
<link href="./style/index.css" rel="stylesheet">
38+
</head>
39+
40+
<body>
41+
<script>
42+
requirejs(['./src/index'], function (main) {
43+
main();
44+
});
45+
</script>
46+
</body>
47+
48+
</html>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "@lumino/example-dockpanel-amd",
3+
"version": "0.0.0",
4+
"private": true,
5+
"scripts": {
6+
"test": "node ./test/runner.js"
7+
},
8+
"devDependencies": {
9+
"puppeteer": "^2.1.1"
10+
}
11+
}

0 commit comments

Comments
 (0)