Skip to content

Commit ae8de80

Browse files
committed
Revert "Fix duplicate queries.json file generation"
This reverts commit 165f3fb. Reverted because the package deployed to npm was broken because of this. A proper fix will land in #162.
1 parent 6928e65 commit ae8de80

File tree

3 files changed

+4
-43
lines changed

3 files changed

+4
-43
lines changed

bin/generate.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ if (args.h || args.help || args._.length > 1) {
6060
// Override the baseURL in the webpack config
6161
webpackConfig.baseURL.replace = baseURL;
6262

63-
// Override the buildContext in the webpack config
64-
webpackConfig.buildContext.dir = destinationPath;
65-
6663
for (const entry of webpackConfig) {
6764
entry.mode = mode;
6865
if (entry.output) {

plugins/MoveFilePlugin.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

webpack.config.js

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const path = require('path');
22
const webpack = require('webpack');
3-
const MoveFilePlugin = require('./plugins/MoveFilePlugin');
43

54
// First check if we can load Comunica form cwd, if not, fallback to the default
65
let pathToComunica;
@@ -14,7 +13,7 @@ catch {
1413
comunicaOverride = false;
1514
}
1615

17-
// Make this an object, so we can mutate it from the top level of the config
16+
// Make this an object so we can mutate it from the top level of the config
1817
// and have the options propagated to the plugins
1918
const baseURL = {
2019
search: '<%= baseURL %>',
@@ -24,12 +23,6 @@ const baseURL = {
2423
flags: 'g'
2524
}
2625

27-
// Make this an object, so we can mutate it from the top level of the config
28-
// and have the options propagated to the plugins
29-
const buildContext = {
30-
dir: 'build',
31-
}
32-
3326
module.exports = [
3427
{
3528
entry: [
@@ -48,6 +41,7 @@ module.exports = [
4841
path.join(__dirname, './images/sparql.png'),
4942
path.join(__dirname, './favicon.ico'),
5043
path.join(__dirname, './solid-client-id.jsonld'),
44+
path.join(process.cwd(), './queries.json'),
5145
],
5246
output: {
5347
filename: 'scripts/ldf-client-ui.min.js',
@@ -59,11 +53,6 @@ module.exports = [
5953
jQuery: path.join(__dirname, '/deps/jquery-2.1.0.js'),
6054
}),
6155
new webpack.NormalModuleReplacementPlugin(/^comunica-packagejson$/, (process.platform === 'win32' ? '' : '!!json-loader!') + path.join(pathToComunica, '../../package.json')),
62-
// Include the generated queries.json file by moving it from the current working directory (where it was generated) to the build path.
63-
new MoveFilePlugin(
64-
() => path.join(process.cwd(), 'queries.json'),
65-
() => path.join(__dirname, `${buildContext.dir}/queries.json`)
66-
),
6756
],
6857
module: {
6958
rules: [
@@ -166,6 +155,6 @@ module.exports = [
166155
},
167156
];
168157

169-
// Export the baseURL and buildContext objects, so we can mutate it in the generate script
158+
// Export the baseURL object so we can mutated it
159+
// in the generate script
170160
module.exports.baseURL = baseURL;
171-
module.exports.buildContext = buildContext;

0 commit comments

Comments
 (0)