refactor(dependency): dateJS deprecated - using only momentjs

This commit is contained in:
Hêndi Marcos 2019-09-21 00:53:55 -03:00
parent 462077e519
commit f3651e7198
831 changed files with 85 additions and 845315 deletions

View file

@ -74,7 +74,6 @@
"malihu-custom-scrollbar-plugin": "^3.1.3",
"animate.css": "^3.5.1",
"jqvmap": "https://github.com/christianesperar/jqvmap.git#master",
"DateJS": "^1.0.0-rc3",
"flot.curvedlines": "^1.1.1",
"flot.orderbars": "*",
"flot-spline": "^0.8.2"

View file

@ -7,7 +7,8 @@
.daterangepicker .input-mini {
background-color: #eee;
border: 1px solid #ccc;
box-shadow: none !important; }
-webkit-box-shadow: none !important;
box-shadow: none !important; }
.daterangepicker .input-mini.active {
border: 1px solid #ccc; }
.daterangepicker select.monthselect, .daterangepicker select.yearselect, .daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.secondselect, .daterangepicker select.ampmselect {
@ -297,6 +298,7 @@ body {
padding: 0;
position: absolute;
display: -ms-flexbox;
display: -webkit-box;
display: flex;
z-index: 1; }
@ -664,7 +666,9 @@ a:hover, a:focus {
.nav.side-menu > li.active > a {
text-shadow: rgba(0, 0, 0, 0.25) 0 -1px 0;
background: -webkit-gradient(linear, left top, left bottom, from(#334556), to(#2C4257)), #2A3F54;
background: linear-gradient(#334556, #2C4257), #2A3F54;
-webkit-box-shadow: rgba(0, 0, 0, 0.25) 0 1px 0, inset rgba(255, 255, 255, 0.16) 0 1px 0;
box-shadow: rgba(0, 0, 0, 0.25) 0 1px 0, inset rgba(255, 255, 255, 0.16) 0 1px 0; }
.navbar-brand, .navbar-nav > li > a {
@ -707,7 +711,8 @@ a:hover, a:focus {
.top_search .form-control {
border-right: 0;
box-shadow: inset 0 1px 0px rgba(0, 0, 0, 0.075);
-webkit-box-shadow: inset 0 1px 0px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 0px rgba(0, 0, 0, 0.075);
border-radius: 25px 0px 0px 25px;
padding-left: 20px;
border: 1px solid rgba(221, 226, 232, 0.49); }
@ -720,7 +725,8 @@ a:hover, a:focus {
border-radius: 0px 25px 25px 0px;
border: 1px solid rgba(221, 226, 232, 0.49);
border-left: 0;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
color: #93A2B2;
margin-bottom: 0 !important; }
@ -825,6 +831,7 @@ article.media {
/* ********* custom accordion **************************** */
*, *:before, *:after {
-webkit-box-sizing: border-box;
box-sizing: border-box; }
#integration-list {
@ -917,9 +924,11 @@ h2 {
display: inline-block;
background: #fff;
border: 1px solid #E6E9ED;
-webkit-column-break-inside: avoid;
-moz-column-break-inside: avoid;
column-break-inside: avoid;
opacity: 1;
-webkit-transition: all .2s ease;
transition: all .2s ease; }
.x_title {
@ -1150,7 +1159,8 @@ table.countries_list td {
button.DTTT_button, div.DTTT_button, a.DTTT_button {
border: 1px solid #E7E7E7 !important;
background: #E7E7E7 !important;
box-shadow: none !important; }
-webkit-box-shadow: none !important;
box-shadow: none !important; }
table.jambo_table {
border: 1px solid rgba(221, 221, 221, 0.78); }
@ -1329,6 +1339,7 @@ ul.msg_list li {
background: #f7f7f7;
padding: 5px;
display: -ms-flexbox;
display: -webkit-box;
display: flex;
margin: 6px 6px 0;
width: 96% !important; }
@ -1363,7 +1374,8 @@ ul.msg_list li a .message {
.dropdown-menu {
border: medium none;
box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
display: none;
float: left;
font-size: 12px;
@ -1478,6 +1490,7 @@ ul.quick-list li i {
.widget_summary {
width: 100%;
display: -ms-inline-flexbox;
display: -webkit-inline-box;
display: inline-flex; }
.widget_summary .w_left {
@ -1714,6 +1727,7 @@ h4.graph_title {
border-radius: 5px;
background-clip: padding-box;
background: #FFF;
-webkit-transition: all 300ms ease-in-out;
transition: all 300ms ease-in-out; }
.tile-stats:hover .icon i {
@ -2023,7 +2037,8 @@ span.section {
.form-control:focus {
border-color: #CCD0D7;
box-shadow: none !important; }
-webkit-box-shadow: none !important;
box-shadow: none !important; }
legend {
font-size: 18px;
@ -2091,13 +2106,15 @@ input.parsley-error, textarea.parsley-error, select.parsley-error {
.bad input, .bad select, .bad textarea {
border: 1px solid #CE5454;
box-shadow: 0 0 4px -2px #CE5454;
-webkit-box-shadow: 0 0 4px -2px #CE5454;
box-shadow: 0 0 4px -2px #CE5454;
position: relative;
left: 0;
-moz-animation: .7s 1 shake linear;
-webkit-animation: 0.7s 1 shake linear; }
.item input, .item textarea {
-webkit-transition: 0.42s;
transition: 0.42s; }
/* alerts (when validation fails) */
@ -2114,6 +2131,7 @@ input.parsley-error, textarea.parsley-error, select.parsley-error {
left: -15px;
opacity: 0;
z-index: 1;
-webkit-transition: 0.15s ease-out;
transition: 0.15s ease-out; }
.item .alert::after {
@ -2143,7 +2161,8 @@ input.parsley-error, textarea.parsley-error, select.parsley-error {
margin: 15px 0 0 0;
background-color: #fff;
border-radius: 0 0 4px 4px;
box-shadow: none; }
-webkit-box-shadow: none;
box-shadow: none; }
.well .markup::after {
content: "Example";
@ -2211,6 +2230,7 @@ a.btn-success, a.btn-primary, a.btn-warning, a.btn-danger {
margin: 0 0 10px 10px;
min-width: 80px;
height: 60px;
-webkit-box-shadow: none;
box-shadow: none;
border-radius: 0;
text-align: center;
@ -2229,6 +2249,7 @@ a.btn-success, a.btn-primary, a.btn-warning, a.btn-danger {
border-color: #aaa; }
.btn.btn-app:active, .btn.btn-app:focus {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); }
.btn.btn-app > .badge {
@ -2262,6 +2283,7 @@ textarea:focus {
color: #333333;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
background-color: #f5f5f5;
background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
background-repeat: repeat-x;
filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0)";
@ -2271,6 +2293,7 @@ textarea:focus {
border: 1px solid #cccccc;
border-bottom-color: #b3b3b3;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); }
/* ********* /form textarea **************************** */
@ -2632,10 +2655,12 @@ ul.widget_tally .count {
filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0)";
filter: "progid:DXImageTransform.Microsoft.gradient(enabled=false)";
padding-bottom: 10px;
-webkit-box-shadow: 0 4px 6px -6px #222;
box-shadow: 0 4px 6px -6px #222; }
.widget_tally_box .flex {
display: -ms-flexbox;
display: -webkit-box;
display: flex; }
ul.widget_profile_box {
@ -2808,6 +2833,7 @@ ul.user_data li .progress {
border: 0;
padding: 7px 0;
display: -ms-flexbox;
display: -webkit-box;
display: flex; }
ul.stats-overview {
@ -2923,6 +2949,7 @@ ul.project_files li a i {
font-size: 15px;
font-weight: 700;
color: #fff;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
padding: 7px 0;
left: -5px;
@ -2930,7 +2957,8 @@ ul.project_files li a i {
width: 120px;
line-height: 20px;
background-color: #555;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.3); }
-webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
box-shadow: 0 0 3px rgba(0, 0, 0, 0.3); }
.ui-ribbon-container.ui-ribbon-primary .ui-ribbon:after, .ui-ribbon-container.ui-ribbon-primary .ui-ribbon:before {
border-top: 2px solid #5b90bf; }
@ -2971,7 +2999,8 @@ ul.project_files li a i {
overflow: hidden;
position: relative;
text-align: center;
box-shadow: 1px 1px 2px #e6e6e6;
-webkit-box-shadow: 1px 1px 2px #e6e6e6;
box-shadow: 1px 1px 2px #e6e6e6;
cursor: default; }
.view .mask, .view .content {
@ -3021,38 +3050,48 @@ ul.project_files li a i {
background: #000;
color: #fff;
text-transform: uppercase;
box-shadow: 0 0 1px #000; }
-webkit-box-shadow: 0 0 1px #000;
box-shadow: 0 0 1px #000; }
.view-first img {
-webkit-transition: all 0.2s linear;
transition: all 0.2s linear; }
.view-first .mask {
opacity: 0;
background-color: rgba(0, 0, 0, 0.5);
-webkit-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out; }
.view-first .tools {
transform: translateY(-100px);
-webkit-transform: translateY(-100px);
transform: translateY(-100px);
opacity: 0;
-webkit-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out; }
.view-first p {
transform: translateY(100px);
-webkit-transform: translateY(100px);
transform: translateY(100px);
opacity: 0;
-webkit-transition: all 0.2s linear;
transition: all 0.2s linear; }
.view-first:hover img {
transform: scale(1.1); }
-webkit-transform: scale(1.1);
transform: scale(1.1); }
.view-first:hover .mask {
opacity: 1; }
.view-first:hover .tools, .view-first:hover p {
opacity: 1;
transform: translateY(0px); }
-webkit-transform: translateY(0px);
transform: translateY(0px); }
.view-first:hover p {
transition-delay: 0.1s; }
-webkit-transition-delay: 0.1s;
transition-delay: 0.1s; }
.form-group.has-feedback span {
display: block !important; }
@ -3143,9 +3182,11 @@ ul.project_files li a i {
right: -50px; }
.sideways.tabs-right > li {
-webkit-transform: rotate(90deg);
transform: rotate(90deg); }
.sideways.tabs-left > li {
-webkit-transform: rotate(-90deg);
transform: rotate(-90deg); }
/* ********* /verticle tabs **************************** */
@ -3265,10 +3306,13 @@ a.hiddenanchor {
#signup:target ~ .login_wrapper .registration_form, #signin:target ~ .login_wrapper .login_form {
z-index: 22;
-webkit-animation-name: fadeInLeft;
animation-name: fadeInLeft;
-webkit-animation-delay: .1s;
animation-delay: .1s; }
#signup:target ~ .login_wrapper .login_form, #signin:target ~ .login_wrapper .registration_form {
-webkit-animation-name: fadeOutLeft;
animation-name: fadeOutLeft; }
.animate {
@ -3342,11 +3386,13 @@ a.hiddenanchor {
.login_content h1:after {
background: #7e7e7e;
background: -webkit-gradient(linear, left top, right top, from(#7e7e7e), to(white));
background: linear-gradient(to right, #7e7e7e 0%, white 100%);
right: 0; }
.login_content h1:before {
background: #7e7e7e;
background: -webkit-gradient(linear, right top, left top, from(#7e7e7e), to(white));
background: linear-gradient(to left, #7e7e7e 0%, white 100%);
left: 0; }
@ -3359,11 +3405,13 @@ a.hiddenanchor {
.login_content h1:after {
background: #7e7e7e;
background: -webkit-gradient(linear, left top, right top, from(#7e7e7e), to(white));
background: linear-gradient(to right, #7e7e7e 0%, white 100%);
right: 0; }
.login_content h1:before {
background: #7e7e7e;
background: -webkit-gradient(linear, right top, left top, from(#7e7e7e), to(white));
background: linear-gradient(to left, #7e7e7e 0%, white 100%);
left: 0; }
@ -3373,6 +3421,7 @@ a.hiddenanchor {
.login_content form input[type="text"], .login_content form input[type="email"], .login_content form input[type="password"] {
border-radius: 3px;
-webkit-box-shadow: 0 1px 0 #fff, 0 -2px 5px rgba(0, 0, 0, 0.08) inset;
-ms-box-shadow: 0 1px 0 #fff, 0 -2px 5px rgba(0, 0, 0, 0.08) inset;
-o-box-shadow: 0 1px 0 #fff, 0 -2px 5px rgba(0, 0, 0, 0.08) inset;
box-shadow: 0 1px 0 #fff, 0 -2px 5px rgba(0, 0, 0, 0.08) inset;
@ -3382,6 +3431,7 @@ a.hiddenanchor {
width: 100%; }
.login_content form input[type="text"]:focus, .login_content form input[type="email"]:focus, .login_content form input[type="password"]:focus {
-webkit-box-shadow: 0 0 2px #AA77B4 inset;
-ms-box-shadow: 0 0 2px #ed1c24 inset;
-o-box-shadow: 0 0 2px #ed1c24 inset;
box-shadow: 0 0 2px #A97AAD inset;
@ -3414,8 +3464,10 @@ a.hiddenanchor {
.button {
background: #f7f9fa;
background: -webkit-gradient(linear, left top, left bottom, from(#f7f9fa), to(#f0f0f0));
background: linear-gradient(to bottom, #f7f9fa 0%, #f0f0f0 100%);
filter: "progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7f9fa', endColorstr='#f0f0f0', GradientType=0)";
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset;
-ms-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset;
-o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset;
@ -3433,6 +3485,7 @@ a.hiddenanchor {
font-size: 17px;
padding: 2px 0 2px 40px;
text-decoration: none;
-webkit-transition: all 0.3s ease;
transition: all 0.3s ease; }
.button a:hover {
@ -3448,7 +3501,8 @@ header {
background: #1ABB9C; }
#nprogress .peg {
box-shadow: 0 0 10px #1ABB9C, 0 0 5px #1ABB9C; }
-webkit-box-shadow: 0 0 10px #1ABB9C, 0 0 5px #1ABB9C;
box-shadow: 0 0 10px #1ABB9C, 0 0 5px #1ABB9C; }
#nprogress .spinner-icon {
border-top-color: #1ABB9C;
@ -3462,7 +3516,9 @@ header {
border-collapse: separate;
border: 1px solid #cccccc;
padding: 4px;
box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
-webkit-box-shadow: rgba(0, 0, 0, 0.07451) 0px 1px 1px 0px inset;
box-shadow: rgba(0, 0, 0, 0.07451) 0px 1px 1px 0px inset;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
@ -3754,6 +3810,7 @@ fieldset {
pointer-events: none;
opacity: .65;
filter: alpha(opacity=65);
-webkit-box-shadow: none;
box-shadow: none; }
.actionBar a {
@ -3948,7 +4005,8 @@ ul.notifications {
float: right;
margin: 3px;
width: 36px;
box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.3); }
-webkit-box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.3);
box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.3); }
.notifications li:last-child {
margin-left: 0; }
@ -3964,7 +4022,8 @@ ul.notifications {
padding: 5px 15px;
height: 140px;
border-radius: 7px;
box-shadow: 6px 6px 6px rgba(0, 0, 0, 0.3); }
-webkit-box-shadow: 6px 6px 6px rgba(0, 0, 0, 0.3);
box-shadow: 6px 6px 6px rgba(0, 0, 0, 0.3); }
.tabbed_notifications div p {
display: inline-block; }

File diff suppressed because one or more lines are too long

View file

@ -344,8 +344,6 @@ if (typeof NProgress != 'undefined') {
console.log('init_flot_chart');
var arr_data1 = [
[gd(2012, 1, 1), 17],
[gd(2012, 1, 2), 74],
@ -408,12 +406,10 @@ if (typeof NProgress != 'undefined') {
[16, 9]
];
for (var i = 0; i < 30; i++) {
chart_plot_02_data.push([new Date(Date.today().add(i).days()).getTime(), randNum() + i + i + 10]);
chart_plot_02_data.push([new Date(moment().add(i, 'days').calendar()), randNum() + i + i + 10]);
}
var chart_plot_01_settings = {
series: {
lines: {

File diff suppressed because one or more lines are too long

View file

@ -1008,8 +1008,6 @@
<script src="../vendors/flot.orderbars/js/jquery.flot.orderBars.js"></script>
<script src="../vendors/flot-spline/js/jquery.flot.spline.min.js"></script>
<script src="../vendors/flot.curvedlines/curvedLines.js"></script>
<!-- DateJS -->
<script src="../vendors/DateJS/build/date.js"></script>
<!-- JQVMap -->
<script src="../vendors/jqvmap/dist/jquery.vmap.js"></script>
<script src="../vendors/jqvmap/dist/maps/jquery.vmap.world.js"></script>

View file

@ -759,8 +759,6 @@
<script src="../vendors/flot.orderbars/js/jquery.flot.orderBars.js"></script>
<script src="../vendors/flot-spline/js/jquery.flot.spline.min.js"></script>
<script src="../vendors/flot.curvedlines/curvedLines.js"></script>
<!-- DateJS -->
<script src="../vendors/DateJS/build/date.js"></script>
<!-- bootstrap-daterangepicker -->
<script src="../vendors/moment/min/moment.min.js"></script>
<script src="../vendors/bootstrap-daterangepicker/daterangepicker.js"></script>

View file

@ -875,8 +875,6 @@
<script src="../vendors/flot.orderbars/js/jquery.flot.orderBars.js"></script>
<script src="../vendors/flot-spline/js/jquery.flot.spline.min.js"></script>
<script src="../vendors/flot.curvedlines/curvedLines.js"></script>
<!-- DateJS -->
<script src="../vendors/DateJS/build/date.js"></script>
<!-- bootstrap-daterangepicker -->
<script src="../vendors/moment/min/moment.min.js"></script>
<script src="../vendors/bootstrap-daterangepicker/daterangepicker.js"></script>

View file

@ -309,8 +309,6 @@ if (typeof NProgress != 'undefined') {
console.log('init_flot_chart');
var arr_data1 = [
[gd(2012, 1, 1), 17],
[gd(2012, 1, 2), 74],
@ -373,12 +371,10 @@ if (typeof NProgress != 'undefined') {
[16, 9]
];
for (var i = 0; i < 30; i++) {
chart_plot_02_data.push([new Date(Date.today().add(i).days()).getTime(), randNum() + i + i + 10]);
chart_plot_02_data.push([new Date(moment().add(i, 'days').calendar()), randNum() + i + i + 10]);
}
var chart_plot_01_settings = {
series: {
lines: {

View file

@ -1,35 +0,0 @@
{
"name": "DateJS",
"version": "1.0.0-rc3",
"homepage": "https://github.com/abritinthebay/datejs",
"authors": [
"Gregory Wild-Smith"
],
"description": "Datejs is an open-source JavaScript Date Library.",
"main": "build/production/date.min.js",
"keywords": [
"date",
"javascript",
"js",
"mit"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests",
"specs"
],
"_release": "1.0.0-rc3",
"_resolution": {
"type": "version",
"tag": "v1.0.0-rc3",
"commit": "a173b13c148b8b257c0ca58dea90cb7ad616f35b"
},
"_source": "https://github.com/abritinthebay/datejs.git",
"_target": "^1.0.0-rc3",
"_originalSource": "DateJS",
"_direct": true
}

View file

@ -1,184 +0,0 @@
// GruntFile for building the final compiled files from the core.
// Run using NodeJS and the Grunt module
var fs = require("fs");
var dirs = {
core: "src/core",
i18n: "src/i18n",
build: "build"
};
var getI18NFiles = function () {
return fs.readdirSync(dirs.i18n);
};
var buildMinifyFileList = function (dev) {
var output_path = dev ? "" : "production/";
var output_ext = dev ? "." : ".min.";
var files = getI18NFiles();
var output = {};
files.map(function(item){
var file_core_name = "date-" + item.replace(".js", "");
var dest = dirs.build + "/"+output_path + file_core_name + output_ext + "js";
output[dest] = [dirs.build + "/" + file_core_name + ".js"];
return dest;
});
output[dirs.build + "/"+output_path + "date"+output_ext+"js"] = [dirs.build + "/" + "date.js"];
return output;
};
var banner = "/** \n" +
" * @overview <%= pkg.name %>\n" +
" * @version <%= pkg.version %>\n" +
" * @author <%= pkg.author.name %> <<%= pkg.author.email %>>\n" +
" * @copyright <%= grunt.template.today('yyyy') %> <%= pkg.author.name %>\n" +
" * @license <%= pkg.license %>\n" +
" * @homepage <%= pkg.homepage %>\n" +
" */";
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
dirs: dirs,
build_dev: {
description: "Builds files designed for easy debugging on dev enviroments (non-minified)"
},
build_prod: {
description: "Builds production ready files (minified)"
},
closurecompiler: {
minify: {
files: buildMinifyFileList(),
options: {
"compilation_level": "SIMPLE_OPTIMIZATIONS",
"max_processes": 5,
"banner": banner
}
}
},
concat: {
options: {
separator: "\n",
banner: banner,
nonull: true
},
core: {
src: [
"<%= dirs.core %>/i18n.js",
"<%= dirs.core %>/core.js",
"<%= dirs.core %>/core-prototypes.js",
"<%= dirs.core %>/sugarpak.js",
"<%= dirs.core %>/format_parser.js",
"<%= dirs.core %>/parsing_operators.js",
"<%= dirs.core %>/parsing_translator.js",
"<%= dirs.core %>/parsing_grammar.js",
"<%= dirs.core %>/parser.js",
"<%= dirs.core %>/extras.js",
"<%= dirs.core %>/time_span.js",
"<%= dirs.core %>/time_period.js"
],
dest: "<%= dirs.build %>/date-core.js"
},
basic: {
src: [
"<%= dirs.core %>/i18n.js",
"<%= dirs.core %>/core.js",
"<%= dirs.core %>/core-prototypes.js",
"<%= dirs.core %>/sugarpak.js",
"<%= dirs.core %>/format_parser.js",
"<%= dirs.core %>/parsing_operators.js",
"<%= dirs.core %>/parsing_translator.js",
"<%= dirs.core %>/parsing_grammar.js",
"<%= dirs.core %>/parser.js",
"<%= dirs.core %>/extras.js",
"<%= dirs.core %>/time_span.js",
"<%= dirs.core %>/time_period.js"
],
dest: "<%= dirs.build %>/date.js"
}
},
i18n: {
core: {
core: "<%= dirs.build %>/date-core.js",
src: ["<%= dirs.i18n %>/*.js"],
dest: "<%= dirs.build %>/" // destination *directory*, probably better than specifying same file names twice
}
},
shell: {
updateCodeClimate: {
command: "codeclimate < reports/lcov.info",
options: {
stdout: true,
stderr: true,
failOnError: true
}
}
},
jasmine : {
src : [
"src/core/i18n.js",
"src/core/core.js",
"src/core/core-prototypes.js",
"src/core/sugarpak.js",
"src/core/format_parser.js",
"src/core/parsing_operators.js",
"src/core/parsing_translator.js",
"src/core/parsing_grammar.js",
"src/core/parser.js",
"src/core/extras.js",
"src/core/time_period.js",
"src/core/time_span.js"
],
options : {
specs : "specs/*-spec.js",
template : require("grunt-template-jasmine-istanbul"),
templateOptions: {
template: "specs/jasmine-2.0.3/specrunner.tmpl",
coverage: "reports/coverage.json",
report: {
type: "lcov",
options: {
replace: true,
dir: "reports/"
}
}
}
}
},
});
grunt.registerMultiTask("i18n", "Wraps DateJS core with Internationalization info.", function() {
var data = this.data,
path = require("path"),
dest = grunt.template.process(data.dest),
files = grunt.file.expand(data.src),
core = grunt.file.read(grunt.template.process(data.core)),
sep = grunt.util.linefeed,
banner_compiled = grunt.template.process(banner);
files.forEach(function(f) {
var p = dest + "/" + "date-" + path.basename(f),
contents = grunt.file.read(f);
grunt.file.write(p, banner_compiled + sep + contents + sep + core );
grunt.log.writeln("File \"" + p + "\" created.");
});
grunt.file.delete(dirs.build+"/date-core.js");
});
grunt.registerMultiTask("build_dev", "Builds compiled, non-minfied, files for development enviroments", function() {
grunt.task.run(["concat:core", "concat:basic", "i18n:core"]);
});
grunt.registerMultiTask("build_prod", "Rebuilds dev and minifies files for production enviroments", function() {
grunt.task.run(["concat:core", "concat:basic", "i18n:core", "closurecompiler:minify"]);
});
grunt.loadNpmTasks("grunt-contrib-jasmine");
// now set the default
grunt.registerTask("default", ["build_dev"]);
// Load the plugin that provides the "minify" task.
grunt.loadNpmTasks("grunt-shell");
grunt.loadNpmTasks("grunt-closurecompiler");
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.registerTask("test", ["jasmine", "shell:updateCodeClimate"]);
};

View file

@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2013 Gregory Wild-Smith
Original Project Copyright (c) 2006-2008 Geoffrey McGill at Cooline Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -1,48 +0,0 @@
# DateJS: Evolved
The JavaScript Date Library
[![Build Status](https://travis-ci.org/abritinthebay/datejs.svg?branch=master)](https://travis-ci.org/abritinthebay/datejs)
[![NPM version](https://badge.fury.io/js/datejs.svg)](http://badge.fury.io/js/datejs)
[![Code Climate](https://codeclimate.com/github/abritinthebay/datejs.svg)](https://codeclimate.com/github/abritinthebay/datejs)
[![Test Coverage](https://codeclimate.com/github/abritinthebay/datejs/badges/coverage.svg)](https://codeclimate.com/github/abritinthebay/datejs)
[![NPM](https://nodei.co/npm/datejs.png?downloadRank=true)](https://nodei.co/npm/datejs/)
## What is it?
DateJS extends the built-in JavaScript Date object to add much better parsing, internationalization support, and all the functions and syntactic sugar you could wish for.
### Background
Date JS was started by Geoffrey McGill in 2007, he abandoned it on May 13th 2008; leaving the Google Code repository stagnant and with many bugs unresolved.
This fork was started improve and maintain DateJS. To keep what is still the most full featured JavaScript Date library alive, maintained, and improved. Currently we're on track towards a 1.0 release - having fixed almost all the existing bugs and added several new features, improved parsing, and many other changes.
### How to Install/Use
DateJS supports running either your regular web browser as a client library or Node.js.
#### In Node.js
Installation is as easy as running:
npm install datejs
#### For a Browser
If you use [Bower](http://bower.io/) to manage your frontend packages then it's also really simple:
bower install datejs
Otherwise...
* For production environments include [the production ready minified file from the Build directory](https://github.com/abritinthebay/datejs/blob/master/build/production/date.min.js) on your page.
* For debugging (eg, in development) include [the unminified and fully commented version](https://github.com/abritinthebay/datejs/blob/master/build/date.js)
#### International Language Versions
In Node.js you can just call `Date.i18n.setLanguage` with the IETF appropriate code (e.g. "de-DE", or "es-MX") and DateJS will load the file automatically. For the browser DateJS has langauge support in one of two ways:
1. Either download the appropriate file from [the Build directory of your choice](https://github.com/abritinthebay/datejs/blob/master/build/). Files are named after the IETF code the load (i.e. `date-es-MX.js` loads Mexican Spanish).
2. Or set `Date.Config.i18n` to the location of [the internationalization files](https://github.com/abritinthebay/datejs/blob/master/build/i18n/) on your server and DateJS will dynamically load the files by script element insertion.
DateJS will always support loading US English via `Date.i18n.setLanguage("en-US")` no matter what other language is specifically loaded. So you can always support both your localization and the English speaking world.
## File Structure
* `build` Output from the Grunt powered build process
* `development` Non-minified files with full comments. Suitable for development environments.
* `production` Fully minified (by Google's Closure Compiler) files suitable for production.
* `src` All the source files used to build the final files.
* `core` The main DateJS source files.
* `i18n` Internationalization files. Language specifics (days of the week, regex formats,etc). Organized by IETF language tag (eg - en-US, etc).
* `specs` Unit Tests written using [Jasmine](http://pivotal.github.io/jasmine/). Code coverage is calculated by [BlanketJS](http://blanketjs.org/).
* `tests` Orginal unit tests for 2008 project. *Deprecated*

View file

@ -1,25 +0,0 @@
{
"name": "DateJS",
"version": "1.0.0-rc1",
"homepage": "https://github.com/abritinthebay/datejs",
"authors": [
"Gregory Wild-Smith"
],
"description": "Datejs is an open-source JavaScript Date Library.",
"main": "build/production/date.min.js",
"keywords": [
"date",
"javascript",
"js",
"mit"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests",
"specs"
]
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

Some files were not shown because too many files have changed in this diff Show more