Rakefile in opal-js_wrap-three-0.1.0 vs Rakefile in opal-js_wrap-three-0.1.1
- old
+ new
@@ -13,6 +13,12 @@
sh 'npx rollup -c'
end
task build_js: 'lib-opal/js_wrap/three/three.js'
-task default: %i[build_js]
+task :build_js_examples do
+ Dir["node_modules/three/examples/jsm/**/*.js"].each do |js|
+ sh "npx babel #{js} -o lib-opal/js_wrap/three/#{js.split("/jsm/").last}"
+ end
+end
+
+task default: %i[build_js build_js_examples]