Skip to content

Commit bc92442

Browse files
committed
change CRLF to LF
1 parent 61116b1 commit bc92442

File tree

14 files changed

+12985
-12985
lines changed

14 files changed

+12985
-12985
lines changed
Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
/// <reference path="angular-environment.d.ts" />
2-
var envServiceProvider: angular.environment.ServiceProvider;
3-
var envService: angular.environment.Service;
4-
5-
envServiceProvider.config({
6-
domains: {
7-
development: ['localhost', 'dev.local'],
8-
production: ['acme.com', 'acme.net', 'acme.org']
9-
},
10-
vars: {
11-
development: {
12-
apiUrl: '//localhost/api',
13-
staticUrl: '//localhost/static'
14-
},
15-
production: {
16-
apiUrl: '//api.acme.com/v2',
17-
staticUrl: '//static.acme.com'
18-
}
19-
}
20-
});
21-
22-
envServiceProvider.check();
23-
24-
envService.get();
25-
26-
envService.set('production');
27-
28-
var isProd: boolean = envService.is('production');
29-
30-
var val: any = envService.read('apiUrl');
1+
/// <reference path="angular-environment.d.ts" />
2+
var envServiceProvider: angular.environment.ServiceProvider;
3+
var envService: angular.environment.Service;
4+
5+
envServiceProvider.config({
6+
domains: {
7+
development: ['localhost', 'dev.local'],
8+
production: ['acme.com', 'acme.net', 'acme.org']
9+
},
10+
vars: {
11+
development: {
12+
apiUrl: '//localhost/api',
13+
staticUrl: '//localhost/static'
14+
},
15+
production: {
16+
apiUrl: '//api.acme.com/v2',
17+
staticUrl: '//static.acme.com'
18+
}
19+
}
20+
});
21+
22+
envServiceProvider.check();
23+
24+
envService.get();
25+
26+
envService.set('production');
27+
28+
var isProd: boolean = envService.is('production');
29+
30+
var val: any = envService.read('apiUrl');
Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
1-
// Type definitions for angular-environment v1.0.4
2-
// Project: https://github.com/juanpablob/angular-environment
3-
// Definitions by: Matt Wheatley <https://github.com/terrawheat>
4-
// Definitions: https://github.com/LiberisLabs
5-
6-
declare module angular.environment {
7-
interface ServiceProvider {
8-
/**
9-
* Sets the configuration object
10-
*/
11-
config: (config: angular.environment.Config) => void;
12-
/**
13-
* Evaluates the current domain and
14-
* loads the correct environment variables.
15-
*/
16-
check: () => void;
17-
}
18-
interface Service {
19-
/**
20-
* Retrieve the current environment
21-
*/
22-
get: () => string,
23-
24-
/**
25-
* Force sets the current environment
26-
*/
27-
set: (environment: string) => void,
28-
29-
/**
30-
* Evaluates current environment against
31-
* environment parameter.
32-
*/
33-
is: (environment: string) => boolean,
34-
35-
/**
36-
* Retrieves the correct version of a
37-
* variable for the current environment.
38-
*/
39-
read: (key: string) => any;
40-
}
41-
42-
interface Config {
43-
/**
44-
* Map of domains to their environments
45-
*/
46-
domains: { [environment: string]: Array<string> },
47-
/**
48-
* List of variables split by environment
49-
*/
50-
vars: { [environment: string]: { [variable: string]: any }},
51-
}
52-
}
1+
// Type definitions for angular-environment v1.0.4
2+
// Project: https://github.com/juanpablob/angular-environment
3+
// Definitions by: Matt Wheatley <https://github.com/terrawheat>
4+
// Definitions: https://github.com/LiberisLabs
5+
6+
declare module angular.environment {
7+
interface ServiceProvider {
8+
/**
9+
* Sets the configuration object
10+
*/
11+
config: (config: angular.environment.Config) => void;
12+
/**
13+
* Evaluates the current domain and
14+
* loads the correct environment variables.
15+
*/
16+
check: () => void;
17+
}
18+
interface Service {
19+
/**
20+
* Retrieve the current environment
21+
*/
22+
get: () => string,
23+
24+
/**
25+
* Force sets the current environment
26+
*/
27+
set: (environment: string) => void,
28+
29+
/**
30+
* Evaluates current environment against
31+
* environment parameter.
32+
*/
33+
is: (environment: string) => boolean,
34+
35+
/**
36+
* Retrieves the correct version of a
37+
* variable for the current environment.
38+
*/
39+
read: (key: string) => any;
40+
}
41+
42+
interface Config {
43+
/**
44+
* Map of domains to their environments
45+
*/
46+
domains: { [environment: string]: Array<string> },
47+
/**
48+
* List of variables split by environment
49+
*/
50+
vars: { [environment: string]: { [variable: string]: any }},
51+
}
52+
}

express/express-tests.ts

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,70 @@
1-
/// <reference path="express.d.ts" />
2-
3-
import * as express from 'express';
4-
var app = express();
5-
6-
app.engine('jade', require('jade').__express);
7-
app.engine('html', require('ejs').renderFile);
8-
9-
express.static.mime.define({
10-
'application/fx': ['fx']
11-
});
12-
app.use('/static', express.static(__dirname + '/public'));
13-
14-
// simple logger
15-
app.use(function(req, res, next){
16-
console.log('%s %s', req.method, req.url);
17-
next();
18-
});
19-
20-
app.use(function(err: any, req: express.Request, res: express.Response, next: express.NextFunction) {
21-
console.error(err);
22-
next(err);
23-
});
24-
25-
26-
app.get('/', function(req, res){
27-
res.send('hello world');
28-
});
29-
30-
const router = express.Router();
31-
32-
33-
const pathStr : string = 'test';
34-
const pathRE : RegExp = /test/;
35-
const path = true? pathStr : pathRE;
36-
37-
router.get(path);
38-
router.put(path)
39-
router.post(path);
40-
router.delete(path);
41-
router.get(pathStr);
42-
router.put(pathStr)
43-
router.post(pathStr);
44-
router.delete(pathStr);
45-
router.get(pathRE);
46-
router.put(pathRE)
47-
router.post(pathRE);
48-
router.delete(pathRE);
49-
50-
router.use((req, res, next) => { next(); })
51-
router.route('/users')
52-
.get((req, res, next) => {
53-
res.send(req.query['token']);
54-
});
55-
56-
router.get('/user/:id', function(req, res, next) {
57-
if (req.params.id == 0) next('route');
58-
else next();
59-
}, function(req, res, next) {
60-
res.render('regular');
61-
});
62-
63-
app.use((req, res, next) => {
64-
// hacky trick, router is just a handler
65-
router(req, res, next);
66-
});
67-
68-
app.use(router);
69-
70-
app.listen(3000);
1+
/// <reference path="express.d.ts" />
2+
3+
import * as express from 'express';
4+
var app = express();
5+
6+
app.engine('jade', require('jade').__express);
7+
app.engine('html', require('ejs').renderFile);
8+
9+
express.static.mime.define({
10+
'application/fx': ['fx']
11+
});
12+
app.use('/static', express.static(__dirname + '/public'));
13+
14+
// simple logger
15+
app.use(function(req, res, next){
16+
console.log('%s %s', req.method, req.url);
17+
next();
18+
});
19+
20+
app.use(function(err: any, req: express.Request, res: express.Response, next: express.NextFunction) {
21+
console.error(err);
22+
next(err);
23+
});
24+
25+
26+
app.get('/', function(req, res){
27+
res.send('hello world');
28+
});
29+
30+
const router = express.Router();
31+
32+
33+
const pathStr : string = 'test';
34+
const pathRE : RegExp = /test/;
35+
const path = true? pathStr : pathRE;
36+
37+
router.get(path);
38+
router.put(path)
39+
router.post(path);
40+
router.delete(path);
41+
router.get(pathStr);
42+
router.put(pathStr)
43+
router.post(pathStr);
44+
router.delete(pathStr);
45+
router.get(pathRE);
46+
router.put(pathRE)
47+
router.post(pathRE);
48+
router.delete(pathRE);
49+
50+
router.use((req, res, next) => { next(); })
51+
router.route('/users')
52+
.get((req, res, next) => {
53+
res.send(req.query['token']);
54+
});
55+
56+
router.get('/user/:id', function(req, res, next) {
57+
if (req.params.id == 0) next('route');
58+
else next();
59+
}, function(req, res, next) {
60+
res.render('regular');
61+
});
62+
63+
app.use((req, res, next) => {
64+
// hacky trick, router is just a handler
65+
router(req, res, next);
66+
});
67+
68+
app.use(router);
69+
70+
app.listen(3000);

0 commit comments

Comments
 (0)