profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/kud/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Erwann Mest kud @Contexte Paris, France http://kud.io front-end engineer 💐

kud/breather 40

Help you to take a break.

kud/blank-video 38

https://github.com/mathiasbynens/small could be more interesting.

kud/flags-of-the-world 29

Collection of every country's flag.

kud/browser-js 17

A sugar for your browser.

kud/apple-french-keyboard-windows 15

A solution to use the Apple Wireless Keyboard on Windows.

kud/cookie 14

Library to manipulate cookie in JavaScript - YOU PROBABLY SHOULD USE https://github.com/js-cookie/js-cookie

gorangajic/node-toggl 9

:alarm_clock: Command line utility for

Contexte/cahouete 8

Writing email templates is now so much fun.

kud/ed-209 8

I'm an IRC bot!

kud/diary 3

_kud.diary

issue openedpmmmwh/react-refresh-webpack-plugin

Stuck at [HMR] Waiting for update signal from WDS

Hello,

I don't succeed to make this plug work.

This is my config:

// webpack.config.js
/* eslint-disable no-empty, prefer-named-capture-group, require-unicode-regexp, max-lines-per-function */
const path = require("path")
const webpack = require("webpack")
const HtmlWebpackPlugin = require("html-webpack-plugin")
const CopyWebpackPlugin = require("copy-webpack-plugin")
const ReactRefreshWebpackPlugin = require("@pmmmwh/react-refresh-webpack-plugin")
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer")

const babelConfig = require("./__webpack__/webpack.babel-config")
const { envVars } = require("./__webpack__/webpack.helpers")

const customMedia = require("./media-queries.json")

const SRC_DIR = path.resolve(__dirname, "src")
const PUBLIC_DIR = path.resolve(__dirname, "public")
const DIST_DIR = path.resolve(__dirname, "dist")

module.exports = (env) => ({
  mode: "development",

  // the source
  entry: [`${SRC_DIR}/index.js`],

  // the destination
  output: {
    path: DIST_DIR,
    filename: "index.js",
    publicPath: "/",
  },

  resolve: {
    fallback: {
      path: false,
    },
    alias: {
      "~": `${SRC_DIR}`, // thanks to that, we can use import xxx = '~/file'
    },
  },

  // active devtools
  // devtool: "cheap-module-inline-source-map",
  devtool: "source-map",

  // server
  devServer: {
    https: envVars[env.stage].API_URL.startsWith("https"),
    port: envVars[env.stage].API_URL.startsWith("https") ? 443 : 8080,
    historyApiFallback: true,
    host: env.host,
    hot: true,
    hotOnly: true,
  },

  // plugins
  plugins: [
    new HtmlWebpackPlugin({
      template: "src/index.html",
      favicon: "public/favicon.ico",

      stage: JSON.stringify(env.stage),

      crispToken: JSON.stringify(envVars[env.stage].CRISP_TOKEN),
      segmentToken: JSON.stringify(envVars[env.stage].SEGMENT_TOKEN),
    }),

    new CopyWebpackPlugin({
      patterns: [
        {
          from: PUBLIC_DIR,
          to: DIST_DIR,
        },
      ],
    }),

    new webpack.DefinePlugin({
      STAGE: JSON.stringify(env.stage),

      SENTRY_TOKEN: JSON.stringify(envVars.SENTRY_TOKEN),
      MOCKS_ENABLED: JSON.stringify(envVars.MOCKS_ENABLED),

      API_URL: JSON.stringify(envVars[env.stage].API_URL),
      CRISP_TOKEN: JSON.stringify(envVars[env.stage].CRISP_TOKEN),
      CSRF_TOKEN_COOKIE_NAME: JSON.stringify(
        envVars[env.stage].CSRF_TOKEN_COOKIE_NAME,
      ),
      JOURNAL_URL: JSON.stringify(envVars[env.stage].JOURNAL_URL),
      LOGIN_URL: JSON.stringify(envVars[env.stage].LOGIN_URL),
    }),

    new BundleAnalyzerPlugin({
      analyzerMode: "static",
      openAnalyzer: false,
      reportFilename: "../bundle-report.html",
    }),

    new ReactRefreshWebpackPlugin(),
  ],

  // what will be used for each type of code
  module: {
    rules: [
      // javascript
      {
        enforce: "pre",
        test: /\.jsx?$/,
        exclude: /node_modules/,
        use: [
          {
            loader: "eslint-loader",
          },
          {
            loader: "stylelint-custom-processor-loader",
            options: {
              emitWarning: true,
            },
          },
        ],
      },
      {
        test: /\.jsx?$/,
        exclude: /node_modules/,
        loader: "babel-loader",
        options: babelConfig,
      },

      // files
      {
        test: /\.(woff|woff2|eot|ttf)$/,
        type: "asset/inline",
      },

      // styles
      {
        enforce: "pre",
        test: /\.css$/,
        exclude: /node_modules/,
        use: [
          {
            loader: "postcss-loader",
            options: {
              postcssOptions: {
                plugins: [
                  ["stylelint"],
                  ["postcss-reporter", { clearReportedMessages: true }],
                ],
              },
            },
          },
        ],
      },

      {
        test: /\.css$/,
        exclude: /\.module\.css$/,
        use: [
          {
            loader: "style-loader",
          },
          {
            loader: "css-loader",
            options: {
              sourceMap: true,
              modules: false,
              importLoaders: 1,
              import: true,
            },
          },
          {
            loader: "postcss-loader",
            options: {
              postcssOptions: {
                plugins: [
                  ["autoprefixer"],
                  ["postcss-custom-media", { importFrom: [{ customMedia }] }],
                ],
              },
            },
          },
        ],
      },

      {
        test: /\.module\.css$/,
        use: [
          {
            loader: "style-loader",
          },
          {
            loader: "css-loader",
            options: {
              sourceMap: true,
              modules: true,
              importLoaders: 1,
              localIdentName: "[path][name]--[local]-___[hash:base64:5]",
              import: true,
            },
          },
          {
            loader: "postcss-loader",
            options: {
              postcssOptions: {
                plugins: [
                  ["autoprefixer"],
                  ["postcss-custom-media", { importFrom: [{ customMedia }] }],
                ],
              },
            },
          },
        ],
      },

      // images
      {
        test: /.*\.(gif|png|jpe?g|svg)$/i,
        type: "asset/resource",
      },
    ],
  },
})

and

// webpack.babel-config.js

module.exports = {
  presets: [
    "@babel/preset-env",
    [
      "@babel/preset-react",
      {
        runtime: "automatic",
        importSource: "@emotion/react",
      },
    ],
  ],
  plugins: [
    "@babel/plugin-transform-runtime",
    "@babel/plugin-proposal-class-properties",
    "@babel/plugin-proposal-object-rest-spread",
    "@babel/plugin-proposal-optional-chaining",
    "babel-plugin-styled-components",
    [
      "@emotion/babel-plugin",
      {
        sourceMap: true,
        autoLabel: "dev-only",
        labelFormat: "[dirname]-[filename]--[local]",
        cssPropOptimization: true,
      },
    ],
    "react-refresh/babel",
  ],
}

Any reason why?

I use webpack 5.

Thanks!

created time in 5 hours

push eventkud/my

Erwann Mest

commit sha 1c04c2bb4f18124eececfb4a1f6496ecd78b3bc6

feat(git): add renaming of master to main

view details

push time in a month

push eventkud/my

Erwann Mest

commit sha b6025a91d93f05624b04fe9bfffb79199a91a92d

feat(git): use main instead of master

view details

push time in a month

issue commentThom1729/Sublime-JS-Custom

Improvement for styled-components / emotion

Hello @Thom1729 I'm sorry I don't use ST anymore. But thanks for notifying me about this. I'll try it if I come back to ST. 😊

kud

comment created time in a month

push eventkud/my

Erwann Mest

commit sha 960e49740e79f13c7cf24a2ec44737f9b7183271

feat(osx): update for big sur

view details

push time in 2 months

issue commentjaywcjlove/mocker-api

Issue with http-proxy: socket hang up

I close this issue as I use now msw.js. I won't be able to have a try again. Thank you for your time. :)

kud

comment created time in 3 months

issue closedjaywcjlove/mocker-api

Issue with http-proxy: socket hang up

Hello! And first of all, thanks for your project, it's really efficient!

My issue is that sometimes (mostly when I run cypress on the proxy), I've got this:

/node_modules/http-proxy/lib/http-proxy/index.js:120
    throw err;
    ^

Error: socket hang up
    at connResetException (internal/errors.js:614:14)
    at TLSSocket.socketCloseListener (_http_client.js:441:25)
    at TLSSocket.emit (events.js:327:22)
    at net.js:670:12
    at TCP.done (_tls_wrap.js:562:7) {
  code: 'ECONNRESET'
}
npm ERR! code ELIFECYCLE

Do you have any idea why?

Running cypress too many times on it is too much for the proxy?

closed time in 3 months

kud

issue commentmakenotion/notion-sdk-js

Consistency on JavaScript attributes

Hello!

I understand now why you used snake_case, as the API is written like this. However, a js client should be an abstraction and also respects the consistency / convention of a language.

I already did a js client for a json:api api which were in snake_case. I did an helper for that wwith https://github.com/blakeembrey/change-case where it transforms any params for the post request or even for the result of the query. Like that, the dev hasn't any issue to understand how to use/write their code.

So yeah, everything should be in lowerCamelCase for the JS Client and you add a little helper to convert everything.

kud

comment created time in 3 months

push eventkud/sponsorships

Erwann Mest

commit sha 650a0fc86fa856d6c7dc3ce1b1651a709fc6a120

💅

view details

push time in 3 months

delete branch kud/sponsorships

delete branch : gh-pages

delete time in 3 months

push eventkud/sponsorships

Erwann Mest

commit sha fa896fc72bf708cc40b5e2622a83fa3b2c63ad22

Delete CNAME

view details

push time in 3 months

push eventkud/sponsorships

Erwann Mest

commit sha eaf4d58aa07513cd8388d1bf50a5672532ca5f79

feat(): first version with notion as backend!

view details

push time in 3 months

issue openedmakenotion/notion-sdk-js

Consistence on JavaScript attributes

Hello,

database_id isn't compliant compared to logLevel or baseUrl.

Please, use lowerCamelCase everywhere.

Thank youuuuuuuu 🙌🏻

created time in 3 months

issue commenttannerlinsley/react-query

Apparently the "main" field isn't right in package.json

I've got to have a look the reason why. :) Yeah sure.

kud

comment created time in 3 months

issue commenttannerlinsley/react-query

Apparently the "main" field isn't right in package.json

This project isn't the only one to have this error in fact. And I'm using node v16.0.0. :)

kud

comment created time in 3 months