Skip to content

Commit

Permalink
Merge branch 'release/2.4.51' into craft-webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Welch committed Dec 22, 2021
2 parents 80ef265 + 1a24b09 commit 257aa58
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 50 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# nystudio107/craft Change Log

## 2.4.51 - 2021.12.22
### Changed
* Updated to use a unified `bootstrap.php`
* Updated to use `vlucas/phpdotenv` `^5.4.0`
* Updated to Tailwind CSS `^3.0.0`

## 2.4.50 - 2021.12.07
### Changed
* Use Node 16 for the webpack buildchain container
Expand Down
2 changes: 1 addition & 1 deletion buildchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"core-js": "^3.0.0",
"lazysizes": "^5.2.2",
"regenerator-runtime": "^0.13.2",
"tailwindcss": "^2.1.0",
"vue": "^3.0.0",
"vue-confetti": "^2.0.8"
},
Expand Down Expand Up @@ -102,6 +101,7 @@
"stylelint": "^13.7.0",
"stylelint-config-recommended": "^3.0.0",
"symlink-webpack-plugin": "^0.0.4",
"tailwindcss": "^3.0.0",
"terser-webpack-plugin": "^5.0.0",
"ts-loader": "^8.0.0",
"tsconfig-paths-webpack-plugin": "^3.3.0",
Expand Down
25 changes: 5 additions & 20 deletions buildchain/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
// module exports
module.exports = {
mode: 'jit',
purge: {
content: [
'../cms/templates/**/*.{twig,html}',
'../src/vue/**/*.{vue,html}',
],
layers: [
'base',
'components',
'utilities',
],
mode: 'layers',
options: {
}
},
content: [
'../cms/templates/**/*.{twig,html}',
'../src/vue/**/*.{vue,html}',
'../src/css/components/**/*.css',
],
theme: {
// Extend the default Tailwind config here
extend: {
},
// Replace the default Tailwind config here
},
corePlugins: {},
plugins: [],
};
4 changes: 2 additions & 2 deletions buildchain/webpack-configs/postcss-loader.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ module.exports = (type = 'modern', settings) => {
['postcss-import', {
path: ['./node_modules'],
}],
['tailwindcss/nesting', {
}],
TailwindCss('./tailwind.config.js'),
['postcss-mixins', {
}],
['postcss-nested', {
}],
['postcss-hexrgba', {
}],
...postCssPlugins,
Expand Down
20 changes: 20 additions & 0 deletions cms/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
/**
* Shared bootstrap file
*/

// Define path constants
define('CRAFT_BASE_PATH', __DIR__);
define('CRAFT_VENDOR_PATH', CRAFT_BASE_PATH . '/vendor');

// Load Composer's autoloader
require_once CRAFT_VENDOR_PATH . '/autoload.php';

// Load dotenv?
if (class_exists('Dotenv\Dotenv')) {
Dotenv\Dotenv::createUnsafeImmutable(CRAFT_BASE_PATH)->safeLoad();
}

// Define additional PHP constants
// (see https://craftcms.com/docs/3.x/config/#php-constants)
define('CRAFT_ENVIRONMENT', getenv('ENVIRONMENT') ?: 'production');
2 changes: 1 addition & 1 deletion cms/composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"require": {
"craftcms/cms": "^3.6.9",
"vlucas/phpdotenv": "^3.4.0",
"vlucas/phpdotenv": "^5.4.0",
"yiisoft/yii2-redis": "^2.0.6",
"nystudio107/craft-imageoptimize": "^1.0.0",
"nystudio107/craft-fastcgicachebust": "^1.0.0",
Expand Down
17 changes: 4 additions & 13 deletions cms/craft
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,11 @@
* Craft console bootstrap file
*/

// Set path constants
define('CRAFT_BASE_PATH', __DIR__);
define('CRAFT_VENDOR_PATH', CRAFT_BASE_PATH.'/vendor');

// Load Composer's autoloader
require_once CRAFT_VENDOR_PATH.'/autoload.php';

// Load dotenv?
if (class_exists('Dotenv\Dotenv') && file_exists(CRAFT_BASE_PATH.'/.env')) {
Dotenv\Dotenv::create(CRAFT_BASE_PATH)->load();
}
// Load shared bootstrap
require __DIR__ . '/bootstrap.php';

// Load and run Craft
define('CRAFT_ENVIRONMENT', getenv('ENVIRONMENT') ?: 'production');
$app = require CRAFT_VENDOR_PATH.'/craftcms/cms/bootstrap/console.php';
/** @var craft\console\Application $app */
$app = require CRAFT_VENDOR_PATH . '/craftcms/cms/bootstrap/console.php';
$exitCode = $app->run();
exit($exitCode);
17 changes: 4 additions & 13 deletions cms/web/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,10 @@
* Craft web bootstrap file
*/

// Set path constants
define('CRAFT_BASE_PATH', dirname(__DIR__));
define('CRAFT_VENDOR_PATH', CRAFT_BASE_PATH.'/vendor');

// Load Composer's autoloader
require_once CRAFT_VENDOR_PATH.'/autoload.php';

// Load dotenv?
if (class_exists('Dotenv\Dotenv') && file_exists(CRAFT_BASE_PATH.'/.env')) {
Dotenv\Dotenv::create(CRAFT_BASE_PATH)->load();
}
// Load shared bootstrap
require dirname(__DIR__) . '/bootstrap.php';

// Load and run Craft
define('CRAFT_ENVIRONMENT', getenv('ENVIRONMENT') ?: 'production');
$app = require CRAFT_VENDOR_PATH.'/craftcms/cms/bootstrap/web.php';
/** @var craft\web\Application $app */
$app = require CRAFT_VENDOR_PATH . '/craftcms/cms/bootstrap/web.php';
$app->run();

0 comments on commit 257aa58

Please sign in to comment.