Skip to content

Commit d2d9d39

Browse files
committed
standard build
1 parent 2c2d92d commit d2d9d39

File tree

6 files changed

+277
-3
lines changed

6 files changed

+277
-3
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
node_modules
2-
dist
32
other

dist/login_1.jpg

149 KB
Loading

dist/standard.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
6+
<title>TooNote</title>
7+
<style>
8+
*{
9+
margin:0;
10+
padding:0;
11+
box-sizing: border-box;
12+
}
13+
</style>
14+
</head>
15+
<body>
16+
<div id="container"></div>
17+
<script type="text/javascript" src="/dist/standard.js"></script></body>
18+
</html>

dist/standard.js

+250
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/entry/standard.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,15 @@ import WebClientController from '../controller/main';
99
import WebClientModel from '../model/main';
1010
import view from '../view/main';
1111

12+
declare var process:any;
13+
14+
const BASE_URL = process.env.NODE_ENV === 'production' ?
15+
'https://api.xiaotu.io':
16+
'https://test-api.xiaotu.io';
17+
1218
const model = new WebClientModel({
1319
localStorage: 'ls',
14-
endpoint: 'https://test-api.xiaotu.io/api/v2/',
20+
endpoint: BASE_URL + '/api/v2/',
1521
headers: {}
1622
})
1723

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
88
"dev": "webpack-dev-server",
9-
"build:dev": "webpack"
9+
"build:dev": "webpack",
10+
"build:prod": "NODE_ENV=production webpack"
1011
},
1112
"repository": {
1213
"type": "git",

0 commit comments

Comments
 (0)