Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Export name bug#81

Merged
robertjd merged 3 commits into
stormpath:masterfrom
timothyej:export-name-bug
Nov 24, 2015
Merged

Export name bug#81
robertjd merged 3 commits into
stormpath:masterfrom
timothyej:export-name-bug

Conversation

@timothyej

Copy link
Copy Markdown
Contributor

Fixes #80.

This PR makes it possible to include the SDK using browserify or webpack.

  • stormpath-sdk-angularjs.js exports 'stormpath' instead of 'ui.router'
  • stormpath-sdk-angularjs.tpls.js exports 'stormpath.templates

How to verify

  1. Checkout this branch

  2. Copy the dist/ folder into your AngularJS project (you can use this boilerplate)

  3. Modify your package.json to include these lines:

    "browser": {
      "stormpath": "./lib/stormpath-sdk-angularjs.js",
      "stormpath.templates": "./lib/stormpath-sdk-angularjs.tpls.js"
    }
  4. In app/js/app.js, require stormpath and stormpath.templates in dependencies:

    var app = angular.module('todoApp', [
      require('angular-route'),
      require('stormpath'),
      require('stormpath.templates')
    ]);
  5. Make sure that the templates still work by using the login directive in app/views/todos.html:

    ...
    <div sp-login-form></div>
    ...
  6. Build the app:

    $ gulp
  7. Serve the app using the SPA Development Server:

    $ stormpath-spa-dev-server <path-to-your-app>/app/dist
  8. Verify that the form gets rendered and that the SDK is included properly

  9. To verify all functionality, please exchange the ngRouter for UI Router instead

@robertjd

Copy link
Copy Markdown
Member

I have the same question RE templates. Perhaps that file needs the same
banner but with 'stormpath.templates' as the export value
On Nov 23, 2015 12:08 PM, "Timothy E. Johansson" [email protected]
wrote:

WIP

Fixes #80 #80
.

stormpath-sdk-angularjs.js should export 'stormpath' instead of
'ui.router'.
Notes

  • Would this also include the templates?

How to verify

  1. Checkout this branch
  2. Copy the dist/ folder into your AngularJS project
  3. Require stormpath using require:

var app = angular.module('app', [require('angular-ui-router'), require('stormpath-sdk-angularjs')]);


You can view, comment on, or merge this pull request online at:

#81
Commit Summary

  • should export 'stormpath', not 'ui.router'
  • release 0.8.2

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#81.

@timothyej

Copy link
Copy Markdown
Contributor Author

Yes, I'm looking at it now, will see if html2js (which is generating the file) has any options like that.

@timothyej

Copy link
Copy Markdown
Contributor Author

@timothyej

Copy link
Copy Markdown
Contributor Author

@robertjd and @typerandom please review! :)

robertjd added a commit that referenced this pull request Nov 24, 2015
@robertjd robertjd merged commit c0242f3 into stormpath:master Nov 24, 2015
@robertjd

Copy link
Copy Markdown
Member

Looks good, thanks @timothyej !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants