-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrating to typescript; upgrade bottom-tip; bump 0.1.2
- Loading branch information
ChenYong
committed
Aug 20, 2018
1 parent
6d93c74
commit 41bb44d
Showing
17 changed files
with
1,507 additions
and
2,014 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.target/ | ||
lib/ | ||
/node_modules/ | ||
|
||
.awcache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
|
||
/index.html | ||
/example | ||
.awcache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"printWidth": 160, | ||
"trailingComma": "es5", | ||
"arrowParens": "always" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export class Fibonacci { | ||
index: number; | ||
fibonacciNumber: number; | ||
|
||
public calculateFibonacciNumber() { | ||
this.fibonacciNumber = this.calculate(this.index); | ||
} | ||
|
||
private calculate(i: number): number { | ||
return i <= 2 ? 1 : this.calculate(i - 1) + this.calculate(i - 2); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<title>HUD</title> | ||
<script src="http://localhost:8080/bundle.js"></script> | ||
<style> | ||
body { | ||
font-family: Arial, Helvetica, sans-serif; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<p>Edit demo.js to see...</p> | ||
<p>Follow guide and edit demo.ts to try...</p> | ||
</body> | ||
|
||
</html> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import "../src"; | ||
import "./demo"; | ||
|
||
declare let module: any; | ||
|
||
if (module.hot) { | ||
module.hot.accept("./demo", function _() { | ||
console.log("reload"); | ||
}); | ||
|
||
module.hot.accept("../src", function _() { | ||
window.location.reload(); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
|
||
var path = require('path'); | ||
var path = require("path"); | ||
|
||
module.exports = { | ||
mode: "development", | ||
entry: { | ||
main: [ | ||
'./main.js' | ||
] | ||
main: ["./main"], | ||
}, | ||
performance: { | ||
hints: false | ||
hints: false, | ||
}, | ||
output: { | ||
filename: 'bundle.js', | ||
path: '/example' | ||
filename: "bundle.js", | ||
path: "/example", | ||
}, | ||
module: { | ||
rules: [ | ||
{test: /\.js$/, loader: 'babel-loader'}, | ||
{enforce: "pre", test: /demo\.js$/, loader: 'eslint-loader', | ||
query: { | ||
emitWarning: true, | ||
configFile: path.join(__dirname, '../.eslintrc.json') | ||
} | ||
} | ||
] | ||
} | ||
} | ||
{ | ||
test: /\.tsx?$/, | ||
loader: "awesome-typescript-loader", | ||
exclude: /node_modules/, | ||
}, | ||
], | ||
}, | ||
resolve: { | ||
extensions: [".tsx", ".ts", ".js"], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.