Skip to content

Instantly share code, notes, and snippets.

View ridvanaltun's full-sized avatar
🐴
prostagma?

Rıdvan Altun ridvanaltun

🐴
prostagma?
View GitHub Profile
@ridvanaltun
ridvanaltun / esm-package.md
Created September 25, 2021 10:58 — forked from sindresorhus/esm-package.md
Pure ESM package

Pure ESM package

The package linked to from here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.

Conventinal Commit Messages

See how a minor change to your commit message style can make a difference. Examples

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats

Default

@ridvanaltun
ridvanaltun / GitCommitEmoji.md
Created July 25, 2019 07:17 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@ridvanaltun
ridvanaltun / React-Native-WebView-Cookies.js
Created July 24, 2019 13:31 — forked from xxxxlr/React-Native-WebView-Cookies.js
React Native Trick: Get Cookies of WebView without using any native modules such as react-native-cookies. Might be helpful for getting JWT while making OAuth2 👽
// @flow
import React, { Component } from 'react';
import {
WebView,
} from 'react-native';
class LoginScreen extends Component {
state = {
cookies : {},