Skip to content
Snippets Groups Projects
Commit 8e02062c authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge branch 'F10987-remove-grunt' into 'develop'

F10987 remove grunt

See merge request !634
parents e1d1a224 a3e0a895
No related branches found
No related tags found
4 merge requests!691New version v24.3.0,!638Merge Develop to B16343,!637develop into F17086-Multiple-Forms-on-a-page,!634F10987 remove grunt
Pipeline #11220 passed
......@@ -15,6 +15,7 @@
.phpunit.result.cache
nbprojec
nohup.out
.DS_Store
# Created by .ignore support plugin (hsz.mobi)
.python_virtualenv/
......@@ -71,6 +72,8 @@ composer.lock
/javascript/src/.vscode
/javascript/src/npm-debug.log
/javascript/build/dist
/less/dist
/docker/chromedriver
/docker/geckodriver
......
......@@ -11,7 +11,8 @@ variables:
stages:
- before
- build
# - selenium
- test
# - selenium
#documentation:
# stage: before
......@@ -29,7 +30,7 @@ snapshot:
paths:
- build/
script:
- make VERSION=${VERSION} phpunit_snapshot
- make VERSION=${VERSION} snapshot
- chmod a+r qfq_${VERSION}_*.zip
- echo "mv qfq_${VERSION}_*.zip qfq_${VERSION}_${RELDATE}-${CI_COMMIT_REF_NAME}.zip"
- mv qfq_${VERSION}_*.zip qfq_${VERSION}_${RELDATE}-${CI_COMMIT_REF_NAME}.zip
......@@ -45,11 +46,17 @@ release:
paths:
- build/
script:
- make VERSION=${VERSION} phpunit_release
- make VERSION=${VERSION} release
- chmod a+r qfq_${VERSION}_*.zip
- scp qfq_${VERSION}_*.zip w16:qfq/releases/
- mv qfq_${VERSION}_*.zip build/qfq.zip
tests:
stage: test
script:
- make phpunit
#selenium:
# stage: selenium
# script:
......
......@@ -59,14 +59,15 @@ plantuml:
cd doc/diagram ; $(MAKE)
bootstrap: .npmpackages .plantuml_install .virtual_env
npm update
grunt default
npm install
npm run build
# take care that phpOffice is located under 'qfq/Resources/Private/vendor/phpoffice'
# cd extension/Resources/Private; composer update
cd extension; composer update
basic: .npmpackages .virtual_env
grunt default
npm install
npm run build
# IMPORTANT: install composer with no-dev flag for deployment!
cd extension; composer install --no-dev --optimize-autoloader; cd vendor/phpoffice/phpspreadsheet; rm -rf .github bin docs samples .g* .s* .t* C* c* m* p*
......@@ -81,7 +82,6 @@ basic: .npmpackages .virtual_env
node --version
which node
echo "${PATH}"
npm ls -g grunt-cli 2>/dev/null || { echo "Please install grunt-cli npm package using 'npm install -g grunt-cli'" 1>&2 ; exit 1; }
# update npm at persistent location and copy node_modules (to speed up process)
mkdir -p $(VAR_TMP)/npm
/bin/cp package.json $(VAR_TMP)/npm/
......
const { ncp } = require("ncp")
const fs = require("fs")
const { exec } = require("child_process");
ncp.limit = 16
const options = {
js: {
clobber: true, //overwrite dir
stopOnErr: true,
filter: /(.+(?<!\..*)|.+\.debug\.js|qfq\..*\.js|.+\.min\.js|.+\.min\.js\.map)$/
},
css: {
clobber: true, //overwrite dir
stopOnErr: true,
filter: /(.+(?<!\..*)|.*\.min\.css|qfq.*\.css|.*\.min\.css\.map)$/
},
font: {
clobber: true, //overwrite dir
stopOnErr: true,
filter: /(.+(?<!\..*)|.*\.ttf|.*\.svg|.*\.woff|.*\.woff2)$/
}
}
const target = {
js: "extension/Resources/Public/JavaScript/",
css: "extension/Resources/Public/Css/",
font: "extension/Resources/Public/fonts"
}
const target_dev = {
js: "js/",
css: "css/"
}
const todos = [
{
name: "bootstrap",
js: "node_modules/bootstrap/dist/js/",
css: "node_modules/bootstrap/dist/css/",
font: "node_modules/bootstrap/dist/fonts/"
},{
name: "jquery",
js: "node_modules/jquery/dist/"
},{
name: "tablesorter",
custom: [
{
from: "node_modules/tablesorter/dist/js/jquery.tablesorter.combined.min.js",
to: target.js
},{
from: "node_modules/tablesorter/dist/js/extras/jquery.tablesorter.pager.min.js",
to: target.js
},{
from: "node_modules/tablesorter/dist/js/widgets/widget-columnSelector.min.js",
to: target.js
},{
from: "node_modules/tablesorter/dist/js/widgets/widget-output.min.js",
to: target.js
}
]
},{
name: "datetimepicker",
js: "javascript/src/Plugins/bootstrap-datetimepicker.min.js",
css: "javascript/src/Plugins/"
},{
name: "chart-js",
js: "node_modules/chart.js/dist/"
},{
name: "qfq",
js: "javascript/build/dist/",
css: "less/dist/"
},{
name: "tinymce",
js: 'node_modules/tinymce/'
},{
name: "qfq plugins",
js: "javascript/src/Plugins/",
css: "javascript/src/Plugins/"
},{
name: "fontAwesome",
css: "node_modules/@fortawesome/fontawesome-free/css/fontawesome.min.css",
custom: [
{
from: "node_modules/@fortawesome/fontawesome-free/css/all.min.css",
to: target.css + "font-awesome.min.css"
},{
from: "node_modules/@fortawesome/fontawesome-free/webfonts",
to: "extension/Resources/Public/"
}
]
},{
name: "fontPassword",
font: "resources/custom_fonts/"
},{
name: "typeAhead",
js: "node_modules/corejs-typeahead/dist/"
},{
name: "codemirror",
css: "node_modules/codemirror/lib/",
custom: [
{
from: "node_modules/codemirror/mode/",
to: target.js + "code-mirror-mode/"
},
{
from: "node_modules/codemirror/theme/monokai.css",
to: target.css + "theme/"
},
{
from: "node_modules/codemirror/lib/codemirror.css",
to: target.css
},
{
from: "node_modules/codemirror/lib/codemirror.js",
to: target.js
}
]
},{
name: "EventEmitter",
js: "node_modules/wolfy87-eventemitter/"
},{
name: "fullcalendar",
js: "node_modules/fullcalendar/dist/",
css: "node_modules/fullcalendar/dist/"
},{
name: "moment",
js: "node_modules/moment/min/",
},{
name: "jqwidgets",
custom: [
{
from: "node_modules/jqwidgets-framework/jqwidgets/jqx-all.js",
to: target.js
},{
from: "node_modules/jqwidgets-framework/jqwidgets/globalization/globalize.js",
to: target.js
},{
from: "node_modules/jqwidgets-framework/jqwidgets/styles/jqx.base.css",
to: target.css
},{
from: "node_modules/jqwidgets-framework/jqwidgets/styles/jqx.bootstrap.css",
to: target.css
}
]
}
]
const types = ["js", "css", "font"]
console.log("Async copying files:")
for (const todo of todos) {
for(const type of types) {
if(todo.hasOwnProperty(type)) {
ncp(todo[type], target[type], options[type], (err) => printProgress(err, todo.name, type));
}
}
if(todo.hasOwnProperty("custom")) {
for (const job of todo.custom) {
if (!fs.existsSync(job.to.substring(0, job.to.lastIndexOf("/")))) {
fs.mkdirSync(job.to.substring(0, job.to.lastIndexOf("/")));
}
exec('cp -r "' + job.from + '" "' + job.to + '"', (error, stdout, stderr) => printProgress(error, todo.name, "custom"))
//ncp(job.from, job.to, options.custom, (err) => printProgress(err, todo.name, "custom"))
}
}
}
function printProgress(err, name, type) {
if (err) {
return console.error(err);
}
console.log(' * copied ' + type + ' ' + name);
}
\ No newline at end of file
const { minify } = require("terser");
const fs = require('fs');
const jsPath = "javascript/build/dist/"
const extPath = "extension/Resources/Public/JavaScript/"
const cssPath = "extension/Resources/Public/Css/"
const todos = [
{
name: "qfq",
input: "javascript/build/dist/qfq.debug.js",
output: jsPath + "qfq.min.js"
},{
name: "qfqFabric",
input: "javascript/src/Plugins/qfq.fabric.js",
output: jsPath + "qfq.fabric.min.js"
},{
name: "qfqValidator",
input: "javascript/src/Plugins/validator.js",
output: jsPath + "validator.min.js"
},{
name: "codemirror",
input: "node_modules/codemirror/lib/codemirror.js",
output: extPath + "codemirror.min.js"
},{
name: "codemirror sql",
input: "node_modules/codemirror/lib/codemirror.js",
output: extPath + "code-mirror-mode/sql/sql.min.js",
mkdir: extPath + "code-mirror-mode/sql"
}
]
const defaultOptions = {
compress: {
defaults: false,
ecma: 2015
}
};
async function minifySource(input, output, options) {
let sourceCode = fs.readFileSync(input, 'utf8');
minify(sourceCode, options)
.then( (res) => callWriteFile(output, res))
}
function callWriteFile(output, sourceCode) {
//console.log("Source Code", sourceCode)
fs.writeFileSync(output, sourceCode.code)
}
for (const todo of todos) {
console.log("minifying " + todo.name)
let options = defaultOptions
if(todo.hasOwnProperty("options")) options = todo.options
if(todo.hasOwnProperty("mkdir")) {
fs.mkdirSync(todo.mkdir, { recursive: true })
}
minifySource(todo.input, todo.output, options)
}
File moved
......@@ -31,7 +31,6 @@ $(document).ready( function () {
var collection = document.getElementsByClassName("qfq-form");
console.log(collection);
var qfqPages = [];
for (const form of collection) {
const page = new n.QfqPage(form.dataset);
......
/*!
* Bootstrap Datetime Picker v4.17.49
* Copyright 2015-2020 Jonathan Peterson
* Licensed under MIT (https://github.com/Eonasdan/bootstrap-datetimepicker/blob/master/LICENSE)
*/.bootstrap-datetimepicker-widget{list-style:none}.bootstrap-datetimepicker-widget.dropdown-menu{display:block;margin:2px 0;padding:4px;width:19em}@media (min-width:768px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}@media (min-width:992px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}@media (min-width:1200px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}.bootstrap-datetimepicker-widget.dropdown-menu:before,.bootstrap-datetimepicker-widget.dropdown-menu:after{content:'';display:inline-block;position:absolute}.bootstrap-datetimepicker-widget.dropdown-menu.bottom:before{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,0.2);top:-7px;left:7px}.bootstrap-datetimepicker-widget.dropdown-menu.bottom:after{border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid white;top:-6px;left:8px}.bootstrap-datetimepicker-widget.dropdown-menu.top:before{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;border-top-color:rgba(0,0,0,0.2);bottom:-7px;left:6px}.bootstrap-datetimepicker-widget.dropdown-menu.top:after{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid white;bottom:-6px;left:7px}.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget .list-unstyled{margin:0}.bootstrap-datetimepicker-widget a[data-action]{padding:6px 0}.bootstrap-datetimepicker-widget a[data-action]:active{box-shadow:none}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:54px;font-weight:bold;font-size:1.2em;margin:0}.bootstrap-datetimepicker-widget button[data-action]{padding:6px}.bootstrap-datetimepicker-widget .btn[data-action="incrementHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Increment Hours"}.bootstrap-datetimepicker-widget .btn[data-action="incrementMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Increment Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="decrementHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Decrement Hours"}.bootstrap-datetimepicker-widget .btn[data-action="decrementMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Decrement Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="showHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Show Hours"}.bootstrap-datetimepicker-widget .btn[data-action="showMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Show Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="togglePeriod"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Toggle AM/PM"}.bootstrap-datetimepicker-widget .btn[data-action="clear"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Clear the picker"}.bootstrap-datetimepicker-widget .btn[data-action="today"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Set the date to today"}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget .picker-switch::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Toggle Date and Time Screens"}.bootstrap-datetimepicker-widget .picker-switch td{padding:0;margin:0;height:auto;width:auto;line-height:inherit}.bootstrap-datetimepicker-widget .picker-switch td span{line-height:2.5;height:2.5em;width:100%}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget table td,.bootstrap-datetimepicker-widget table th{text-align:center;border-radius:4px}.bootstrap-datetimepicker-widget table th{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget table th.picker-switch{width:145px}.bootstrap-datetimepicker-widget table th.disabled,.bootstrap-datetimepicker-widget table th.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget table th.prev::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Previous Month"}.bootstrap-datetimepicker-widget table th.next::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Next Month"}.bootstrap-datetimepicker-widget table thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget table thead tr:first-child th:hover{background:#eee}.bootstrap-datetimepicker-widget table td{height:54px;line-height:54px;width:54px}.bootstrap-datetimepicker-widget table td.cw{font-size:.8em;height:20px;line-height:20px;color:#777}.bootstrap-datetimepicker-widget table td.day{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget table td.day:hover,.bootstrap-datetimepicker-widget table td.hour:hover,.bootstrap-datetimepicker-widget table td.minute:hover,.bootstrap-datetimepicker-widget table td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget table td.old,.bootstrap-datetimepicker-widget table td.new{color:#777}.bootstrap-datetimepicker-widget table td.today{position:relative}.bootstrap-datetimepicker-widget table td.today:before{content:'';display:inline-block;border:solid transparent;border-width:0 0 7px 7px;border-bottom-color:#337ab7;border-top-color:rgba(0,0,0,0.2);position:absolute;bottom:4px;right:4px}.bootstrap-datetimepicker-widget table td.active,.bootstrap-datetimepicker-widget table td.active:hover{background-color:#337ab7;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget table td.active.today:before{border-bottom-color:#fff}.bootstrap-datetimepicker-widget table td.disabled,.bootstrap-datetimepicker-widget table td.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget table td span{display:inline-block;width:54px;height:54px;line-height:54px;margin:2px 1.5px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget table td span:hover{background:#eee}.bootstrap-datetimepicker-widget table td span.active{background-color:#337ab7;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget table td span.old{color:#777}.bootstrap-datetimepicker-widget table td span.disabled,.bootstrap-datetimepicker-widget table td span.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget.usetwentyfour td.hour{height:27px;line-height:27px}.bootstrap-datetimepicker-widget.wider{width:21em}.bootstrap-datetimepicker-widget .datepicker-decades .decade{line-height:1.8em !important}.input-group.date .input-group-addon{cursor:pointer}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}
\ No newline at end of file
This diff is collapsed.
File moved
......@@ -327,7 +327,7 @@ i.@{spinner_class} {
background-repeat: repeat-x;
border-color: #d30b6f;
font-weight: 200;
text-shadow: 0 1px 0 #e72a8;
text-shadow: #e72a89 0 1px 0;
color: #333;
}
......
......@@ -8,31 +8,44 @@
"bootstrap-validator": "^0.11.5",
"chart.js": "^2.9.4",
"codemirror": "^5.65.15",
"concat": "^1.0.3",
"corejs-typeahead": "^1.3.1",
"eonasdan-bootstrap-datetimepicker": "^4.17.49",
"fullcalendar": "^3.10.2",
"grunt": "^1.6.1",
"grunt-concat-in-order": "^0.2.6",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-jasmine": "^1.1.0",
"grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-less": "^1.2.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-terser": "^2.0.0",
"jquery": "latest",
"jqwidgets-framework": "4.2.1",
"moment": "^2.29.4",
"jshint": "^2.13.6",
"less": "^4.2.0",
"less-plugin-clean-css": "^1.5.1",
"moment": "latest",
"ncp": "^2.0.0",
"popper.js": "^1.16.1",
"selenium-webdriver": "^4.14.0",
"should": "^11.2.1",
"tablesorter": "^2.31.3",
"terser": "^5.21.0",
"tinymce": "^4.9.11",
"terser": "latest",
"tinymce": "latest",
"wolfy87-eventemitter": "^4.3.0"
},
"jshintConfig": {
"esversion": 6,
"asi": true
},
"config": {
"js-dir": "extension/Resources/Public/JavaScript/",
"css-dir": "extension/Resources/Public/Css/",
"font-dir": "extension/Resources/Public/fonts/"
},
"scripts": {
"test": "mocha tests/selenium/test*.js"
"test": "mocha tests/selenium/test*.js",
"create-dirs": "mkdir -p js && mkdir -p javascript/build/dist && mkdir -p extension/Resources/Public/JavaScript/ && mkdir -p extension/Resources/Public/Css/ && mkdir -p extension/Resources/Public/fonts/",
"copy": "node javascript/build/copy.js",
"echo": "echo \"$npm_package_config_js_dir\"",
"concat": "concat -o javascript/build/dist/qfq.debug.js javascript/src/Core/QfqEvents.js javascript/src/Core/FormGroup.js javascript/src/*.js javascript/src/Helper/*.js javascript/src/Element/*.js",
"terser": "node javascript/build/terser.js",
"jshint": "jshint javascript/src --exclude javascript/src/Plugins",
"less": "lessc -clean-css less/qfq-bs.css.less less/dist/qfq-bs.css && lessc -clean-css less/qfq-letter.css.less less/dist/qfq-letter.css && lessc -clean-css less/qfq-plain.css.less less/dist/qfq-plain.css && lessc -clean-css less/tablesorter-bootstrap.less less/dist/tablesorter-bootstrap.css",
"prebuild": "npm run jshint && npm run create-dirs",
"build": "npm run concat && npm run less && npm run terser && npm run copy"
},
"license": "ISC",
"repository": "https://git.math.uzh.ch/typo3/qfq",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment