Merge branch 'move-timeago-to-vendor-dir' into 'master'

move timeago.js to vendor directory

## What does this MR do?

moves timeago.js into `/vendor/assets/javascripts` for consistency with other external javascript libraries.

## Are there points in the code the reviewer needs to double check?

make sure timeago still works as it should...?  I don't see how this could have broken anything.

## Why was this MR needed?

consistency with our guidelines

## Does this MR meet the acceptance criteria?

- Tests
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

See discussion in [!6274](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6274#note_18625583)

See merge request !7590
This commit is contained in:
Alfredo Sumaran 2016-11-23 17:57:12 +00:00
commit 7100b76923
5 changed files with 15 additions and 12 deletions

View file

@ -1,4 +1,7 @@
/*= require lib/utils/timeago */
/* global Vue */
/* global timeago */
/*= require timeago */
/*= require lib/utils/text_utility */
/*= require vue_common_component/commit */
/*= require ./environment_actions */
@ -6,9 +9,6 @@
/*= require ./environment_stop */
/*= require ./environment_rollback */
/* global Vue */
/* global timeago */
(() => {
/**
* Envrionment Item Component

View file

@ -1,4 +1,10 @@
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, no-param-reassign, no-cond-assign, no-undef, comma-dangle, no-unused-expressions, prefer-template, padded-blocks, max-len */
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, no-param-reassign, no-cond-assign, comma-dangle, no-unused-expressions, prefer-template, padded-blocks, max-len */
/* global timeago */
/* global dateFormat */
/*= require timeago */
/*= require date.format */
(function() {
(function(w) {
var base;

View file

@ -2,7 +2,6 @@
/* global Build */
/* global Turbolinks */
//= require lib/utils/timeago
//= require lib/utils/datetime_utility
//= require build
//= require breakpoints

View file

@ -1,6 +1,6 @@
/* eslint-disable space-before-function-paren, quotes, comma-dangle, dot-notation, indent, quote-props, no-var, padded-blocks, max-len */
/*= require merge_request_widget */
/*= require lib/utils/timeago */
/*= require lib/utils/datetime_utility */
(function() {

View file

@ -1,5 +1,3 @@
/* eslint-disable no-unused-expressions, wrap-iife, func-names, curly, no-param-reassign, no-trailing-spaces, prefer-arrow-callback, no-var, one-var, quote-props, space-before-function-paren, vars-on-top, radix, prefer-template, space-infix-ops, no-use-before-define, newline-per-chained-call, no-useless-escape, no-nested-ternary, indent, no-undef, no-plusplus, one-var-declaration-per-line, operator-assignment, consistent-return, keyword-spacing, max-len, space-unary-ops, no-shadow, no-restricted-syntax, guard-for-in, eol-last, max-len */
/**
* Copyright (c) 2016 hustcc
* License: MIT
@ -14,7 +12,7 @@
module.exports = factory(root);
else
root.timeago = factory(root);
}(typeof window !== 'undefined' ? window : this,
}(typeof window !== 'undefined' ? window : this,
function () {
var cnt = 0, // the timer counter, for timer key
indexMapEn = 'second_minute_hour_day_week_month_year'.split('_'),
@ -32,7 +30,7 @@ function () {
SEC_ARRAY = [60, 60, 24, 7, 365/7/12, 12],
SEC_ARRAY_LEN = 6,
ATTR_DATETIME = 'datetime';
// format Date / string / timestamp to Date instance.
function toDate(input) {
if (input instanceof Date) return input;
@ -236,4 +234,4 @@ function () {
};
return timeagoFactory;
});
});