Skip to content

Commit 1f5dcbb

Browse files
committed
feat(sample): add sample prototype
1 parent 9b19a4e commit 1f5dcbb

File tree

13 files changed

+409
-0
lines changed

13 files changed

+409
-0
lines changed

dist/amd/index.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
define(['exports'], function (exports) {
2+
'use strict';
3+
4+
exports.__esModule = true;
5+
exports.load = load;
6+
exports.parse = parse;
7+
var defaultOptions = {
8+
path: './',
9+
file: 'package.json'
10+
};
11+
12+
function isFileApiAvailable() {
13+
if (window.File && window.FileReader && window.FileList && window.Blob) {
14+
return true;
15+
}
16+
17+
return false;
18+
}
19+
20+
function load(options) {
21+
if (isFileApiAvailable() === false) {
22+
console.log('File api is not available to load the aurelia environment.');
23+
}
24+
25+
var _options = Object.assign({}, options, defaultOptions);
26+
var envFile = new XMLHttpRequest();
27+
envFile.open("GET", _options.path + _options.file, false);
28+
envFile.send();
29+
}
30+
31+
function parse(content) {}
32+
});

dist/commonjs/index.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
'use strict';
2+
3+
exports.__esModule = true;
4+
exports.load = load;
5+
exports.parse = parse;
6+
var defaultOptions = {
7+
path: './src/',
8+
file: '.env'
9+
};
10+
11+
function isFileApiAvailable() {
12+
if (window.File && window.FileReader && window.FileList && window.Blob) {
13+
return true;
14+
}
15+
16+
return false;
17+
}
18+
19+
function load(options) {
20+
if (isFileApiAvailable() === false) {
21+
console.log('File api is not available to load the aurelia environment.');
22+
}
23+
24+
var _options = Object.assign({}, options, defaultOptions);
25+
var envFile = new XMLHttpRequest();
26+
envFile.open("GET", _options.path + _options.file, false);
27+
envFile.send();
28+
}
29+
30+
function parse(content) {}

dist/es6/index.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
let defaultOptions = {
2+
path: './src/',
3+
file: '.env'
4+
};
5+
6+
function isFileApiAvailable() {
7+
if (window.File && window.FileReader && window.FileList && window.Blob) {
8+
return true;
9+
}
10+
11+
return false;
12+
}
13+
14+
export function load(options : any) {
15+
if (isFileApiAvailable() === false) {
16+
console.log('File api is not available to load the aurelia environment.');
17+
}
18+
19+
let _options = Object.assign({}, options, defaultOptions);
20+
let envFile = new XMLHttpRequest();
21+
envFile.open("GET", _options.path + _options.file, false);
22+
envFile.send();
23+
}
24+
25+
export function parse(content : string) {
26+
27+
}

dist/system/index.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
System.register([], function (_export) {
2+
'use strict';
3+
4+
var defaultOptions;
5+
6+
_export('load', load);
7+
8+
_export('parse', parse);
9+
10+
function isFileApiAvailable() {
11+
if (window.File && window.FileReader && window.FileList && window.Blob) {
12+
return true;
13+
}
14+
15+
return false;
16+
}
17+
18+
function load(options) {
19+
if (isFileApiAvailable() === false) {
20+
console.log('File api is not available to load the aurelia environment.');
21+
}
22+
23+
var _options = Object.assign({}, options, defaultOptions);
24+
var envFile = new XMLHttpRequest();
25+
envFile.open("GET", _options.path + _options.file, false);
26+
envFile.send();
27+
}
28+
29+
function parse(content) {}
30+
31+
return {
32+
setters: [],
33+
execute: function () {
34+
defaultOptions = {
35+
path: './src/',
36+
file: '.env'
37+
};
38+
}
39+
};
40+
});

doc/api.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"id": 2,
3+
"name": "\"core-js\"",
4+
"kind": 2,
5+
"kindString": "Module",
6+
"flags": {},
7+
"children": [
8+
{
9+
"id": 3,
10+
"name": "coreJs",
11+
"kind": 32,
12+
"kindString": "Variable",
13+
"flags": {},
14+
"type": {
15+
"type": "instrinct",
16+
"name": "any"
17+
}
18+
}
19+
],
20+
"groups": [
21+
{
22+
"title": "Variables",
23+
"kind": 32,
24+
"children": [
25+
3
26+
]
27+
}
28+
]
29+
}

doc/core-js.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
declare module 'core-js' {
2+
var coreJs;
3+
export default coreJs;
4+
}

sample/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TEST=hm

sample/config.js

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
System.config({
2+
defaultJSExtensions: true,
3+
transpiler: "babel",
4+
babelOptions: {
5+
"optional": [
6+
"runtime",
7+
"optimisation.modules.system"
8+
]
9+
},
10+
paths: {
11+
"github:*": "jspm_packages/github/*",
12+
"npm:*": "jspm_packages/npm/*"
13+
},
14+
15+
packages: {
16+
"/aurelia-environment": {
17+
"main": "index"
18+
}
19+
},
20+
21+
map: {
22+
"aurelia-bootstrapper": "npm:[email protected]",
23+
"aurelia-framework": "npm:[email protected]",
24+
"babel": "npm:[email protected]",
25+
"babel-runtime": "npm:[email protected]",
26+
"core-js": "npm:[email protected]",
27+
"font-awesome": "npm:[email protected]",
28+
"twbs/bootstrap": "github:twbs/[email protected]",
29+
"github:jspm/[email protected]": {
30+
"assert": "npm:[email protected]"
31+
},
32+
"github:jspm/[email protected]": {
33+
"path-browserify": "npm:[email protected]"
34+
},
35+
"github:jspm/[email protected]": {
36+
"process": "npm:[email protected]"
37+
},
38+
"github:jspm/[email protected]": {
39+
"util": "npm:[email protected]"
40+
},
41+
"github:twbs/[email protected]": {
42+
"jquery": "github:components/[email protected]"
43+
},
44+
45+
"util": "npm:[email protected]"
46+
},
47+
48+
"aurelia-metadata": "npm:[email protected]",
49+
"aurelia-pal": "npm:[email protected]",
50+
"aurelia-task-queue": "npm:[email protected]",
51+
"core-js": "npm:[email protected]"
52+
},
53+
54+
"aurelia-event-aggregator": "npm:[email protected]",
55+
"aurelia-framework": "npm:[email protected]",
56+
"aurelia-history": "npm:[email protected]",
57+
"aurelia-history-browser": "npm:[email protected]",
58+
"aurelia-loader-default": "npm:[email protected]",
59+
"aurelia-logging-console": "npm:[email protected]",
60+
"aurelia-pal": "npm:[email protected]",
61+
"aurelia-pal-browser": "npm:[email protected]",
62+
"aurelia-router": "npm:[email protected]",
63+
"aurelia-templating": "npm:[email protected]",
64+
"aurelia-templating-binding": "npm:[email protected]",
65+
"aurelia-templating-resources": "npm:[email protected]",
66+
"aurelia-templating-router": "npm:[email protected]",
67+
"core-js": "npm:[email protected]"
68+
},
69+
70+
"aurelia-logging": "npm:[email protected]",
71+
"aurelia-metadata": "npm:[email protected]",
72+
"aurelia-pal": "npm:[email protected]",
73+
"core-js": "npm:[email protected]"
74+
},
75+
76+
"aurelia-logging": "npm:[email protected]"
77+
},
78+
79+
"aurelia-binding": "npm:[email protected]",
80+
"aurelia-dependency-injection": "npm:[email protected]",
81+
"aurelia-loader": "npm:[email protected]",
82+
"aurelia-logging": "npm:[email protected]",
83+
"aurelia-metadata": "npm:[email protected]",
84+
"aurelia-pal": "npm:[email protected]",
85+
"aurelia-path": "npm:[email protected]",
86+
"aurelia-task-queue": "npm:[email protected]",
87+
"aurelia-templating": "npm:[email protected]",
88+
"core-js": "npm:[email protected]"
89+
},
90+
91+
"aurelia-history": "npm:[email protected]",
92+
"aurelia-pal": "npm:[email protected]",
93+
"core-js": "npm:[email protected]"
94+
},
95+
96+
"aurelia-loader": "npm:[email protected]",
97+
"aurelia-metadata": "npm:[email protected]",
98+
"aurelia-pal": "npm:[email protected]"
99+
},
100+
101+
"aurelia-metadata": "npm:[email protected]",
102+
"aurelia-path": "npm:[email protected]"
103+
},
104+
105+
"aurelia-logging": "npm:[email protected]",
106+
"aurelia-pal": "npm:[email protected]"
107+
},
108+
109+
"aurelia-pal": "npm:[email protected]",
110+
"core-js": "npm:[email protected]"
111+
},
112+
113+
"aurelia-pal": "npm:[email protected]",
114+
"core-js": "npm:[email protected]"
115+
},
116+
117+
"aurelia-path": "npm:[email protected]",
118+
"core-js": "npm:[email protected]"
119+
},
120+
121+
"aurelia-dependency-injection": "npm:[email protected]",
122+
"aurelia-event-aggregator": "npm:[email protected]",
123+
"aurelia-history": "npm:[email protected]",
124+
"aurelia-logging": "npm:[email protected]",
125+
"aurelia-path": "npm:[email protected]",
126+
"aurelia-route-recognizer": "npm:[email protected]",
127+
"core-js": "npm:[email protected]"
128+
},
129+
130+
"aurelia-pal": "npm:[email protected]"
131+
},
132+
133+
"aurelia-binding": "npm:[email protected]",
134+
"aurelia-logging": "npm:[email protected]",
135+
"aurelia-templating": "npm:[email protected]"
136+
},
137+
138+
"aurelia-binding": "npm:[email protected]",
139+
"aurelia-dependency-injection": "npm:[email protected]",
140+
"aurelia-loader": "npm:[email protected]",
141+
"aurelia-logging": "npm:[email protected]",
142+
"aurelia-pal": "npm:[email protected]",
143+
"aurelia-path": "npm:[email protected]",
144+
"aurelia-task-queue": "npm:[email protected]",
145+
"aurelia-templating": "npm:[email protected]",
146+
"core-js": "npm:[email protected]"
147+
},
148+
149+
"aurelia-dependency-injection": "npm:[email protected]",
150+
"aurelia-logging": "npm:[email protected]",
151+
"aurelia-metadata": "npm:[email protected]",
152+
"aurelia-pal": "npm:[email protected]",
153+
"aurelia-path": "npm:[email protected]",
154+
"aurelia-router": "npm:[email protected]",
155+
"aurelia-templating": "npm:[email protected]"
156+
},
157+
158+
"aurelia-binding": "npm:[email protected]",
159+
"aurelia-dependency-injection": "npm:[email protected]",
160+
"aurelia-loader": "npm:[email protected]",
161+
"aurelia-logging": "npm:[email protected]",
162+
"aurelia-metadata": "npm:[email protected]",
163+
"aurelia-pal": "npm:[email protected]",
164+
"aurelia-path": "npm:[email protected]",
165+
"aurelia-task-queue": "npm:[email protected]",
166+
"core-js": "npm:[email protected]"
167+
},
168+
169+
"process": "github:jspm/[email protected]"
170+
},
171+
172+
"fs": "github:jspm/[email protected]",
173+
"path": "github:jspm/[email protected]",
174+
"process": "github:jspm/[email protected]",
175+
"systemjs-json": "github:systemjs/[email protected]"
176+
},
177+
178+
"css": "github:systemjs/[email protected]"
179+
},
180+
181+
"util": "github:jspm/[email protected]"
182+
},
183+
184+
"process": "github:jspm/[email protected]"
185+
},
186+
187+
"assert": "github:jspm/[email protected]"
188+
},
189+
190+
"inherits": "npm:[email protected]",
191+
"process": "github:jspm/[email protected]"
192+
}
193+
}
194+
});

sample/index.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<title>Aurelia Environment</title>
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
</head>
7+
<body aurelia-app="src/main">
8+
<div class="splash">
9+
<div class="message">Aurelia Environment Sample</div>
10+
<i class="fa fa-spinner fa-spin"></i>
11+
</div>
12+
13+
<script src="jspm_packages/system.js"></script>
14+
<script src="config.js"></script>
15+
<script>
16+
System.import('aurelia-bootstrapper');
17+
</script>
18+
</body>
19+
</html>

0 commit comments

Comments
 (0)