aurelia-contrib / aurelia-open-id-connect

An aurelia adapter for the IdentityModel/oidc-client-js
https://zamboni-app.azurewebsites.net
MIT License
54 stars 18 forks source link

Bundling resources #9

Closed mttmccb closed 6 years ago

mttmccb commented 7 years ago

I ran into a possible issue but have a solution... I want dropped this into a production environment but in that case I don't deploy the whole folder, just the index.html an assets and the scripts folder.

Based on the instructions this means that some of the resources are missing, looking at the filepaths it's looking for them in the src folder so I adjusted the project.json to include all the resources explicitly (not sure if there is an easier way to do it.)

{
  "name": "aurelia-open-id-connect",
  "path": "../node_modules/aurelia-open-id-connect/dist/amd",
  "main": "index",
  "resources": [
    "open-id-connect-user-block.html",
    "open-id-connect-user-block.js",
    "open-id-connect-role-filter.js",
    "open-id-connect-authorize-step.js",
    "open-id-connect-configuration.js",
    "open-id-connect-logger.js",
    "open-id-connect-roles.js",
    "open-id-connect-routing.js",
    "open-id-connect.js"
  ]
},
shaunluttin commented 7 years ago

@mttmccb Hi Matt. I wanted to apologize for not responding to this issue sooner. I've been quite busy with other things and unfortunately still am. Thank you for the issue, in any case.

vanbilt commented 7 years ago

I was coming here to make almost the exact same issue - found a problem and a solution. Glad I checked the issues before I created a duplicate. (Also @shaunluttin - still really enjoying this framework - thank you for all the hard work you've put into this)

shaunluttin commented 6 years ago

Possibly related: https://github.com/aurelia/cli/issues/292

shaunluttin commented 6 years ago

Possibly related: https://github.com/aurelia/bundler/issues/30

shaunluttin commented 6 years ago

@mttmccb @vanbilt I've updated the documentation. It now specifies the need to include the resource list explicitly:

aurelia.json > build > bundles > vendor-bundle > dependencies > ...

{
  "name": "aurelia-open-id-connect",
  "path": "../node_modules/aurelia-open-id-connect/dist/amd",
  "main": "index",
  "resources": [
    "open-id-connect-user-block.html",
    "open-id-connect-user-block.js",
    "open-id-connect-user-debug.html",
    "open-id-connect-user-debug.js",
    "open-id-connect-role-filter.js"
  ]
},

See also: 9282dc36beb2a05c180aa0635690a03e58713ebc