Skip to content

Commit

Permalink
Move webpack configs into scripts-folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Fralleee committed Jun 28, 2023
1 parent d0da070 commit 4b2cefc
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 23 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@
"url": "git+https://github.com/Fralleee/SwiftPaste.git"
},
"scripts": {
"build": "webpack --progress --config webpack.prod.js",
"build": "webpack --progress --config ./scripts/webpack.prod.js",
"dev": "concurrently \"npm run dev:start\" \"npm run dev:watch\"",
"dev:start": "webpack serve --config webpack.devServer.js",
"dev:watch": "webpack --watch --config webpack.dev.js",
"dev:start": "webpack serve --config ./scripts/webpack.devServer.js",
"dev:watch": "webpack --watch --config ./scripts/webpack.dev.js",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
Expand Down
4 changes: 0 additions & 4 deletions release.config.js

This file was deleted.

4 changes: 2 additions & 2 deletions webpack.config.js → scripts/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ module.exports = {
},
output: {
filename: "[name].js",
path: path.join(__dirname, "dist")
path: path.join(__dirname, "../dist")
},
optimization: {
splitChunks: {
Expand All @@ -82,7 +82,7 @@ function getHtmlPlugins(chunks) {
return chunks.map(
chunk =>
new HtmlPlugin({
template: path.resolve(__dirname, "src/template.html"),
template: path.resolve("src/template.html"),
filename: `${chunk}.html`,
chunks: [chunk]
})
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions webpack.devServer.js → scripts/webpack.devServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ const path = require("path")
module.exports = merge(config, {
mode: "development",
devtool: "cheap-module-source-map",
entry: path.resolve(__dirname, "src/sandbox/index.tsx"),
entry: path.resolve("src/sandbox/index.tsx"),
devServer: {
static: path.join(__dirname, "src/static"),
static: path.join("src/static"),
compress: true,
port: 3000,
hot: true
},
output: {
filename: "[name].js",
path: path.join(__dirname, "dist/sandbox")
path: path.join(__dirname, "../dist/sandbox")
},
plugins: [
new CleanWebpackPlugin({
cleanStaleWebpackAssets: false
}),
new HtmlPlugin({
template: path.resolve(__dirname, "src/template.html"),
template: path.resolve("src/template.html"),
filename: "index.html",
inject: "body"
})
Expand Down
File renamed without changes.
10 changes: 0 additions & 10 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
sonar.projectKey=Fralleee_SwiftPaste
sonar.organization=fralleee
sonar.javascript.lcov.reportPaths=./coverage/lcov.info

# This is the name and version displayed in the SonarCloud UI.
#sonar.projectName=SwiftPaste
#sonar.projectVersion=1.0

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
#sonar.sources=.

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8

0 comments on commit 4b2cefc

Please sign in to comment.