Skip to content

Commit

Permalink
Merge branch 'release/3.3.26' into v3
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Welch committed Dec 8, 2020
2 parents 2c6c1d0 + a72202a commit 94080ab
Show file tree
Hide file tree
Showing 115 changed files with 19,297 additions and 16,517 deletions.
10 changes: 4 additions & 6 deletions .gitignore
Expand Up @@ -13,18 +13,16 @@
# Craft CMS project root directory

# CRAFT ENVIRONMENT
.env.php
.env.sh
.env

# COMPOSER
/vendor

# BUILD FILES
/bower_components/*
/node_modules/*
/build/*
/yarn-error.log
bower_components
node_modules
yarn-error.log
npm-error.log

# MISC FILES
.cache
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,10 @@
# SEOmatic Changelog

## 3.3.26 - 2020.12.08
### Changed
* Moved the CSS/JS buildchain over to webpack 5
* Updated to latest npm deps

## 3.3.25 - 2020.12.04
### Added
* Added the ability to query the `MetaSiteVarsContainer` via GraphQL or Meta Container endpoint, to allow accessing things such as the social media sites/urls, and other site-wide information
Expand Down
2 changes: 1 addition & 1 deletion .env.example → buildchain/.env.example
Expand Up @@ -2,5 +2,5 @@
PUBLIC_PATH=""
DEVSERVER_PUBLIC="http://192.168.10.10:8080"
DEVSERVER_HOST="0.0.0.0"
DEVSERVER_POLL=1
DEVSERVER_POLL=1000
DEVSERVER_PORT=8080
Empty file added buildchain/.eslintignore
Empty file.
25 changes: 25 additions & 0 deletions buildchain/.eslintrc
@@ -0,0 +1,25 @@
{
"root": true,
"parser": "vue-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"ecmaVersion": 2020,
"sourceType": "module"
},
"rules": {
"@typescript-eslint/no-var-requires": 0
},
"env": {
"browser": true,
"amd": true,
"node": true
},
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:vue/vue3-recommended"
]
}
File renamed without changes.
86 changes: 86 additions & 0 deletions buildchain/get-webpack-config.js
@@ -0,0 +1,86 @@
// node modules
const { merge } = require('webpack-merge');

/**
* return a webpack settings file
* @param name string
* @returns {{}}
*/
const getWebpackSettings = (name) => {
let settings = {};
try {
settings = require('./webpack-settings/' + name + '.settings.js');
} catch (e) {
// that's okay
}

return settings;
};

/**
* return a webpack settings file combined with the 'app' settings
* @param name string
* @returns {{}}
*/
const getCombinedWebpackSettings = (name) => ({
...getWebpackSettings('app'),
...getWebpackSettings(name),
});

/**
* return a legacy webpack config file
* @param name
* @returns {{}}
*/
const getLegacyWebpackConfig = (name) => require('./webpack-configs/' + name + '.config.js')('legacy', getCombinedWebpackSettings(name));

/**
* return a modern webpack config file
* @param name
* @returns {{}}
*/
const getModernWebpackConfig = (name) => require('./webpack-configs/' + name + '.config.js')('modern', getCombinedWebpackSettings(name));

/**
* return an array of webpack configs using the function provided in getWebpackConfig
* @param names string[]
* @param getWebpackConfig function
* @returns {{}}
*/
const webpackConfigs = (names, getWebpackConfig) => {
let config = {};
names.forEach((name) => config = merge(config, getWebpackConfig(name)));

return config;
};

/**
* return an array of build webpack configs
* @param names string
* @returns {{}}
*/
const buildWebpackConfigs = (...names) => webpackConfigs(names, getModernWebpackConfig);

/**
* return an array of legacy webpack configs
* @param names string
* @returns {{}}
*/
const legacyWebpackConfigs = (...names) => webpackConfigs(names, getLegacyWebpackConfig);

/**
* return an array of modern webpack configs
* @param names string
* @returns {{}}
*/
const modernWebpackConfigs = (...names) => webpackConfigs(names, getModernWebpackConfig);

// module exports
module.exports = {
getWebpackSettings,
getLegacyWebpackConfig,
getModernWebpackConfig,
buildWebpackConfigs,
legacyWebpackConfigs,
modernWebpackConfigs,
};
8 changes: 8 additions & 0 deletions buildchain/nodemon.json
@@ -0,0 +1,8 @@
{
"watch": [
"webpack.dev.js",
"webpack-configs/*.js",
"webpack-settings/*.js"
],
"exec": "webpack serve --config webpack.dev.js"
}

0 comments on commit 94080ab

Please sign in to comment.