Skip to content

Commit 54d99fd

Browse files
committed
init file
1 parent 674c6e1 commit 54d99fd

File tree

89 files changed

+43225
-83
lines changed

Some content is hidden

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

89 files changed

+43225
-83
lines changed

.DS_Store

10 KB
Binary file not shown.

demo/.DS_Store

28 KB
Binary file not shown.

demo/2017.03.10-rxjs/03/app.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// import Rx from 'rxjs/Rx';
2+
const Rx = require('rxjs/Rx');
3+
4+
var subject = new Rx.Subject();
5+
6+
subject.subscribe({
7+
next: (v) => console.log('observerA: ' + v)
8+
});
9+
subject.subscribe({
10+
next: (v) => console.log('observerB: ' + v)
11+
});
12+
13+
subject.next(1);
14+
subject.next(2);
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>dev-server demo</title>
5+
</head>
6+
<body>
7+
8+
<script type="text/javascript" src="dist/main.js"></script>
9+
10+
</body>
11+
</html>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('hello dev-server');
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "dev-server",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"start": "webpack --config webpack.config.js",
8+
"test": "echo \"Error: no test specified\" && exit 1"
9+
},
10+
"keywords": [],
11+
"author": "",
12+
"license": "ISC"
13+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const path = require('path');
2+
3+
module.exports = {
4+
entry: './index.js',
5+
output: {
6+
filename: 'main.js',
7+
path: path.resolve(__dirname, 'dist')
8+
}
9+
};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"plugins": [
3+
"transform-proto-to-assign"
4+
],
5+
"presets": [ "env" ]
6+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
'use strict';
2+
3+
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
4+
5+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
6+
7+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
8+
9+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
10+
11+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12+
13+
var BasePage = function () {
14+
function BasePage() {
15+
_classCallCheck(this, BasePage);
16+
}
17+
18+
_createClass(BasePage, null, [{
19+
key: 'hello',
20+
value: function hello() {
21+
console.log('hello BasePage.');
22+
}
23+
}]);
24+
25+
return BasePage;
26+
}();
27+
28+
var Page = function (_BasePage) {
29+
_inherits(Page, _BasePage);
30+
31+
function Page() {
32+
_classCallCheck(this, Page);
33+
34+
return _possibleConstructorReturn(this, (Page.__proto__ || Object.getPrototypeOf(Page)).apply(this, arguments));
35+
}
36+
37+
return Page;
38+
}(BasePage);
39+
40+
Page.hello();
41+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
'use strict';
2+
3+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
4+
5+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
6+
7+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
8+
9+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10+
11+
var BasePage = function () {
12+
function BasePage() {
13+
_classCallCheck(this, BasePage);
14+
}
15+
16+
_createClass(BasePage, null, [{
17+
key: 'hello',
18+
value: function hello() {
19+
console.log('hello BasePage.');
20+
}
21+
}]);
22+
23+
return BasePage;
24+
}();
25+
26+
var Page = function (_BasePage) {
27+
_inherits(Page, _BasePage);
28+
29+
function Page() {
30+
_classCallCheck(this, Page);
31+
32+
return _possibleConstructorReturn(this, (Page.__proto__ || Object.getPrototypeOf(Page)).apply(this, arguments));
33+
}
34+
35+
return Page;
36+
}(BasePage);
37+
38+
Page.hello();
39+

0 commit comments

Comments
 (0)