softlayer / ember-cli-jsdoc

An Ember CLI addon to generate HTML documentation from JSDoc comments in the source code.
MIT License
21 stars 18 forks source link

Include Babel plugins #45

Open ghost opened 4 years ago

ghost commented 4 years ago

I recently implemented this and found that I could not generate the docs because Babel's plugin-proposal-class-properties and plugin-proposal-decorators were not available to this addon. These are required for Octane's syntax to compile.

Using:

To get it to work, I had to:

{
  "presets": [
    [
      "@babel/preset-env",
      {
        "targets": {
          "node": "11.0"
        }
      }
    ]
  ],

  "plugins": [
    "@babel/plugin-proposal-class-properties",
    ["@babel/plugin-proposal-decorators", {"decoratorsBeforeExport": true}]
  ]
}

If I missed something and it should have worked please let me know, if not I'll start working on a PR.

notmessenger commented 4 years ago

@TeeBrysiewicz I'm sure you didn't miss anything. I haven't been working with Ember for a while and as such don't use this tool regularly anymore, so haven't kept it up to date with latest versions, etc.