Skip to content

Conversation

Njuelle
Copy link
Contributor

@Njuelle Njuelle commented Dec 26, 2018

What does this PR do?

Update webpack build config to fix undefined protocol classes in raw web usage :

  • change webpack entrypoint to include all classes
  • rename library name to avoid Kuzzle.Kuzzle ...
  • add BUILT global constant to avoid exception when used in raw web

everything remains unchanged for use with Webpack and NodeJS

How should this be manually tested?

  • Checkout this branch
  • npm run build
  • create a test.html file at the root of the sdk-javascript folder with :
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Hello Kuzzle</title>
</head>
<body>
  <script src="dist/kuzzle.js"></script>
  <script>
    const kuzzle = new KuzzleSDK.Kuzzle(
      new KuzzleSDK.Websocket({ host: 'localhost' })
    );
    kuzzle.connect();
    kuzzle.addListener('connected', function() {
      console.log('Hello Kuzzle')
    });
  </script>
</body>
</html>
  • run a Kuzzle locally
  • try html file in your browser : file:///path/to/your/sdk-javascript/folder/test.html
  • look at the dev console

@codecov-io
Copy link

codecov-io commented Dec 26, 2018

Codecov Report

Merging #349 into 6-dev will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##            6-dev     #349   +/-   ##
=======================================
  Coverage   96.56%   96.56%           
=======================================
  Files          27       27           
  Lines        1397     1397           
=======================================
  Hits         1349     1349           
  Misses         48       48

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 27fa579...4248cea. Read the comment docs.

@Njuelle Njuelle added 6-dev and removed wip labels Dec 26, 2018
@Aschen Aschen merged commit 7390dfb into 6-dev Dec 26, 2018
@Aschen Aschen deleted the fix-webpack-build branch December 26, 2018 17:26
@Aschen Aschen mentioned this pull request Dec 27, 2018
Aschen added a commit that referenced this pull request Dec 27, 2018
Bug fixes

    [ #349 ] [build] Update webpack build config to fix raw web usage (Njuelle)
    [ #345 ] Fix 343 unhandled rejection on connect (Aschen)

Others

    [ #348 ] Put document:create optional args in last position (Aschen)
@Aschen Aschen mentioned this pull request Jan 7, 2019
Aschen added a commit that referenced this pull request Jan 7, 2019
#### Bug fixes

- [ [#349](#349) ] [build] Update webpack build config to fix raw web usage   ([Njuelle](https://github.com/Njuelle))
- [ [#345](#345) ] Fix 343 unhandled rejection on connect   ([Aschen](https://github.com/Aschen))

#### New features

- [ [#353](#353) ] Add method to use custom controllers in the SDK   ([Aschen](https://github.com/Aschen))

#### Enhancements

- [ [#350](#350) ] Have host param mandatory for protocols   ([Aschen](https://github.com/Aschen))

#### Others

- [ [#348](#348) ] Put document:create optional args in last position   ([Aschen](https://github.com/Aschen))
---
@scottinet scottinet mentioned this pull request Jan 17, 2019
scottinet pushed a commit that referenced this pull request Jan 17, 2019
Update webpack build config to fix undefined protocol classes in raw web usage :

    change webpack entrypoint to include all classes
    rename library name to avoid Kuzzle.Kuzzle ...
    add BUILT global constant to avoid exception when used in raw web

everything remains unchanged for use with Webpack and NodeJS
@scottinet scottinet mentioned this pull request Jan 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants