npm_ext 0.1.1 → 0.1.2

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: bf252dec02490b703e1ecadd6a035d8a94bd0c8c8718e0cf08da06463fe787c8
4
- data.tar.gz: 475da2429e525a0700cb65fd9a8652424bda261d4e85b93bde890203b189deaa
3
+ metadata.gz: 6b22aef9431b51fb055fc039ce7345a71679c247da3c1d01308696ce08dc32a0
4
+ data.tar.gz: c3932eb4ecca826574d7e1f2d123ff2d033f7538fe2227276e26a76d6f4d4cd2
5
5
  SHA512:
6
- metadata.gz: 8810518d6ec054e430008483392ddce0ae8842387abba471b4a05007e64e6f4f3a1d67b3b329067ed11a2a1df923f533e5cd94a03cd0ab3b1f78f73a4eab34d1
7
- data.tar.gz: 747444d1dfd091bdebcd3208deebf455e306d6fb06c8182603c95f0e6b45adb530efb75a2a37fb03d166c9ac5b1113565697d130b88ab977edc29c263a9a4f0d
6
+ metadata.gz: fe7bd61bf6eeeb0c8e0a4980ad779e51ab8d116249547b4dfb8b97089670520e078f205d6f741edc4fd7a04ff6067276b1680d77a28ba6ad6a0832d1f80b94eb
7
+ data.tar.gz: 2026f7eebc502e2aa4f320523a34fa2911e45a01e9a10e1a0a52f599dc954648d2ef111338694176b66f5f20e5aa77bc6df0237aa974c19951d1210072754d1d
data/lib/npm_ext/mkmf.rb CHANGED
@@ -43,13 +43,14 @@ module NpmExt
43
43
 
44
44
  def create_rollup_config(dir)
45
45
  parse_package_json(dir).map do |package|
46
- configs = "rollup.config.#{Digest::MD5.hexdigest(package.name.to_s)}.js"
46
+ hash = Digest::MD5.hexdigest(package.name.to_s)
47
+ configs = "rollup.config.#{hash}.js"
47
48
  File.write(configs, "module.exports = #{JSON.generate(
48
49
  {
49
50
  # TODO: if no file provided get the input file from package.json
50
51
  input: "node_modules/#{package.name}/#{package.file_to_bundle}",
51
52
  output: {
52
- file: "#{package.name}.npm_ext.js",
53
+ file: "#{hash}.npm_ext.so",
53
54
  name: package.name,
54
55
  format: "iife",
55
56
  },
@@ -70,8 +71,9 @@ module NpmExt
70
71
  \tnpm ci
71
72
  \tnpm i #{ROLLUP_PACKAGES.join(" ")}
72
73
  #{configs.map { |x| "\tnpx rollup --config #{x}" }.join("\n")}
73
- \tcat *.npm_ext.js > npm_ext.so
74
- \tcp *.npm_ext.js ../../../../lib/
74
+ cleanup:
75
+ \trm -rf node_modules
76
+ \trm -rf rollup.config.*.js
75
77
  MAKE
76
78
  end
77
79
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NpmExt
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
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.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandra Østermark