From 7dc22774532872fc99aa7768cf299ab623e9d155 Mon Sep 17 00:00:00 2001 From: tusooa Date: Mon, 9 Jan 2023 13:02:16 -0500 Subject: Use stylelint --- build/webpack.base.conf.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'build') diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index bf946922..7e69352a 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -6,7 +6,7 @@ var ServiceWorkerWebpackPlugin = require('serviceworker-webpack5-plugin') var CopyPlugin = require('copy-webpack-plugin'); var { VueLoaderPlugin } = require('vue-loader') var ESLintPlugin = require('eslint-webpack-plugin'); - +var StylelintPlugin = require('stylelint-webpack-plugin'); var env = process.env.NODE_ENV // check env & config/index.js to decide weither to enable CSS Sourcemaps for the @@ -111,6 +111,7 @@ module.exports = { extensions: ['js', 'vue'], formatter: require('eslint-formatter-friendly') }), + new StylelintPlugin({}), new VueLoaderPlugin(), // This copies Ruffle's WASM to a directory so that JS side can access it new CopyPlugin({ -- cgit v1.2.3-70-g09d2 From 6e5c7bf308ddcb2be756cb84c6c7119b612e4e28 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 10 Sep 2023 08:22:28 +0200 Subject: Use export-subst gitattribute to allow tarball builds For example it would do the following: let subst = "d3bf557c"; --- .gitattributes | 1 + build/webpack.prod.conf.js | 13 ++++++++++--- changelog.d/export-subst-hash.fix | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 .gitattributes create mode 100644 changelog.d/export-subst-hash.fix (limited to 'build') diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..c5b9ea10 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +/build/webpack.prod.conf.js export-subst diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index 7de93721..664290a5 100644 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -11,9 +11,16 @@ var env = process.env.NODE_ENV === 'testing' ? require('../config/test.env') : config.build.env -let commitHash = require('child_process') - .execSync('git rev-parse --short HEAD') - .toString(); +let commitHash = (() => { + let subst = "$Format:%h$"; + if(!subst.match(/Format:/)) { + return subst; + } else { + return require('child_process') + .execSync('git rev-parse --short HEAD') + .toString(); + } +})(); var webpackConfig = merge(baseWebpackConfig, { mode: 'production', diff --git a/changelog.d/export-subst-hash.fix b/changelog.d/export-subst-hash.fix new file mode 100644 index 00000000..fb0d85cb --- /dev/null +++ b/changelog.d/export-subst-hash.fix @@ -0,0 +1 @@ +Use export-subst gitattribute to allow tarball builds -- cgit v1.2.3-70-g09d2 From c05b1b90726e0b47b6e80f0bfe4d880f2f45fa2e Mon Sep 17 00:00:00 2001 From: tusooa Date: Fri, 15 Sep 2023 06:45:02 +0000 Subject: Apply 1 suggestion(s) to 1 file(s) --- build/webpack.prod.conf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build') diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index 664290a5..7a108f68 100644 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -12,7 +12,7 @@ var env = process.env.NODE_ENV === 'testing' : config.build.env let commitHash = (() => { - let subst = "$Format:%h$"; + const subst = "$Format:%h$"; if(!subst.match(/Format:/)) { return subst; } else { -- cgit v1.2.3-70-g09d2