Sha256: 3a7b14269086bc9a4ba61cd70c6ba2d488db89f6fa806146e0026a226f28f20c

Contents?: true

Size: 511 Bytes

Versions: 1

Compression:

Stored size: 511 Bytes

Contents

say "Install rollup with config"
copy_file "#{__dir__}/rollup.config.js", "rollup.config.js"
run "yarn add rollup @rollup/plugin-node-resolve"

say "Add build script"
build_script = "rollup -c --bundleConfigAsCjs rollup.config.js"

case `npx -v`.to_f
when 7.1...8.0
  run %(npm set-script build "#{build_script}")
  run %(yarn build)
when 8.0..
  run %(npm pkg set scripts.build="#{build_script}")
  run %(yarn build)
else
  say %(Add "scripts": { "build": "#{build_script}" } to your package.json), :green
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jsbundling-rails-1.1.0 lib/install/rollup/install.rb