Skip to content
This repository was archived by the owner on Mar 25, 2024. It is now read-only.

Commit b753160

Browse files
committed
Tools update.
1 parent c60cdf0 commit b753160

File tree

4 files changed

+21
-58
lines changed

4 files changed

+21
-58
lines changed

tools/config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ import {normalize, join} from 'path';
77
export const PROJECT_ROOT = normalize(join(__dirname, '..'));
88
export const ENV = argv['env'] || 'dev';
99
export const DEBUG = argv['debug'] || false;
10-
export const PORT = argv['port'] || 3000;
11-
export const LIVE_RELOAD_PORT = argv['reload-port'] || 3001;
10+
export const PORT = argv['port'] || 5555;
11+
export const LIVE_RELOAD_PORT = argv['reload-port'] || 4002;
1212
export const DOCS_PORT = argv['docs-port'] || 4003;
1313
export const APP_BASE = argv['base'] || '/';
14-
1514
export const BACKEND_URL = argv['backend-url'] || 'http://wunder.sytes.net:1339';
1615

1716
export const ENABLE_HOT_LOADING = !!argv['hot-loader'];
@@ -37,7 +36,7 @@ export const LIB_DEST = `${APP_DEST}/lib`;
3736
export const APP_ROOT = ENV === 'dev' ? `${APP_BASE}${APP_DEST}/` : `${APP_BASE}`;
3837
export const VERSION = appVersion();
3938

40-
export const VERSION_NPM = '2.14.7';
39+
export const VERSION_NPM = '2.14.2';
4140
export const VERSION_NODE = '4.0.0';
4241

4342
// Declare NPM dependencies (Note that globs should not be injected).
@@ -103,6 +102,7 @@ export const SYSTEM_CONFIG_BUILDER = {
103102
}
104103
};
105104

105+
106106
// --------------
107107
// Private.
108108
function appVersion(): number|string {

tools/utils/server.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ export function serveSPA() {
1212
server.use.apply(server, codeChangeTool.middleware);
1313

1414
server.listen(PORT, () => {
15-
util.log('Server is listening on: http://localhost:' + PORT + APP_BASE + APP_DEST);
16-
15+
util.log('Server is listening on port: ' + PORT);
1716
openResource('http://localhost:' + PORT + APP_BASE + APP_DEST);
1817
});
1918
}
@@ -26,14 +25,12 @@ export function notifyLiveReload(e) {
2625
export function serveDocs() {
2726
let server = express();
2827

29-
server.use(
28+
server.use(
3029
APP_BASE,
3130
serveStatic(resolve(process.cwd(), DOCS_DEST))
3231
);
3332

34-
server.listen(DOCS_PORT, () => {
35-
util.log('Server is listening on port: ' + PORT);
36-
37-
openResource('http://localhost:' + DOCS_PORT + APP_BASE);
38-
});
33+
server.listen(DOCS_PORT, () =>
34+
openResource('http://localhost:' + DOCS_PORT + APP_BASE)
35+
);
3936
}

tools/utils/tasks-tools.ts

Lines changed: 0 additions & 44 deletions
This file was deleted.

tools/utils/template_locals.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
import {APP_BASE, APP_DEST, APP_ROOT, APP_TITLE, SYSTEM_CONFIG, VERSION, HOT_LOADER_PORT, BOOTSTRAP_MODULE, BACKEND_URL} from '../config';
1+
import {
2+
APP_BASE,
3+
APP_DEST,
4+
APP_ROOT,
5+
APP_TITLE,
6+
SYSTEM_CONFIG,
7+
VERSION,
8+
HOT_LOADER_PORT,
9+
BOOTSTRAP_MODULE,
10+
BACKEND_URL
11+
} from '../config';
212

313
// TODO: Add an interface to register more template locals.
414
export function templateLocals() {
@@ -9,8 +19,8 @@ export function templateLocals() {
919
APP_TITLE,
1020
SYSTEM_CONFIG,
1121
VERSION,
12-
BOOTSTRAP_MODULE,
1322
HOT_LOADER_PORT,
23+
BOOTSTRAP_MODULE,
1424
BACKEND_URL
1525
};
1626
}

0 commit comments

Comments
 (0)