Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create npm package out of client's api #169

Closed

Conversation

unDemian
Copy link
Contributor

@unDemian unDemian commented Mar 25, 2018

Built on top of #180

Summary

This PR prepares happychat-client to be exposed as a npm package. Paths are resolved using babel-plugin-module-resolver and configuration json files are inlined using babel-plugin-inline-json.

CSS url is moved to a configuration field and it will be server by webpack even when developing the npm package.

Testing

  1. Switch calypso to try/happychat-client branch (Use happychat-client npm package wp-calypso#23630)
  2. Link this package to wp-calypso, by following these steps
  • run npm link in this folder
  • run npm link happychat-client in calypso folder
  1. Run npm run dev:standalone in this repo
  2. Grab your oauth token from a wpcom request made by the client (http://localhost:9000) it is under Authorization header after Bearer
  3. Add the token to calypso https://github.com/Automattic/wp-calypso/pull/23630/files#diff-56de7193249f7b0107d6033c1a7737acR22
  4. Run npm dev:npm
  5. Access http://calypso.localhost:3000/me/chat
  6. It should load the happychat-client iframe

@unDemian unDemian requested review from a team and removed request for a team March 26, 2018 09:17
@unDemian unDemian mentioned this pull request Mar 26, 2018
@unDemian unDemian self-assigned this Mar 26, 2018
@unDemian unDemian changed the title Testing Create npm package out of client's api Mar 26, 2018
@unDemian unDemian requested review from a team and oandregal March 26, 2018 11:59
@unDemian unDemian changed the base branch from update/webpack-configs-and-entry-points to add/local-config-files March 27, 2018 15:24
@unDemian unDemian changed the base branch from add/local-config-files to update/webpack-configs-and-entry-points March 27, 2018 16:50
@unDemian unDemian removed request for a team and oandregal March 27, 2018 16:51
@unDemian
Copy link
Contributor Author

Closed in favor of smaller PRs
#183
#184

@unDemian unDemian closed this Mar 27, 2018
@oandregal oandregal deleted the add/npm-target-take-2 branch March 27, 2018 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant