Skip to content

Remove npm dependencies we don't need anymore #1336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,7 @@ _Note: GopherJS will try to write compiled object files of the core packages to

#### gopherjs run, gopherjs test

If you want to use `gopherjs run` or `gopherjs test` to run the generated code locally, install Node.js 10.0.0 (or newer), and the `source-map-support` module:

```
npm install --global source-map-support
```
If you want to use `gopherjs run` or `gopherjs test` to run the generated code locally, install Node.js 18 (or newer).

On supported `GOOS` platforms, it's possible to make system calls (file system access, etc.) available. See [doc/syscalls.md](https://github.com/gopherjs/gopherjs/blob/master/doc/syscalls.md) for instructions on how to do so.

Expand Down
52 changes: 1 addition & 51 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"name": "gopherjs",
"license": "BSD-2-Clause",
"devDependencies": {
"uglify-es": "^3.3.9"
},
"dependencies": {
"source-map-support": "^0.5.19"
},
"optionalDependencies": {
"syscall": "file:./node-syscall"
}
Expand Down
8 changes: 1 addition & 7 deletions tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -838,13 +838,7 @@ func sprintError(err error) string {
func runNode(script string, args []string, dir string, quiet bool, out io.Writer) error {
var allArgs []string
if b, _ := strconv.ParseBool(os.Getenv("SOURCE_MAP_SUPPORT")); os.Getenv("SOURCE_MAP_SUPPORT") == "" || b {
allArgs = []string{"--require", "source-map-support/register"}
if err := exec.Command("node", "--require", "source-map-support/register", "--eval", "").Run(); err != nil {
if !quiet {
fmt.Fprintln(os.Stderr, "gopherjs: Source maps disabled. Install source-map-support module for nice stack traces. See https://github.com/gopherjs/gopherjs#gopherjs-run-gopherjs-test.")
}
allArgs = []string{}
}
allArgs = []string{"--enable-source-maps"}
}

if runtime.GOOS != "windows" {
Expand Down
Loading