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

KZL-861 Getting started with Webpack #164

Merged
merged 24 commits into from
Feb 27, 2019

Conversation

xbill82
Copy link
Contributor

@xbill82 xbill82 commented Nov 26, 2018

Adds the Getting Started with Webpack in the Kuzzle JS SDK section.

Note that this guide introduced a new test runner called WebpackRunner, which builds the snippet and generates an HTML page loading it, then opens the page with Puppeteer.

How should this be manually tested?

Check Netlify build.

@kuzzle
Copy link
Contributor

kuzzle commented Nov 26, 2018

Snippets tests reports

SDK Version Tests overview
v6 ✔️
v5 ✔️
v1 ✔️
v1 ✔️
v1 ✔️
v1 ✔️

@xbill82 xbill82 removed the wip label Feb 21, 2019
Copy link
Member

@etrousset etrousset left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job.
Some inline code snippets don't have the same syntax coloration than the ones using the snippet inclusion mechanism
This may be due to using ```javascript instead of ``` js

In this tutorial you will learn how to install, run and use **Kuzzle** with the **Javascript SDK** in the browser using **Webpack**.
We will walk you through creating scripts that can **store** documents in Kuzzle and subscribe to **notifications** for each new document created.

## Running Kuzzle
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove this section and just add a note that have a Kuzzle running is a prerequisite, with a link to https://docs-v2.kuzzle.io/guide/1/getting-started/running-kuzzle/ that has the exact same text

src/sdk-reference/js/6/getting-started/webpack/index.md Outdated Show resolved Hide resolved
src/sdk-reference/js/6/getting-started/webpack/index.md Outdated Show resolved Hide resolved
src/sdk-reference/js/6/getting-started/webpack/index.md Outdated Show resolved Hide resolved
src/sdk-reference/js/6/getting-started/webpack/index.md Outdated Show resolved Hide resolved
src/sdk-reference/js/6/getting-started/webpack/index.md Outdated Show resolved Hide resolved
src/sdk-reference/js/6/getting-started/webpack/index.md Outdated Show resolved Hide resolved
src/sdk-reference/js/6/getting-started/webpack/index.md Outdated Show resolved Hide resolved
src/sdk-reference/js/6/getting-started/webpack/index.md Outdated Show resolved Hide resolved
test/lib/runners/webpackRunner.js Outdated Show resolved Hide resolved
test/lib/runners/webpackRunner.js Outdated Show resolved Hide resolved
test/lib/scripts/puppeteer.js Show resolved Hide resolved
return false;
}

const versionString = JSON.parse(fs.readFileSync(packageFile))._id;

if (! versionString || ! versionString.includes(`kuzzle-sdk@${this.version}`)) {
if (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nitpicking) lines 28-35 can be simplified:

return versionString && versionString.includes(`kuzzle-sdk@${this.version}`);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than taking 2 ! away from the code, I don't see the point of changing this. Not my code, btw. Ended here because of Prettier 🤷‍♀️

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nitpicking issue, so it doesn't matter 👍
(it removes the entire if (condition is false) { return true; } else { return false; } condition)

test/templates/webpack-puppeteer.tpl.js Outdated Show resolved Hide resolved
@scottinet
Copy link
Contributor

@xbill82 > there are issues I've raised that are still to be resolved, such as https://github.com/kuzzleio/documentation/pull/164/files#r259288069

Copy link
Member

@alexandrebouthinon alexandrebouthinon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xbill82 : I think you need to rebase/merge your branch on 2-dev instead of master 🙂

@xbill82 xbill82 force-pushed the KZL-861-getting-started-webpack branch from 16dc2db to 7735f2c Compare February 27, 2019 13:59
@alexandrebouthinon alexandrebouthinon changed the base branch from master to 2-dev February 27, 2019 14:04
@alexandrebouthinon alexandrebouthinon merged commit c591823 into 2-dev Feb 27, 2019
@alexandrebouthinon alexandrebouthinon deleted the KZL-861-getting-started-webpack branch February 27, 2019 14:42
@scottinet scottinet mentioned this pull request Mar 26, 2019
scottinet added a commit that referenced this pull request Mar 26, 2019
# [2.1.0](https://github.com/kuzzleio/documentation/releases/tag/2.1.0) (2019-03-26)


#### Bug fixes

- [ [#251](#251) ] Fix ssl option name for android   ([jenow](https://github.com/jenow))

#### New features

- [ [#164](#164) ] KZL-861 Getting started with Webpack   ([xbill82](https://github.com/xbill82))

#### Enhancements

- [ [#252](#252) ] Add loading of fixtures mappings securities in admin controller   ([Aschen](https://github.com/Aschen))
- [ [#253](#253) ] Plugin embedded sdk   ([Aschen](https://github.com/Aschen))
- [ [#249](#249) ] Better example for SearchResult.next   ([Aschen](https://github.com/Aschen))

#### Others

- [ [#262](#262) ] [API] new auth:refreshToken API route documentation   ([scottinet](https://github.com/scottinet))
- [ [#257](#257) ] KZL-1054 Fix Node.js SDK Getting Started subscription   ([xbill82](https://github.com/xbill82))
- [ [#263](#263) ] [debug] Print standard output on an assertion error   ([scottinet](https://github.com/scottinet))
---
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.

6 participants