Skip to content

Commit

Permalink
Merge pull request #27 from joomla-projects/merge-j4-fix-fatals
Browse files Browse the repository at this point in the history
Merge j4 fix fatals
  • Loading branch information
wilsonge authored Aug 6, 2017
2 parents 7b1b7ad + f5b9a64 commit 2788bdf
Show file tree
Hide file tree
Showing 1,931 changed files with 41,887 additions and 71,582 deletions.
5 changes: 2 additions & 3 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ pipeline:
- export DISPLAY=:0
- Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset > /dev/null 2>&1 &
- sleep 3
- mv -f drone-package.json package.json
- fluxbox > /dev/null 2>&1 &
- cd tests/javascript
- npm install
- cd ../..
- tests/javascript/node_modules/karma/bin/karma start karma.conf.js --single-run
- node_modules/karma/bin/karma start karma.conf.js --single-run
- echo $(date)

30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ Desktop.ini
# Extra files installed by Composer not needed in the CMS environment
# This should only ignore files like unit testing or READMEs, production
# code must remain to ensure all libraries properly function
/libraries/vendor/fig/link-util/test
/libraries/vendor/fig/link-util/composer.json
/libraries/vendor/fig/link-util/phpcs.xml
/libraries/vendor/fig/link-util/README.md
/libraries/vendor/ircmaxell/password-compat/test
/libraries/vendor/ircmaxell/password-compat/.travis.yml
/libraries/vendor/ircmaxell/password-compat/composer.json
Expand All @@ -97,7 +101,9 @@ Desktop.ini
/libraries/vendor/defuse/php-encryption/.php_cs
/libraries/vendor/defuse/php-encryption/composer.json
/libraries/vendor/defuse/php-encryption/README.md
/libraries/vendor/defuse/php-encryption/psalm.xml
/libraries/vendor/defuse/php-encryption/test.sh
/libraries/vendor/joomla/*/.appveyor.yml
/libraries/vendor/joomla/*/.gitattributes
/libraries/vendor/joomla/*/.github
/libraries/vendor/joomla/*/.gitignore
Expand All @@ -113,6 +119,7 @@ Desktop.ini
/libraries/vendor/joomla/*/composer.json
/libraries/vendor/joomla/*/phpunit.xml.dist
/libraries/vendor/joomla/*/phpunit.travis.xml
/libraries/vendor/joomla/*/phpunit.appveyor.xml
/libraries/vendor/joomla/*/README.md
/libraries/vendor/leafo/lessphp/docs
/libraries/vendor/leafo/lessphp/tests
Expand Down Expand Up @@ -159,6 +166,8 @@ Desktop.ini
/libraries/vendor/psr/http-message/CHANGELOG.md
/libraries/vendor/psr/http-message/composer.json
/libraries/vendor/psr/http-message/README.md
/libraries/vendor/psr/link/composer.json
/libraries/vendor/psr/link/README.md
/libraries/vendor/psr/log/Psr/Log/Test
/libraries/vendor/psr/log/.gitignore
/libraries/vendor/psr/log/composer.json
Expand All @@ -170,6 +179,12 @@ Desktop.ini
/libraries/vendor/symfony/polyfill-util/composer.json
/libraries/vendor/symfony/polyfill-util/README.md
/libraries/vendor/symfony/polyfill-util/TestListener.php
/libraries/vendor/symfony/web-link/Tests
/libraries/vendor/symfony/web-link/.gitignore
/libraries/vendor/symfony/web-link/CHANGELOG.md
/libraries/vendor/symfony/web-link/composer.json
/libraries/vendor/symfony/web-link/phpunit.xml.dist
/libraries/vendor/symfony/web-link/README.md
/libraries/vendor/symfony/yaml/Tests
/libraries/vendor/symfony/yaml/.gitignore
/libraries/vendor/symfony/yaml/CHANGELOG.md
Expand All @@ -194,3 +209,18 @@ Desktop.ini
/libraries/vendor/zendframework/zend-diactoros/CONTRIBUTING.md
/libraries/vendor/zendframework/zend-diactoros/mkdocs.yml
/libraries/vendor/zendframework/zend-diactoros/README.md

# System Test related files
tests/codeception/acceptance.suite.yml
tests/codeception/_support/_generated/*TesterActions.php
tests/codeception/joomla-cms*
tests/codeception/_output*
selenium-server-standalone.jar
selenium.log
tests/codeception/cache
tests/codeception/_output
tests/codeception/vendor
composer.phar

# Build related
RoboFile.ini
2 changes: 1 addition & 1 deletion .hound.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fail_on_violations: true

scss:
config_file: .scss-lint.yml
config_file: scss-lint.yml

jshint:
enabled: false
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
source 'https://rubygems.org'

gem 'scss_lint', '~> 0.53.0'
gem 'scss_lint', '~> 0.54.0'
96 changes: 74 additions & 22 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
module.exports = function(grunt) {
var settings = grunt.file.readYAML('grunt-settings.yaml'),
path = require('path'),
preText = '{\n "name": "joomla-assets",\n "version": "4.0.0",\n "description": "External assets that Joomla is using",\n "dependencies": {\n ',
postText = ' },\n "license": "GPL-2.0+"\n}',
preText = `{
"name": "joomla-assets",
"version": "4.0.0",
"description": "External assets that Joomla is using",
"dependencies": {
`,
postText = `
},
"license": "GPL-2.0+"
}`,
name, tinyXml, codemirrorXml,
vendorsTxt = '',
vendorsArr = '',
xmlVersionStr = /(<version>)(\d+.\d+.\d+)(<\/version>)/;

// Loop to get some text for the packgage.json
for (name in settings.vendors) {
vendorsTxt += '"' + name + '": "' + settings.vendors[name].version + '",';
vendorsTxt += `
"` + name + '": "' + settings.vendors[name].version + `",`;
}

// Loop to get some text for the assets.php
for (name in settings.vendors) {
vendorsArr += '\'' + name + '\' => array(\'version\' => \'' + settings.vendors[name].version + '\',' + '\'dependencies\' => \'' + settings.vendors[name].dependencies + '\'),\n\t\t\t';
vendorsArr += `'` + name + `' => array('version' => '` + settings.vendors[name].version + `',` + `'dependencies' => '` + settings.vendors[name].dependencies + `'),`;
}

// Build the package.json and assets.php for all 3rd Party assets
grunt.file.write('build/assets_tmp/package.json', preText + vendorsTxt.substring(0, vendorsTxt.length - 1) + postText);
// grunt.file.write('build/assets_tmp.php', '<?php\ndefined(\'_JEXEC\') or die;\n\nabstract class ExternalAssets{\n\tpublic static function getCoreAssets() {\n\t\t return array(\n\t\t\t' + vendorsArr + '\n\t\t);\n\t}\n}\n');

// Project configuration.
grunt.initConfig({
Expand Down Expand Up @@ -58,18 +66,35 @@ module.exports = function(grunt) {
'media/vendor/awesomplete/*',
'media/vendor/flying-focus-a11y/*',
'media/vendor/diff/**',
'media/vendor/polyfills/**',
'media/vendor/masonry-layout/js/**',
],
expand: true,
options: {
force: true
}
},
temp: {
src: [ 'build/assets_tmp/*', 'build/assets_tmp/tmp', 'build/assets_tmp/package.json' ],
src: [
'build/assets_tmp/*',
'build/assets_tmp/tmp',
'build/assets_tmp/package.json'
],
expand: true,
options: { force: true } },
options: { force: true }
},
css: {
src: [
'<%= folder.adminTemplate %>/css/font-awesome.css',
'<%= folder.adminTemplate %>/css/bootstrap.css',
'<%= folder.adminTemplate %>/css/template.css',
'<%= folder.adminTemplate %>/css/template-rtl.css',
],
expand: true
},
allMinJs: ['media/**/*.min.js', '!media/vendor/*.min.js',
'media/**/**/*.min.js', '!media/vendor/**/*.min.js',
'media/**/**/*.min.js', '!media/system/webcomponents/*.min.js',
'!media/vendor/**/*.min.js',
'media/**/**/**/*.min.js', '!media/vendor/**/**/*.min.js',
'media/**/**/**/**/*.min.js', '!media/vendor/**/**/**/*.min.js']
},
Expand Down Expand Up @@ -176,6 +201,10 @@ module.exports = function(grunt) {
{ expand: true, cwd: '<%= folder.node_module %>flying-focus-a11y/src/js', src: ['*.js'], dest: 'media/vendor/flying-focus-a11y/js/', filter: 'isFile'},
// JSDiff js files
{ expand: true, cwd: '<%= folder.node_module %>diff/dist', src: ['*.js'], dest: 'media/vendor/diff/js/', filter: 'isFile'},
// XPath polyfill js files
{ expand: false, src: '<%= folder.node_module %>wicked-good-xpath/dist/wgxpath.install.js', dest: 'media/vendor/polyfills/js/polyfill-wgxpath.js', filter: 'isFile'},
// Masonry js files
{ expand: true, cwd: '<%= folder.node_module %>masonry-layout/dist', src: ['*.js'], dest: 'media/vendor/masonry/js/', filter: 'isFile'},

// Licenses
{ src: ['<%= folder.node_module %>jquery/LICENSE.txt'], dest: 'media/vendor/jquery/LICENSE.txt'},
Expand All @@ -188,7 +217,16 @@ module.exports = function(grunt) {
{ src: ['<%= folder.node_module %>perfect-scrollbar/LICENSE'], dest: 'media/vendor/perfect-scrollbar/LICENSE'},
{ src: ['<%= folder.node_module %>flying-focus-a11y/MIT-LICENSE.txt'], dest: 'media/vendor/flying-focus-a11y/MIT-LICENSE.txt'},
{ src: ['<%= folder.node_module %>diff/LICENSE'], dest: 'media/vendor/diff/LICENSE'},
{ src: ['<%= folder.node_module %>wicked-good-xpath/LICENSE'], dest: 'media/vendor/polyfills/wicked-good-xpath-LICENSE'},
]
},
polyfills: {
files: [
// Joomla UI custom elements polyfills
{ expand: true, cwd: '<%= folder.node_module %>joomla-ui-custom-elements/dist/polyfills', src: ['**'], dest: 'media/system/js/polyfills/webcomponents', filter: 'isFile'},
// Joomla UI custom elements js files
{ expand: true, cwd: '<%= folder.node_module %>joomla-ui-custom-elements/dist/js', src: ['**'], dest: 'media/system/webcomponents/', filter: 'isFile'},
]
}
},

Expand All @@ -200,6 +238,8 @@ module.exports = function(grunt) {
sourceMap: true // SHOULD BE FALSE FOR DIST
},
files: {
'<%= folder.adminTemplate %>/css/font-awesome.css': '<%= folder.adminTemplate %>/scss/font-awesome.scss',
'<%= folder.adminTemplate %>/css/bootstrap.css': '<%= folder.adminTemplate %>/scss/bootstrap.scss',
'<%= folder.adminTemplate %>/css/template.css': '<%= folder.adminTemplate %>/scss/template.scss',
'<%= folder.adminTemplate %>/css/template-rtl.css': '<%= folder.adminTemplate %>/scss/template-rtl.scss',
'<%= folder.siteTemplate %>/css/template.css' : '<%= folder.siteTemplate %>/scss/template.scss',
Expand All @@ -225,6 +265,16 @@ module.exports = function(grunt) {
files: [
{
src: [
/**
* EXCLUSIONS
*
* '<%= folder.puny %>/*.js', '!<%= folder.puny %>/*.min.js', // Uglifying punicode.js fails ES6!!!
*
* Please DO NOT MINIFY the webcomponents folder here!!! They're already minified!
* '<%= folder.system %>/polyfills/webcomponents/*.js', '!<%= folder.system %>/polyfills/webcomponents/*.min.js',
* '<%= folder.media %>/system/webcomponents/*.js', '!<%= folder.media %>/system/webcomponents/*.min.js',
*/

'<%= folder.system %>/*.js',
'!<%= folder.system %>/*.min.js',
'<%= folder.system %>/fields/*.js',
Expand Down Expand Up @@ -299,8 +349,6 @@ module.exports = function(grunt) {
'!<%= folder.media %>/plg_system_stats/js/*.min.js',
'<%= folder.media %>/plg_system_debug/js/*.js',
'!<%= folder.media %>/plg_system_debug/js/*.min.js',
// '<%= folder.puny %>/*.js', // Uglifying punicode.js fails!!!
// '!<%= folder.puny %>/*.min.js', // Uglifying punicode.js fails!!!
],
dest: '',
expand: true,
Expand Down Expand Up @@ -330,18 +378,20 @@ module.exports = function(grunt) {
processors: [
require('autoprefixer')({
browsers: [
'Chrome >= 58',
'Firefox >= 53',
'Edge >= 12',
'Explorer >= 11',
'Safari >= 10.1',
'Opera >= 44'
'Chrome >= ' + settings.Browsers.Chrome,
'Firefox >= ' + settings.Browsers.Firefox,
'Edge >= ' + settings.Browsers.Edge,
'Explorer >= ' + settings.Browsers.Explorer,
'Safari >= ' + settings.Browsers.Safari,
'Opera >= ' + settings.Browsers.Opera
]
})
],
},
dist: {
src: [
'<%= folder.adminTemplate %>/css/bootstrap.css',
'<%= folder.adminTemplate %>/css/font-awesome.css',
'<%= folder.adminTemplate %>/css/template.css',
'<%= folder.adminTemplate %>/css/template-rtl.css',
'<%= folder.siteTemplate %>/css/template.css'
Expand All @@ -359,8 +409,7 @@ module.exports = function(grunt) {
cwd: 'media/vendor/codemirror',
src: [
'*.css',
'!*.min.css',
'!theme/*.css'
'!*.min.css'
],
dest: 'media/vendor/codemirror',
}]
Expand All @@ -373,8 +422,8 @@ module.exports = function(grunt) {
cwd: '<%= folder.adminTemplate %>/css',
src: [
'*.css',
'!*.min.css',
'!theme/*.css'
'!user.css',
'!*.min.css'
],
dest: '<%= folder.adminTemplate %>/css',
}]
Expand All @@ -387,8 +436,8 @@ module.exports = function(grunt) {
cwd: '<%= folder.siteTemplate %>/css',
src: [
'*.css',
'!*.min.css',
'!theme/*.css'
'!user.css',
'!*.min.css'
],
dest: '<%= folder.siteTemplate %>/css',
}]
Expand Down Expand Up @@ -431,10 +480,12 @@ module.exports = function(grunt) {
'sass:dist',
'clean:allMinJs',
'uglify:allJs',
'copy:polyfills',
'cssmin:allCss',
'postcss',
'cssmin:adminTemplate',
'cssmin:siteTemplate',
'clean:css',
'updateXML',
'clean:temp'
]
Expand Down Expand Up @@ -475,6 +526,7 @@ module.exports = function(grunt) {
'postcss',
'cssmin:adminTemplate',
'cssmin:siteTemplate',
'clean:css',
'watch'
]);
});
Expand Down
6 changes: 6 additions & 0 deletions RoboFile.dist.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
; If you want to setup your test website (document root) in a different folder, you can do that here.
; You can also set an absolute path, i.e. /path/to/my/cms/folder
cmsPath = tests/codeception/joomla-cms

; (Linux / Mac only) If you want to set a different owner for the CMS root folder, you can set it here.
localUser =
Loading

0 comments on commit 2788bdf

Please sign in to comment.