smclab / titaniumifier

Get a Titanium™ SDK CommonJS module out of a Node package!
GNU Lesser General Public License v2.1
95 stars 15 forks source link

The `as` option overrides the module's directory name but not `moduleid` #9

Closed FokkeZB closed 9 years ago

FokkeZB commented 9 years ago

I want the moduleid of https://github.com/FokkeZB/ti-html2as to be different (nl.fokkezb.html2as) from the NPM package name (ti-html2as). In the Gruntfile.js I use the as option:

titaniumifier: {
  module: {
    options: {
      as: "nl.fokkezb.html2as"
    }
  }
}

This correctly names the directory name of the module nl.fokkezb.html2as but the moduleid property in the manifest file is still ti-html2as and this is how it shows up on gitt.io. In the example project it does work when I require('nl.fokkezb.html2as') so this is confusing.

This should be fixed by letting as override package.name for the manifest file just like it does for the module directory name.

yuchi commented 9 years ago

Solved in titaniumifier@0.2.11, it’s a minor so you can re-install it and you’re done!