Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit ae20237

Browse files
committed
Spring cleaning
* Replaced tsd with @types. * Removed triple-slash references (///<reference/>). * Implemented ES6 style coding. * Replaced gulp with webpack. * Added karma-typescript for unit testing. * Removed minified files. Dist files will always be minified.
1 parent e119854 commit ae20237

25 files changed

+933
-6560
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.publish
2+
.vscode
23
node_modules
3-
bower_components
4+
bower_components
5+
coverage

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2013 Dzulqarnain Nasir
3+
Copyright (c) 2017 Dzulqarnain Nasir
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

bower.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-dateParser",
3-
"version": "1.1.0",
3+
"version": "1.2.0-prerelease",
44
"main": "./dist/angular-dateparser.js",
55
"homepage": "https://github.com/dnasir/angular-dateParser",
66
"authors": [
@@ -15,10 +15,10 @@
1515
"test"
1616
],
1717
"dependencies": {
18-
"angular": "^1.4.9",
19-
"angular-i18n": "^1.4.9"
18+
"angular": "^1.6.4",
19+
"angular-i18n": "^1.6.4"
2020
},
2121
"devDependencies": {
22-
"angular-mocks": "^1.4.9"
22+
"angular-mocks": "^1.6.4"
2323
}
2424
}

dist/angular-dateparser.js

Lines changed: 23 additions & 377 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-dateparser.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-dateparser.min.js

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

dist/angular-dateparser.min.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

gulpfile.js

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

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,14 +318,14 @@ <h6>Code</h6>
318318
</div>
319319
</footer>
320320

321-
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular.min.js"></script>
321+
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.min.js"></script>
322322
<script src="//cdnjs.cloudflare.com/ajax/libs/angular-dynamic-locale/0.1.32/tmhDynamicLocale.min.js"></script>
323323
<script src="dist/angular-dateparser.js"></script>
324324
<script>
325325
angular.module('demoApp', ['dateParser', 'tmh.dynamicLocale'])
326326
.config(function($dateParserProvider, tmhDynamicLocaleProvider) {
327327
$dateParserProvider.watchLocale(true);
328-
tmhDynamicLocaleProvider.localeLocationPattern('//cdnjs.cloudflare.com/ajax/libs/angular-i18n/1.4.9/angular-locale_{{locale}}.js');
328+
tmhDynamicLocaleProvider.localeLocationPattern('//cdnjs.cloudflare.com/ajax/libs/angular-i18n/1.6.4/angular-locale_{{locale}}.js');
329329
})
330330
.controller('controller', function($scope, tmhDynamicLocale){
331331
$scope.format = 'dd.MM.yyyy';

karma.conf.js

Lines changed: 13 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,18 @@
1-
// Karma configuration
2-
// Generated on Sun Dec 22 2013 01:44:57 GMT+0200 (FLE Standard Time)
1+
module.exports = function (config) {
2+
config.set({
33

4-
module.exports = function(config) {
5-
config.set({
4+
frameworks: ["jasmine", "karma-typescript"],
65

7-
// base path, that will be used to resolve files and exclude
8-
basePath: '',
6+
files: [{
7+
pattern: "src/**/*.ts"
8+
}],
99

10+
preprocessors: {
11+
"**/*.ts": ["karma-typescript"]
12+
},
1013

11-
// frameworks to use
12-
frameworks: ['jasmine'],
14+
reporters: ["progress", "karma-typescript"],
1315

14-
15-
// list of files / patterns to load in the browser
16-
files: [
17-
'node_modules/angular/angular.js',
18-
'node_modules/angular-mocks/angular-mocks.js',
19-
'dist/angular-dateparser.js',
20-
'test/*.js'
21-
],
22-
23-
24-
// list of files to exclude
25-
exclude: [
26-
27-
],
28-
29-
30-
// test results reporter to use
31-
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
32-
reporters: ['progress'],
33-
34-
35-
// web server port
36-
port: 9876,
37-
38-
39-
// enable / disable colors in the output (reporters and logs)
40-
colors: true,
41-
42-
43-
// level of logging
44-
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
45-
logLevel: config.LOG_INFO,
46-
47-
48-
// enable / disable watching file and executing tests whenever any file changes
49-
autoWatch: true,
50-
51-
52-
// Start these browsers, currently available:
53-
// - Chrome
54-
// - ChromeCanary
55-
// - Firefox
56-
// - Opera (has to be installed with `npm install karma-opera-launcher`)
57-
// - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`)
58-
// - PhantomJS
59-
// - IE (only Windows; has to be installed with `npm install karma-ie-launcher`)
60-
browsers: ['Chrome'],
61-
62-
63-
// If browser does not capture in given timeout [ms], kill it
64-
captureTimeout: 60000,
65-
66-
67-
// Continuous Integration mode
68-
// if true, it capture browsers, run tests and exit
69-
singleRun: false
70-
});
71-
};
16+
browsers: ["Chrome"]
17+
});
18+
};

0 commit comments

Comments
 (0)