npm_ext 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2776e0aa8dd1a39049d3e06d06b18f5c7aaeaaba30f1f3991496dde756a58768
4
- data.tar.gz: 63eb746025e6b76ab01701ebbd363bcdcc11b229effa2f0cc6136d36ad5142a7
3
+ metadata.gz: ab2466075be3e449081ba4700c280dcee8b9fbf92b2c6d32dac09955fc5ac0d6
4
+ data.tar.gz: 3c1f9db83bfb9f985c4cef0c8070c6e51953902a3c00c155c620f1e15e5d4780
5
5
  SHA512:
6
- metadata.gz: cb328e0b5971c9c2f2b158845827291aa4d0d709559cc3a12f03d08939dc03b7ea81ff8d16d1fec2066b5a996dcd2cd5a1d3c88353d84336b9e58d2a5ebebdd9
7
- data.tar.gz: f72156e791973455ee37f9c1c52825e4bee64be189099439157d27776f0eb70456b4aba2d8c2880420ad5da57d30a22f9377ed969630ff4c5bb95a2f576ba38b
6
+ metadata.gz: c5ce0f44017c8a7679977913c3b10e2c6662308c481d4736608a30254fcfabe6c9364514eff792a8616b663beebb8951496164856c77f60bea58d73797221f5c
7
+ data.tar.gz: 9f1cab867d35da784ec71ace559d3f1ce9bd9428d75766c222b4d36692ff5e779774ee9412a0775ff05948ce8abda300865a0a612bbe803ca7832ed848278f3e
data/lib/npm_ext/mkmf.rb CHANGED
@@ -67,6 +67,7 @@ module NpmExt
67
67
  def create_npm_makefile(dir)
68
68
  configs = create_rollup_config(dir)
69
69
  File.write("Makefile", <<~MAKE)
70
+ sitearchdir ?= /tmp/
70
71
  .PHONY: install
71
72
  install:
72
73
  \tcp #{dir}/package*.json ./ || :
@@ -77,11 +78,13 @@ module NpmExt
77
78
  end.join("\n")}
78
79
  \trm -rf npm_ext.so
79
80
  \tnode -e 'const fs = require("fs"); fs.writeFileSync("npm_ext.so", JSON.stringify(Object.fromEntries(#{configs.transform_values { |x| x[:output_js] }.to_a.to_json}.map(([k, v]) => [k, fs.readFileSync(v, "utf8")]))))'
81
+ \tcp npm_ext.so $(sitearchdir)$(target_prefix)
80
82
  .PHONY: clean
81
83
  clean:
82
84
  \trm -rf node_modules
83
85
  \trm -rf rollup.config.*.js
84
86
  \trm -rf *npm_ext.js
87
+ \trm -rf npm_ext.so
85
88
  MAKE
86
89
  end
87
90
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NpmExt
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.6"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: npm_ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandra Østermark