Skip to content

Commit

Permalink
Remove sourcemap from published sources
Browse files Browse the repository at this point in the history
  • Loading branch information
brendan-duncan committed Nov 8, 2024
1 parent 8846370 commit 7f98212
Show file tree
Hide file tree
Showing 14 changed files with 4,110 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wgsl_reflect",
"version": "1.0.14",
"version": "1.0.15",
"description": "WGSL Parser and Reflection library",
"author": "Brendan Duncan",
"license": "MIT",
Expand Down
9 changes: 5 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
import typescript from "@rollup/plugin-typescript";

function build(format, file) {
function build(format, file, sourcemap) {
return {
input: 'src/index.ts',
plugins: [typescript()],
output: [
{
format,
file,
sourcemap: true,
sourcemap,
}
]
}
}

let builds = [
build('esm', 'wgsl_reflect.module.js'),
build('cjs', 'wgsl_reflect.node.js'),
build('esm', 'wgsl_reflect.module.js', false),
build('cjs', 'wgsl_reflect.node.js', false),
build('esm', 'wgsl_reflect.debug.js', true),
];

export default builds;
2 changes: 1 addition & 1 deletion test/tests/struct.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { test, group } from "../test.js";
import { WgslParser } from "../../../wgsl_reflect.module.js";
import { WgslParser } from "../../../wgsl_reflect.debug.js";

group("struct", function () {
const shader = `
Expand Down
2 changes: 1 addition & 1 deletion test/tests/struct_layout.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { test, group } from "../test.js";
import { WgslReflect } from "../../../wgsl_reflect.module.js";
import { WgslReflect } from "../../../wgsl_reflect.debug.js";

group("struct_layout", function () {
const shader = `
Expand Down
2 changes: 1 addition & 1 deletion test/tests/test_parser.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { test, group } from "../test.js";
import { WgslParser } from "../../../wgsl_reflect.module.js";
import { WgslParser } from "../../../wgsl_reflect.debug.js";

group("Parser", function () {
test("const2", function (test) {
Expand Down
2 changes: 1 addition & 1 deletion test/tests/test_reflect.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { test, group } from "../test.js";
import { WgslReflect, ResourceType } from "../../../wgsl_reflect.module.js";
import { WgslReflect, ResourceType } from "../../../wgsl_reflect.debug.js";

group("Reflect", function () {
test("array_no_format", function (test) {
Expand Down
2 changes: 1 addition & 1 deletion test/tests/test_scanner.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { test, group } from "../test.js";
import { WgslScanner, TokenTypes } from "../../../wgsl_reflect.module.js";
import { WgslScanner, TokenTypes } from "../../../wgsl_reflect.debug.js";

group("Scanner", function () {
test("(1+2)-3;", function (test) {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"noEmitHelpers": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,

"pretty": true,
"allowUnreachableCode": true,
"allowUnusedLabels": true,
Expand Down
Loading

0 comments on commit 7f98212

Please sign in to comment.