mirror of
https://github.com/SwingTheVine/Wplace-BlueMarble.git
synced 2026-03-11 17:15:38 +00:00
Tried directly overriding "sources"
This commit is contained in:
parent
28a598fabb
commit
8d04b82fae
7 changed files with 12 additions and 12 deletions
|
|
@ -64,11 +64,11 @@ const resultEsbuildJS = resultEsbuild.outputFiles.find(file => file.path.endsWit
|
|||
const resultEsbuildMap = resultEsbuild.outputFiles.find(file => file.path.endsWith('.map'));
|
||||
|
||||
// Obfuscates the JS file
|
||||
const resultTerser = await terser.minify(resultEsbuildJS.text, {
|
||||
let resultTerser = await terser.minify(resultEsbuildJS.text, {
|
||||
sourceMap: {
|
||||
content: resultEsbuildMap.text, // The esbundle sourcemap
|
||||
//content: resultEsbuildMap.text, // The esbundle sourcemap
|
||||
filename: 'BlueMarble.user.js', // The file to make a sourcemap for
|
||||
url: ' ' // (This setting is intentional) The sourcemap url to point to.
|
||||
url: ' ' // (This value is intentional) The sourcemap url to point to.
|
||||
},
|
||||
mangle: {
|
||||
toplevel: true, // Obfuscate top-level class/function names
|
||||
|
|
@ -87,7 +87,7 @@ const resultTerser = await terser.minify(resultEsbuildJS.text, {
|
|||
});
|
||||
|
||||
// Creates the sourcemap file
|
||||
fs.writeFileSync('dist/BlueMarble.user.js.map', resultTerser.map, 'utf8');
|
||||
fs.writeFileSync('dist/BlueMarble.user.js.map', resultTerser.map.replace(`"sources":["0"]`, `"sources":["BlueMarble.user.js"]`), 'utf8');
|
||||
|
||||
// Adds the banner
|
||||
fs.writeFileSync('dist/BlueMarble.user.js', metaContent + resultTerser.code, 'utf8');
|
||||
4
dist/BlueMarble.user.js
vendored
4
dist/BlueMarble.user.js
vendored
File diff suppressed because one or more lines are too long
2
dist/BlueMarble.user.js.map
vendored
2
dist/BlueMarble.user.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -35,7 +35,7 @@
|
|||
<a href="https://github.com/SwingTheVine/Wplace-BlueMarble/blob/main/LICENSE.txt" target="_blank"><img alt="Software License: MPL-2.0" src="https://img.shields.io/badge/Software_License-MPL--2.0-brightgreen?style=flat"></a>
|
||||
<a href="https://discord.gg/tpeBPy46hf" target="_blank"><img alt="Contact Me" src="https://img.shields.io/badge/Contact_Me-gray?style=flat&logo=Discord&logoColor=white&logoSize=auto&labelColor=cornflowerblue"></a>
|
||||
<a href="" target="_blank"><img alt="WakaTime" src="https://img.shields.io/badge/Coding_Time-35hrs_30mins-blue?style=flat&logo=wakatime&logoColor=black&logoSize=auto&labelColor=white"></a>
|
||||
<a href="" target="_blank"><img alt="Total Patches" src="https://img.shields.io/badge/Total_Patches-193-black?style=flat"></a>
|
||||
<a href="" target="_blank"><img alt="Total Patches" src="https://img.shields.io/badge/Total_Patches-197-black?style=flat"></a>
|
||||
<a href="" target="_blank"><img alt="Total Lines of Code" src="https://tokei.rs/b1/github/SwingTheVine/Wplace-BlueMarble?category=code"></a>
|
||||
<a href="" target="_blank"><img alt="Total Comments" src="https://tokei.rs/b1/github/SwingTheVine/Wplace-BlueMarble?category=comments"></a>
|
||||
<a href="" target="_blank"><img alt="Build" src="https://github.com/SwingTheVine/Wplace-BlueMarble/actions/workflows/build.yml/badge.svg"></a>
|
||||
|
|
|
|||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "wplace-bluemarble",
|
||||
"version": "0.49.2",
|
||||
"version": "0.50.4",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "wplace-bluemarble",
|
||||
"version": "0.49.2",
|
||||
"version": "0.50.4",
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.25.0",
|
||||
"terser": "^5.43.1"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "wplace-bluemarble",
|
||||
"version": "0.50.0",
|
||||
"version": "0.50.4",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "node build/build.js",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// ==UserScript==
|
||||
// @name Blue Marble
|
||||
// @namespace https://github.com/SwingTheVine/
|
||||
// @version 0.50.0
|
||||
// @version 0.50.4
|
||||
// @description A userscript to automate and/or enhance the user experience on Wplace.live. Make sure to comply with the site's Terms of Service, and rules! This script is not affiliated with Wplace.live in any way, use at your own risk. This script is not affiliated with TamperMonkey. The author of this userscript is not responsible for any damages, issues, loss of data, or punishment that may occur as a result of using this script. This script is provided "as is" under the MPL-2.0 license. The "Blue Marble" icon is licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. The image is owned by NASA.
|
||||
// @author SwingTheVine
|
||||
// @license MPL-2.0
|
||||
|
|
|
|||
Loading…
Reference in a new issue