Skip to content

Commit

Permalink
Merge branch 'release/v3.3.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Jan 26, 2021
2 parents a63a2c9 + 257c9fc commit 7562546
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
if (pathname[pathname.length - 1] !== '/') {
pathname += '/';
}
link.href = pathname + 'themes/' + workspace + '-' + theme + '.css';
link.href = pathname + 'themes/' + workspace + '.' + theme + '.min.css';
link.type = 'text/css';
link.rel = 'stylesheet';
document.getElementsByTagName('head')[0].appendChild(link);
Expand Down
16 changes: 14 additions & 2 deletions app/modules/core/sagas.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function* watchNotifyError() {
'https://github.com/platformio/platform-linux_arm/issues/2'
],
[
/\[Error 2\] The system cannot find the file specified.*WindowsError/g,
/\[Error 2\]|\[WinError 2\]|\[Errno 13\]/g,
'https://github.com/platformio/platformio-core/issues/2321'
],
[
Expand All @@ -85,7 +85,7 @@ function* watchNotifyError() {
'https://github.com/platformio/platformio-core/issues/2811'
],
[
/Error: You are not connected to the Internet/g,
/Error: You are not connected to the Internet|HTTPSConnectionPool/g,
'https://github.com/platformio/platformio-core/issues/1348'
],
[
Expand All @@ -99,6 +99,18 @@ function* watchNotifyError() {
[
/Error: Could not find the package/g,
'https://github.com/platformio/platformio-home/issues/2144'
],
[
/Error: Unknown development platform/g,
'https://github.com/platformio/platformio-home/issues/2123'
],
[
/Error: Unknown board ID/g,
'https://github.com/platformio/platformio-home/issues/1768'
],
[
/Error: Could not find one of .* manifest files/g,
'https://github.com/platformio/platformio-home/issues/1785'
]
];
for (const [regex, url] of knownIssues) {
Expand Down
19 changes: 15 additions & 4 deletions app/modules/library/containers/detail-examples-block.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,22 @@ class LibraryDetailExamplesBlock extends React.Component {
osFsGlob: PropTypes.func.isRequired
};

static getGlobPatterns(custom) {
if (custom) {
return typeof custom === 'string' ? [custom] : custom;
}
static getGlobPatterns(examples) {
const result = [];
if (examples) {
if (typeof examples === 'string') {
return [examples];
} else if (typeof examples[0] === 'string') {
return examples;
} else if (examples[0].base && examples[0].files) {
examples.forEach(example => {
example.files.forEach(filename => {
result.push(path.join(example.base, filename));
});
});
return result;
}
}
for (const ext of ['*.ino', '*.pde', '*.c', '*.cpp', '*.h', '*.hpp']) {
const exmDir = '[Ee]xamples';
result.push(path.join(exmDir, ext));
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "platformio-home",
"version": "3.3.2",
"version": "3.3.3",
"description": "PlatformIO Home",
"repository": {
"type": "git",
Expand Down Expand Up @@ -52,6 +52,7 @@
"babel-plugin-redux-saga": "~1.1.2",
"copy-webpack-plugin": "~7.0.0",
"css-loader": "~5.0.1",
"css-minimizer-webpack-plugin": "^1.2.0",
"eslint": "~7.18.0",
"eslint-config-prettier": "~7.2.0",
"eslint-import-resolver-webpack": "~0.13.0",
Expand All @@ -68,6 +69,7 @@
"react-hot-loader": "~4.13.0",
"redux-logger": "~3.0.6",
"style-loader": "~2.0.0",
"terser-webpack-plugin": "^5.1.1",
"url-loader": "~4.1.1",
"webpack": "~5.17.0",
"webpack-bundle-analyzer": "~3.9.0",
Expand Down
11 changes: 9 additions & 2 deletions scripts/webpack.prod.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ const common = require('./webpack.common');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');

// Create multiple instances
const cssOutputFile = `themes/${common.workspace}-${common.theme}.css`;
const cssOutputFile = `themes/${common.workspace}.${common.theme}.min.css`;
const extractThemeCSS = new MiniCssExtractPlugin({
filename: cssOutputFile,
chunkFilename: cssOutputFile, // '[name].[contenthash].css',
Expand Down Expand Up @@ -47,6 +49,10 @@ module.exports = {
optimization: {
concatenateModules: true,
minimize: true,
minimizer: [
new TerserPlugin(),
new CssMinimizerPlugin(),
],
moduleIds: 'hashed',
nodeEnv: 'production',
splitChunks: {
Expand All @@ -66,7 +72,8 @@ module.exports = {
output: {
publicPath: './',
path: common.outputDir,
filename: '[name].[contenthash].min.js'
// filename: '[name].[contenthash].min.js'
filename: '[name].min.js'
},
resolve: {
alias: common.resolve.alias,
Expand Down

0 comments on commit 7562546

Please sign in to comment.