1
0
mirror of https://github.com/taigaio/taiga-front synced 2025-10-06 02:12:40 +02:00

feat(core): upgrade

This commit is contained in:
Juanfran
2020-08-12 08:59:56 +02:00
committed by Miguel Gonzalez
parent 6442ca0253
commit 94221d9b01
41 changed files with 18667 additions and 400 deletions

16
.editorconfig Normal file
View File

@@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
[*.ts]
quote_type = single
[*.md]
max_line_length = off
trim_trailing_whitespace = false

2
.nvmrc
View File

@@ -1 +1 @@
7.2.1
v12.17.0

View File

@@ -1,140 +0,0 @@
linters:
BorderZero:
enabled: true
CapitalizationInSelector:
enabled: true
ignored_names:
- "mCS-minimal-dark"
ColorKeyword:
enabled: true
Comment:
enabled: true
DebugStatement:
enabled: true
DeclarationOrder:
enabled: true
DuplicateProperty:
enabled: true
ElsePlacement:
enabled: true
style: same_line # or 'new_line'
EmptyLineBetweenBlocks:
enabled: false
ignore_single_line_blocks: true
EmptyRule:
enabled: true
FinalNewline:
enabled: true
present: true
HexLength:
enabled: true
style: short # or 'long'
HexNotation:
enabled: true
style: lowercase # or 'uppercase'
HexValidation:
enabled: true
IdWithExtraneousSelector:
enabled: true
Indentation:
enabled: true
width: 4
LeadingZero:
enabled: true
style: exclude_zero # or 'include_zero'
MergeableSelector:
enabled: true
force_nesting: true
NameFormat:
enabled: true
convention: hyphenated_lowercase # or 'BEM', or a regex pattern
PlaceholderInExtend:
enabled: true
PropertySortOrder:
enabled: true
PropertySpelling:
enabled: true
extra_properties: []
QualifyingElement:
enabled: true
allow_element_with_attribute: true
exclude:
- 'app/styles/components/buttons.scss'
- 'app/styles/layout/forms.scss'
- 'app/styles/components/markdown-help.scss'
SelectorDepth:
enabled: true
max_depth: 4
Shorthand:
enabled: true
SingleLinePerSelector:
enabled: true
SpaceAfterComma:
enabled: true
SpaceAfterPropertyColon:
enabled: true
style: one_space # or 'no_space', or 'at_least_one_space', or 'aligned'
SpaceAfterPropertyName:
enabled: true
SpaceBeforeBrace:
enabled: true
allow_single_line_padding: false
SpaceBetweenParens:
enabled: true
spaces: 0
StringQuotes:
enabled: true
style: single_quotes # or double_quotes
TrailingSemicolonAfterPropertyValue:
enabled: true
UnnecessaryMantissa:
enabled: true
UrlFormat:
enabled: true
UrlQuotes:
enabled: true
ZeroUnit:
enabled: true
NestingDepth:
enabled: true
max_depth: 4
Compass::*:
enabled: false

84
.stylelintrc.js Normal file
View File

@@ -0,0 +1,84 @@
/**
* Copyright (c) 2014-2020 Taiga Agile LLC
*
* This source code is licensed under the terms of the
* GNU Affero General Public License found in the LICENSE file in
* the root directory of this source tree.
*/
module.exports = {
root: true,
extends: ['stylelint-config-standard'],
plugins: ['stylelint-order', 'stylelint-scss'],
rules: {
'at-rule-no-unknown': [
true,
{
ignoreAtRules: ['define-mixin', 'mixin', 'include', 'extend', 'each', 'for'],
},
],
// Using quotes
'font-family-name-quotes': 'always-unless-keyword',
'function-url-quotes': 'always',
'selector-attribute-quotes': 'always',
'string-quotes': 'single',
// Disallow vendor prefixes
'at-rule-no-vendor-prefix': true,
'media-feature-name-no-vendor-prefix': true,
'property-no-vendor-prefix': true,
'selector-no-vendor-prefix': true,
'value-no-vendor-prefix': true,
// Specificity
'max-nesting-depth': 4,
'selector-max-specificity': "1,2,1",
// Miscellanea
'color-named': 'never',
'color-no-hex': true,
'declaration-no-important': true,
'declaration-property-unit-whitelist': {
"font-size": ["rem", "em"], // todo: no em?
"/^animation/": ["s"]
},
'number-leading-zero': 'never',
'order/properties-alphabetical-order': true,
'selector-max-type': 1,
'selector-type-no-unknown': [
true,
{
ignore: ['custom-elements'],
},
],
// Notation
'font-weight-notation': 'numeric',
// URLs
'function-url-no-scheme-relative': true,
// Max line length
'max-line-length': [
120,
{
ignore: ['comments'],
}
],
// Fix
"indentation": [
4
],
"rule-empty-line-before": null,
"declaration-empty-line-before": null,
"no-empty-source": null,
"selector-combinator-space-after": null,
"selector-max-type": null,
"no-descending-specificity": null,
"max-empty-lines": null,
"block-closing-brace-empty-line-before": null,
'selector-max-compound-selectors': 5,
"block-closing-brace-empty-line-before": null,
"selector-combinator-space-before": null,
"at-rule-empty-line-before": null,
"function-calc-no-unspaced-operator": null,
"declaration-property-unit-whitelist": null,
"font-weight-notation": null,
"font-family-no-missing-generic-family-keyword": null
},
};

View File

@@ -111,26 +111,11 @@ All the information about the different installation methods (production, develo
Install requirements:
**Ruby / Sass**
You can install Ruby through the apt package manager, rbenv, or rvm.
Install Sass through your **Terminal or Command Prompt**.
```
gem install sass scss-lint
export PATH="~/.gem/ruby/2.1.0/bin:$PATH"
sass -v # should return Sass 3.3.8 (Maptastic Maple)
```
Complete process for all OS at: http://sass-lang.com/install
**Node + Gulp**
We recommend using [nvm](https://github.com/creationix/nvm) to manage different node versions
```
npm install -g gulp
npm install
gulp
npm start
```
And go in your browser to: http://localhost:9001/
@@ -156,7 +141,7 @@ To run a local Selenium Server, you will need to have the Java Development Kit (
- To run **unit tests**
```
gulp
npx gulp
```
```
npm test
@@ -167,7 +152,7 @@ To run a local Selenium Server, you will need to have the Java Development Kit (
- To run **e2e tests** you need [taiga-back](https://github.com/taigaio/taiga-back) running and
```
gulp
npx gulp
```
```
webdriver-manager start

View File

@@ -714,7 +714,7 @@ ProjectCustomAttributesDirective = ($log, $confirm, animationFrame, $translate)
itemAttr = itemEl.scope().attr
itemIndex = itemEl.index()
$ctrl.moveCustomAttributes(itemAttr, itemIndex)
sortableChildren = $el.find(".js-child-sortable")
for el in sortableChildren
drake[el] = dragula([el], {
@@ -936,7 +936,7 @@ ProjectCustomAttributesDirective = ($log, $confirm, animationFrame, $translate)
hideExtra = (index) ->
$scope.isExtraVisible[index] = false
_manageExtraFormEvent = (event, callback) ->
event.preventDefault()
formEl = angular.element(event.currentTarget).closest("form")
@@ -969,7 +969,7 @@ ProjectCustomAttributesDirective = ($log, $confirm, animationFrame, $translate)
_manageFormEvent(event, create)
else if event.keyCode == 27 # Esc
cancelCreate()
$el.on "click", ".js-add-option-custom-field-extra-button", debounce 500, (event) ->
_manageExtraFormEvent(event, addExtraOption)

View File

@@ -24,7 +24,6 @@ class HttpService extends taiga.Service
constructor: (@http, @q, @tgLoader, @storage, @rootScope, @cacheFactory, @translate) ->
super()
@.cache = @cacheFactory("httpget")
headers: ->
headers = {}

View File

@@ -55,4 +55,4 @@ class UserPilotService extends taiga.Service
}
)
module.service("$tgUserPilot", UserPilotService)
module.service("$tgUserPilot", UserPilotService)

View File

@@ -287,7 +287,7 @@ class UserStoryDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
)
@rootscope.$broadcast("related-tasks:reordered")
module.controller("UserStoryDetailController", UserStoryDetailController)

View File

@@ -110,7 +110,7 @@ class AttachmentsFullService extends taiga.Service
patch = {order: attachment.getIn(['file', 'order'])}
promises.push @attachmentsService.patch(attachment.getIn(['file', 'id']), type, patch)
return Promise.all(promises).then () =>
@._attachments = attachments

View File

@@ -17,29 +17,29 @@ $track-radius: 1px;
$contrast: 2;
@mixin track() {
width: $track-width;
height: $track-height;
cursor: pointer;
height: $track-height;
transition: all .2s ease;
width: $track-width;
}
@mixin thumb() {
border: $thumb-border-width solid $thumb-border-color;
height: $thumb-height;
width: $thumb-width;
border-radius: $thumb-radius;
background: $thumb-color;
cursor: pointer;
border: $thumb-border-width solid $thumb-border-color;
border-radius: $thumb-radius;
box-shadow: 0 0 0 2px $thumb-shadow;
cursor: pointer;
height: $thumb-height;
transition: box-shadow .2s;
width: $thumb-width;
}
.range-slider {
/* stylelint-disable property-no-vendor-prefix */
-webkit-appearance: none;
display: block;
margin: $thumb-height / 2 0;
width: $track-width;
&:focus {
outline: 0;
@@ -107,5 +107,5 @@ $contrast: 2;
&::-ms-thumb {
@include thumb();
}
/* stylelint-enable property-no-vendor-prefix */
}

View File

@@ -2,9 +2,9 @@
border-radius: 2px;
cursor: pointer;
height: 2.25rem;
width: 2.25rem;
min-width: 2.25rem;
margin: 0 .5rem .5rem 0;
min-width: 2.25rem;
width: 2.25rem;
&:nth-child(7n) {
margin-right: 0;
}

View File

@@ -1,6 +1,8 @@
// custom colors
/* stylelint-disable color-no-hex */
$exclude-background: #fcc;
$radio-mark-background: #d6d5d5;
/* stylelint-enable color-no-hex */
tg-filter {
@include sidebar-medium-width-hidden-absolute();
@@ -50,7 +52,7 @@ tg-filter {
.custom-radio {
display: inline;
input[type=radio] {
input[type='radio'] {
display: none;
}
}

View File

@@ -1,9 +1,11 @@
//Tips colors
/* stylelint-disable color-no-hex */
$tip-color-1: #ae4fb0;
$tip-color-2: #4e88df;
$tip-color-3: #6360d6;
$tip-color-4: #47b3a6;
$tip-color-5: #d76969;
/* stylelint-enable color-no-hex */
$tips-colors: $tip-color-1 $tip-color-2 $tip-color-3 $tip-color-4 $tip-color-5;

View File

@@ -88,12 +88,12 @@
margin: 0;
}
}
pre:not([class*="language-"]) {
pre:not([class*='language-']) {
@include font-size(small);
background: $code-bg;
color: $whitish;
direction: ltr;
font-family: 'courier new', 'monospace';
font-family: 'courier new', monospace;
line-height: 1.4rem;
margin-bottom: .5rem;
overflow: auto;
@@ -106,7 +106,7 @@
background: $code-bg;
color: $whitish;
direction: ltr;
font-family: 'courier new', 'monospace';
font-family: 'courier new', monospace;
overflow: auto;
padding: .2rem;
unicode-bidi: embed;
@@ -178,7 +178,7 @@
tg-wysiwyg {
display: flex;
margin-bottom: 2rem;
div[contenteditable="true"] *:last-child {
div[contenteditable='true'] *:last-child {
margin-bottom: 0;
}
pre {

View File

@@ -25,7 +25,7 @@
margin: 0 .5rem;
}
}
input[type="text"] {
input[type='text'] {
background: $white;
border: 0;
padding: 1rem;

View File

@@ -121,7 +121,7 @@ class NotificationsService extends taiga.Service
_addNotificationAttributes: (notification) ->
event_type = notification.get('event_type')
type = @._getType(notification)
title = @._getTitle(notification, event_type, type)

View File

@@ -20,7 +20,7 @@
taiga = @.taiga
class ThemeService extends taiga.Service = ->
class ThemeService extends taiga.Service
use: (themeName) ->
stylesheetEl = $("link[rel='stylesheet']:first")

View File

@@ -297,7 +297,7 @@
display: none;
&:checked {
+label {
background: $primary;
background-color: $grey-70;
transition: background .3s linear;
}
}
@@ -314,7 +314,4 @@
transition: background .3s linear;
}
}
input:checked + label {
background-color: $grey-70;
}
}

View File

@@ -52,7 +52,15 @@
}
}
.popover {
@include popover(200px, $top: 100%, $left: .5rem, $arrow-width: 10px, $arrow-top: -5px, $arrow-left: 10px, $arrow-height: 10px);
@include popover(
200px,
$top: 100%,
$left: .5rem,
$arrow-width: 10px,
$arrow-top: -5px,
$arrow-left: 10px,
$arrow-height: 10px
);
li {
display: inline-block;
width: 23%;
@@ -67,7 +75,15 @@
}
}
&.fix {
@include popover(200px, $top: 100%, $left: -160px, $arrow-width: 10px, $arrow-top: -5px, $arrow-left: 90%, $arrow-height: 10px);
@include popover(
200px,
$top: 100%,
$left: -160px,
$arrow-width: 10px,
$arrow-top: -5px,
$arrow-left: 90%,
$arrow-height: 10px
);
}
}
}

View File

@@ -51,8 +51,14 @@
}
@keyframes animSlideOut {
0% { opacity: 1; transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -400, 0, 0, 1); }
100% { opacity: 0; transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -400, 0, 0, 1); }
0% {
opacity: 1;
transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -400, 0, 0, 1);
}
100% {
opacity: 0;
transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -400, 0, 0, 1);
}
}

View File

@@ -114,6 +114,5 @@ body {
}
.hidden {
// scss-lint:disable ImportantRule
display: none !important;
display: none !important; /* stylelint-disable-line declaration-no-important */
}

View File

@@ -60,7 +60,7 @@ svg {
.is-selected {
.pika-button {
background: $primary;
border-radius: 0 !important;
border-radius: 0 !important; /* stylelint-disable-line declaration-no-important */
box-shadow: inset 0 1px 3px $primary;
}
}
@@ -76,9 +76,11 @@ svg {
}
.pika-button {
&:hover {
/* stylelint-disable declaration-no-important */
background: $primary-light !important; //Important added because plugin has it :S
border-radius: 0 !important; //Important added because plugin has it :S
box-shadow: inset 0 1px 3px $primary-light !important; //Important added because plugin has it :S
/* stylelint-enable declaration-no-important */
}
}
}

View File

@@ -5,13 +5,12 @@ fieldset {
position: relative;
width: 100%;
}
input[type="text"],
input[type="number"],
input[type="password"],
input[type="url"],
input[type="email"],
input[type="date"],
input[type="password"],
input[type='text'],
input[type='number'],
input[type='password'],
input[type='url'],
input[type='email'],
input[type='date'],
select,
textarea {
background: $grey-02;

View File

@@ -2,10 +2,10 @@
// Font face
@each $font-face in
OpenSans-CondLight,
OpenSans-Light,
OpenSans-Regular,
OpenSans-Semibold {
OpenSans-CondLight,
OpenSans-Light,
OpenSans-Regular,
OpenSans-Semibold {
@font-face {
font-family: '#{$font-face}';
src: url('../fonts/#{$font-face}.ttf') format('truetype');
@@ -13,11 +13,15 @@ OpenSans-Semibold {
}
@font-face {
font-family: taiga; font-style: normal; font-weight: normal;
font-family: 'taiga';
font-style: normal;
font-weight: normal;
src: url('../fonts/taiga.eot');
/* stylelint-disable declaration-colon-newline-after */
src: url('../fonts/taiga.eot?') format('eot'),
url('../fonts/taiga.woff') format('woff'),
url('../fonts/taiga.ttf') format('truetype');
/* stylelint-enable declaration-colon-newline-after */
}
h1,

View File

@@ -12,7 +12,7 @@
strong,
a {
@include font-type(semibold)
@include font-type(semibold);
}
p {
color: $grayer;

View File

@@ -27,7 +27,7 @@
@include empty-color(38);
}
}
input[type="text"] {
input[type='text'] {
background: $white;
}
.icon {
@@ -40,7 +40,7 @@
.tags-table {
.table-tags-editor {
input[type="text"] {
input[type='text'] {
background-color: transparent;
border: 0;
border-bottom: 1px solid transparent;

View File

@@ -901,7 +901,13 @@
100% { transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 400, 0, 0, 1); }
}
@keyframes animSlideOutRTL {
100% { opacity: 1; transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 30, 0, 0, 0, 1); }
0% { opacity: 0; transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 30, 0, 0, 0, 1); }
100% {
opacity: 1;
transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 30, 0, 0, 0, 1);
}
0% {
opacity: 0;
transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 30, 0, 0, 0, 1);
}
}
}

View File

@@ -69,10 +69,10 @@
margin-right: .5rem;
}
}
input[type="radio"] {
input[type='radio'] {
display: none;
}
input[type="text"] {
input[type='text'] {
display: none;
}
label {
@@ -109,7 +109,7 @@
fill: $white;
}
}
~input[type="text"] {
~input[type='text'] {
display: block;
}
}

View File

@@ -233,8 +233,7 @@
border-bottom: 1px solid $white;
color: $white;
a {
// scss-lint:disable ImportantRule
color: $white !important;
color: $white !important; /* stylelint-disable-line declaration-no-important */
&:hover {
color: $white;
}

View File

@@ -32,8 +32,8 @@ $column-padding: .5rem;
.taskboard-column {
align-content: flex-start;
display: flex;
flex-direction: column;
flex-flow: row wrap;
flex-direction: column;
}
.avatar-task-link {
display: block;

View File

@@ -122,8 +122,7 @@
}
}
.issue-field,
.assigned-field,
.modified-field ,
.modified-field,
.assigned-field {
flex-basis: 140px;
flex-grow: 1;

View File

@@ -34,7 +34,7 @@
transition: background .2s ease-in;
}
// TODO: refactor xaviju
// TODO: refactor xaviju
.user-story-name {
input {
vertical-align: top;

View File

@@ -11,7 +11,7 @@
border-bottom: 2px solid $gray-light;
}
.project-settings-table-project ,
.project-settings-table-project,
.project-settings-table-homepage {
padding: 1rem;
}

View File

@@ -32,7 +32,7 @@
border-top: 1px solid $gray-light;
}
}
input[type="text"] {
input[type='text'] {
background: $whitish;
color: $grayer;
margin: 1rem 1rem 1rem 2rem;

View File

@@ -16,7 +16,6 @@
flex-shrink: 0;
}
.created-field,
.created-field,
.modified-field {
flex-basis: 10vw;
flex-grow: 0;

View File

@@ -65,6 +65,8 @@ var Theme = function() {
}
});
obj.size = themesSequence.length;
return obj;
};

View File

@@ -6,15 +6,12 @@ var gulp = require("gulp"),
concat = require("gulp-concat"),
uglify = require("gulp-uglify"),
plumber = require("gulp-plumber"),
wrap = require("gulp-wrap"),
rename = require("gulp-rename"),
flatten = require("gulp-flatten"),
gulpif = require("gulp-if"),
replace = require("gulp-replace"),
sass = require("gulp-sass"),
csslint = require("gulp-csslint"),
minifyCSS = require("gulp-minify-css"),
scsslint = require("gulp-scss-lint"),
stylelint = require('gulp-stylelint');
cache = require("gulp-cache"),
cached = require("gulp-cached"),
jadeInheritance = require("gulp-jade-inheritance"),
@@ -22,10 +19,8 @@ var gulp = require("gulp"),
insert = require("gulp-insert"),
autoprefixer = require("gulp-autoprefixer"),
templateCache = require("gulp-angular-templatecache"),
runSequence = require("run-sequence"),
order = require("gulp-order"),
os = require('os'),
print = require('gulp-print'),
del = require("del"),
livereload = require('gulp-livereload'),
gulpFilter = require('gulp-filter'),
@@ -213,14 +208,22 @@ paths.libs.forEach(function(file) {
var isDeploy = argv["_"].indexOf("deploy") !== -1;
gulp.task("clear-sass-cache", function(done) {
delete cached.caches["sass"];
done();
});
gulp.task("clear", gulp.series("clear-sass-cache"), function(done) {
cache.clearAll();
done();
});
/*
############################################################################
# Layout/CSS Related tasks
##############################################################################
*/
var jadeIncludes = paths.app +'partials/includes/**/*';
gulp.task("jade", function() {
return gulp.src(paths.jade)
.pipe(plumber())
@@ -246,19 +249,24 @@ gulp.task("copy-index", function() {
gulp.task("template-cache", function() {
return gulp.src(paths.htmlPartials)
.pipe(gulpif(isDeploy, replace(/e2e-([a-z\-]+)/g, '')))
.pipe(templateCache({standalone: true}))
.pipe(templateCache({
standalone: true,
transformUrl: function(url) {
if (url.startsWith('/')) {
return url.slice(1);
}
return url;
}
}))
.pipe(gulpif(isDeploy, uglify()))
.pipe(gulp.dest(paths.distVersion + "js/"))
.pipe(gulpif(!isDeploy, livereload()));
});
gulp.task("jade-deploy", function(cb) {
return runSequence("jade", "copy-index", "template-cache", cb);
});
gulp.task("jade-deploy", gulp.series("jade", "copy-index", "template-cache"));
gulp.task("jade-watch", function(cb) {
return runSequence("jade-inheritance", "copy-index", "template-cache", cb);
});
gulp.task("jade-watch", gulp.series("jade-inheritance", "copy-index", "template-cache"));
/*
##############################################################################
@@ -266,7 +274,7 @@ gulp.task("jade-watch", function(cb) {
##############################################################################
*/
gulp.task("scss-lint", [], function() {
gulp.task("scss-lint", function(done) {
var ignore = [
"!" + paths.app + "/styles/shame/**/*.scss",
];
@@ -275,31 +283,25 @@ gulp.task("scss-lint", [], function() {
var sassFiles = paths.sass.concat(themes.current.customScss, ignore);
var tmpDir = 'gulp-cache-' + os.userInfo().username;
const task = gulp.src(sassFiles)
.pipe(
stylelint({
failAfterError: fail,
reporters: [
{formatter: 'string', console: true}
]
},
done,
));
return gulp.src(sassFiles)
.pipe(gulpif(!isDeploy, cache(scsslint({endless: true, sync: true, config: ".scss-lint.yml"}), {
success: function(scsslintFile) {
return scsslintFile.scsslint.success;
},
value: function(scsslintFile) {
return {
scsslint: scsslintFile.scsslint
};
},
fileCache: new cache.Cache({
tmpdir: os.tmpdir(),
cacheDirName: tmpDir
})
})))
.pipe(gulpif(fail, scsslint.failReporter()));
if (fail) {
return task;
} else {
done();
}
});
gulp.task("clear-sass-cache", function() {
delete cached.caches["sass"];
});
gulp.task("sass-compile", [], function() {
gulp.task("sass-compile", function() {
return gulp.src(paths.sass)
.pipe(addsrc.append(themes.current.customScss))
.pipe(plumber())
@@ -314,27 +316,6 @@ gulp.task("sass-compile", [], function() {
.pipe(gulp.dest(paths.tmp));
});
gulp.task("css-lint-app", function() {
var cssFiles = paths.css.concat(themes.current.customCss);
return gulp.src(cssFiles)
.pipe(gulpif(!isDeploy, cache(csslint("csslintrc.json"), {
success: function(csslintFile) {
if (csslintFile.csslint) {
return csslintFile.csslint.success;
} else {
return false;
}
},
value: function(csslintFile) {
return {
csslint: csslintFile.csslint
};
}
})))
.pipe(csslint.reporter());
});
gulp.task("app-css", function() {
return gulp.src(paths.css)
.pipe(order(paths.css_order, {base: '.'}))
@@ -369,52 +350,37 @@ gulp.task("main-css", function() {
.pipe(livereload());
});
var compileThemes = function (cb) {
return runSequence("clear",
"scss-lint",
"sass-compile",
"css-lint-app",
["app-css", "vendor-css"],
"main-css",
function() {
themes.next();
gulp.task("compile-theme", gulp.series(
"clear",
"scss-lint",
"sass-compile",
gulp.parallel("app-css", "vendor-css"),
"main-css",
function(done) {
themes.next();
done();
}));
if (themes.current) {
compileThemes(cb);
} else {
cb();
}
});
};
gulp.task("compile-themes", gulp.series(new Array(themes.size).fill('compile-theme')));
gulp.task("compile-themes", function(cb) {
compileThemes(cb);
});
gulp.task("styles", gulp.series(
gulp.parallel("scss-lint", "sass-compile"),
gulp.parallel("app-css", "vendor-css"),
"main-css"
));
gulp.task("styles", function(cb) {
return runSequence("scss-lint",
"sass-compile",
["app-css", "vendor-css"],
"main-css",
cb);
});
gulp.task("styles-lint", gulp.series(
gulp.parallel("scss-lint", "sass-compile"),
gulp.parallel("app-css", "vendor-css"),
"main-css"
));
gulp.task("styles-lint", function(cb) {
return runSequence("scss-lint",
"sass-compile",
"css-lint-app",
["app-css", "vendor-css"],
"main-css",
cb);
});
gulp.task("styles-dependencies", function(cb) {
return runSequence("clear-sass-cache",
"sass-compile",
["app-css", "vendor-css"],
"main-css",
cb);
});
gulp.task("styles-dependencies", gulp.series(
"clear-sass-cache",
"sass-compile",
gulp.parallel("app-css", "vendor-css"),
"main-css")
);
/*
##############################################################################
@@ -595,9 +561,9 @@ gulp.task("jslibs-deploy", function() {
.pipe(gulp.dest(paths.distVersion + "js/"));
});
gulp.task("app-watch", ["coffee", "conf", "locales", "moment-locales", "app-loader"]);
gulp.task("app-watch", gulp.series("coffee", "conf", "locales", "moment-locales", "app-loader"));
gulp.task("app-deploy", ["coffee", "conf", "locales", "moment-locales", "app-loader"], function() {
gulp.task("app-deploy", gulp.series("coffee", "conf", "locales", "moment-locales", "app-loader"), function() {
return gulp.src(paths.distVersion + "js/app.js")
.pipe(sourcemaps.init())
.pipe(uglify())
@@ -610,9 +576,6 @@ gulp.task("app-deploy", ["coffee", "conf", "locales", "moment-locales", "app-loa
# Common tasks
##############################################################################
*/
gulp.task("clear", ["clear-sass-cache"], function(done) {
return cache.clearAll(done);
});
//SVG
gulp.task("copy-svg", function() {
@@ -646,7 +609,7 @@ gulp.task("copy-emojis", function() {
.pipe(gulp.dest(paths.distVersion + "/emojis/"));
});
gulp.task("copy-prism", ["prism-languages"], function() {
gulp.task("copy-prism", gulp.series("prism-languages"), function() {
var prismLanguages = require(__dirname + '/prism-languages.json');
prismLanguages = prismLanguages.map(function(it) {
@@ -668,7 +631,7 @@ gulp.task("copy-extras", function() {
.pipe(gulp.dest(paths.dist + "/"));
});
gulp.task("link-images", ["copy-images"], function(cb) {
gulp.task("link-images", gulp.series("copy-images"), function(cb) {
try {
fs.unlinkSync(paths.dist+"images");
} catch (exception) {
@@ -677,7 +640,7 @@ gulp.task("link-images", ["copy-images"], function(cb) {
cb();
});
gulp.task("copy", [
gulp.task("copy", gulp.parallel([
"copy-fonts",
"copy-theme-fonts",
"copy-images",
@@ -687,27 +650,17 @@ gulp.task("copy", [
"copy-svg",
"copy-theme-svg",
"copy-extras"
]);
]));
gulp.task("delete-old-version", function() {
del.sync(paths.dist + "v-*");
return del(paths.dist + "v-*");
});
gulp.task("delete-tmp", function() {
del.sync(paths.tmp);
return del(paths.tmp);
});
gulp.task("unused-css", ["default"], function() {
return gulp.src([
paths.distVersion + "js/app.js",
paths.tmp + "**/*.html"
])
.pipe(utils.unusedCss({
css: paths.distVersion + "styles/theme-taiga.css"
}));
});
gulp.task("express", function() {
gulp.task("express", function(cb) {
var express = require("express");
var compression = require('compression');
@@ -737,36 +690,43 @@ gulp.task("express", function() {
});
app.listen(9001);
cb();
});
//Rerun the task when a file changes
gulp.task("watch", function() {
gulp.task("watch", function(cb) {
livereload.listen();
gulp.watch(paths.jade, ["jade-watch"]);
gulp.watch(paths.sass_watch, ["styles-lint"]);
gulp.watch(paths.styles_dependencies, ["styles-dependencies"]);
gulp.watch(paths.svg, ["copy-svg"]);
gulp.watch(paths.coffee, ["app-watch"]);
gulp.watch(paths.libs, ["jslibs-watch"]);
gulp.watch([paths.locales, paths.modulesLocales], ["locales"]);
gulp.watch(paths.images, ["copy-images"]);
gulp.watch(paths.fonts, ["copy-fonts"]);
gulp.watch(paths.jade, gulp.parallel(["jade-watch"]));
gulp.watch(paths.sass_watch, gulp.parallel(["styles-lint"]));
gulp.watch(paths.styles_dependencies, gulp.parallel(["styles-dependencies"])); gulp.watch(paths.svg, gulp.parallel(["copy-svg"]));
gulp.watch(paths.coffee, gulp.parallel(["app-watch"]));
gulp.watch(paths.libs, gulp.parallel(["jslibs-watch"]));
gulp.watch([paths.locales, paths.modulesLocales], gulp.parallel(["locales"]));
gulp.watch(paths.images, gulp.parallel(["copy-images"]));
cb();
});
gulp.task("deploy", function(cb) {
runSequence("clear", "delete-old-version", "delete-tmp", [
gulp.task("deploy", gulp.series(
"clear",
"delete-old-version",
"delete-tmp",
gulp.parallel(
"copy",
"jade-deploy",
"app-deploy",
"jslibs-deploy",
"link-images",
"compile-themes"
], cb);
});
)
));
//The default task (called when you run gulp from cli)
gulp.task("default", function(cb) {
runSequence("delete-old-version", "delete-tmp", [
gulp.task("default", gulp.series(
"delete-old-version",
"delete-tmp",
gulp.parallel(
"copy",
"styles",
"app-watch",
@@ -774,5 +734,15 @@ gulp.task("default", function(cb) {
"jade-deploy",
"express",
"watch"
], cb);
))
);
gulp.task("unused-css", gulp.series("default"), function() {
return gulp.src([
paths.distVersion + "js/app.js",
paths.tmp + "**/*.html"
])
.pipe(utils.unusedCss({
css: paths.distVersion + "styles/theme-taiga.css"
}));
});

18318
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -18,7 +18,8 @@
"scripts": {
"scss-lint": "gulp scss-lint --fail",
"test": "./node_modules/karma/bin/karma start",
"e2e": "./node_modules/.bin/babel-node run-e2e.js"
"e2e": "./node_modules/.bin/babel-node run-e2e.js",
"start": "npx gulp"
},
"devDependencies": {
"angular-mocks": "1.5.5",
@@ -32,46 +33,45 @@
"chai-as-promised": "^5.1.0",
"chai-jquery": "^2.0.0",
"cli-color": "^1.0.0",
"coffee-script": "^1.9.1",
"coffeescript": "^1.10.0",
"compression": "^1.6.1",
"connect-livereload": "^0.5.4",
"css": "^2.2.1",
"del": "^2.0.2",
"express": "^4.12.0",
"glob": "^7.1.4",
"gulp": "^3.9.1",
"gulp-add-src": "^0.2.0",
"gulp-angular-templatecache": "^1.5.0",
"gulp-autoprefixer": "^3.0.1",
"gulp-cache": "^0.4.4",
"gulp-cached": "1.1.0",
"gulp-coffee": "^2.3.1",
"gulp": "^4.0.2",
"gulp-add-src": "^1.0.0",
"gulp-angular-templatecache": "^3.0.0",
"gulp-autoprefixer": "^7.0.1",
"gulp-cache": "^1.1.3",
"gulp-cached": "1.1.1",
"gulp-cli": "^2.3.0",
"gulp-coffee": "^2.3.5",
"gulp-coffeelint": "^0.6.0",
"gulp-concat": "^2.5.2",
"gulp-csslint": "^0.3.0",
"gulp-filter": "^4.0.0",
"gulp-flatten": "0.4.0",
"gulp-if": "^2.0.0",
"gulp-imagemin": "^3.0.1",
"gulp-concat": "^2.6.1",
"gulp-filter": "^6.0.0",
"gulp-if": "^3.0.0",
"gulp-imagemin": "^7.1.0",
"gulp-insert": "^0.5.0",
"gulp-jade": "^1.0.0",
"gulp-jade": "^1.1.0",
"gulp-jade-inheritance": "0.5.5",
"gulp-jsonminify": "^1.0.0",
"gulp-livereload": "^3.8.1",
"gulp-jsonminify": "^1.1.0",
"gulp-livereload": "^4.0.2",
"gulp-minify-css": "^1.2.4",
"gulp-order": "^1.1.1",
"gulp-plumber": "^1.0.1",
"gulp-print": "^2.0.1",
"gulp-rename": "^1.2.0",
"gulp-replace": "^0.5.3",
"gulp-sass": "^2.3.1",
"gulp-scss-lint": "0.4.0",
"gulp-size": "^2.0.0",
"gulp-sourcemaps": "^2.0.0-alpha",
"gulp-template": "^4.0.0",
"gulp-uglify": "~1.5.3",
"gulp-util": "^3.0.7",
"gulp-wrap": "^0.15.0",
"gulp-order": "^1.2.0",
"gulp-plumber": "^1.2.1",
"gulp-print": "^5.0.2",
"gulp-rename": "^2.0.0",
"gulp-replace": "^1.0.0",
"gulp-sass": "^4.1.0",
"gulp-scss-lint": "1.0.0",
"gulp-size": "^3.0.0",
"gulp-sourcemaps": "^2.6.5",
"gulp-stylelint": "^13.0.0",
"gulp-template": "^5.0.0",
"gulp-uglify": "~3.0.2",
"gulp-util": "^3.0.8",
"image-size": "^0.7.4",
"inquirer": "^3.0.1",
"jade": "^1.11.0",
@@ -84,15 +84,18 @@
"merge-stream": "^1.0.0",
"minimist": "^1.1.1",
"mocha": "^2.2.4",
"node-sass": "4.12.0",
"uuid": "^3.3.2",
"node-sass": "4.14.1",
"photoswipe": "^4.1.0",
"pre-commit": "^1.0.5",
"readable-stream": "~2.1.2",
"reporter-file": "^1.0.0",
"run-sequence": "^1.0.2",
"sinon": "^1.14.1",
"stylelint": "^13.6.1",
"stylelint-config-standard": "^20.0.0",
"stylelint-order": "^4.1.0",
"stylelint-scss": "^3.18.0",
"through2": "^2.0.1",
"uuid": "^3.3.2",
"vinyl-fs": "^2.1.1"
},
"pre-commit": [

File diff suppressed because one or more lines are too long