zambezi / ez-build

Zambezi build tool
MIT License
2 stars 1 forks source link

Scoped package optimized output should ignore scope #26

Closed mstade closed 8 years ago

mstade commented 8 years ago

When building a scoped package (such as websdk/rhumb) the optimized JS output (and presumably others) will be in a folder of the same name as the scope. Additionally, optimised-modules.json will include the scope as well, although this is probably correct.

Expected Behavior

The optimized files produced by the --production flag should have the name of the package, not including the scope – for instance in the case of websdk/rhumb this would be rhumb-min.js.

Current Behavior

The optimized files produced by the --production flag are placed in a folder with the same name as the scope – for instance in the case of websdk/rhumb the output is @websdk/rhumb-min.js which is wrong.

Steps to Reproduce

  1. Create a project with a scope in the package name, like @test/package
  2. Place some javascript in src/foo.js
  3. Build using ez-build --production
  4. Note that the optimized output will be @test/package-min.js; the expected output should be package-min.js
mstade commented 8 years ago

Fixed in b2cb66a and tests added in 70e2677.