0.2.1 • Published 3 years ago

emojiplus v0.2.1

Weekly downloads
7
License
MIT
Repository
github
Last release
3 years ago

emojiplus

Usage

import { EmojiSpan } from "emojiplus";

function App() {
  return (
    <div>
      <EmojiSpan ariaLabel="a dino emoji">🦖</EmojiSpan>
    </div>
  );
}

export default App;

Contributing

Making Changes

For now, the only way to contribute to this package with visibility into the changes is via linking. Yalc is a fantastic tool for this purpose.

  1. Ensure you have the necessary dependencies installed:

    npm install
  2. Make changes and bundle them using:

    npm run build
  3. Test them using a separate app (e.g npx create-react-app demo):

    # in this project's root directory, run
    yalc publish
    
    # then in the root directory of the app you're using to demo this package, run:
    yalc link emojiplus && npm run start

    You should now be able to use the package in that app, e.g.

    import { EmojiSpan } from "emojiplus";

Available Scripts

CommandEnv VarsExamplePurpose
buildnonenpm run buildRuns npm run build:rollup
build:rollupnonenpm run build:rollupGenerates a build and source map (bundle.js & bundle.js.map) using Rollup & Babel.
cleannonenpm run cleanRuns npm run clean:eslint and npm run clean:prettier
clean:eslintnonenpm run clean:eslintRuns npx eslint --fix ., which attempts to resolve all eslint issues in the project.
clean:prettiernonenpm run clean:prettierRuns npx prettier --write ., which attempts to resolve all prettier issues in the project.
testnonenpm run testRuns npm run test:eslint and npm run test:prettier
test:babelnonenpm run test:babelRuns npx babel src --out-dir .babel-config-test/, providing a glimpse at how babel's current config transforms the src code. Find the output in .babel-config-test/.
test:eslintnonenpm run test:eslintRuns npx eslint ., providing info about issues.
test:prettiernonenpm run test:prettierRuns npx prettier --check ., providing info about issues.
releaseTAG (e.g. 1.2.3)TAG=1.2.3 npm run releaseGenerates a git tag using the TAG supplied, and pushes it to GitHub, then provides a link to follow to create a release in GitHub for the new tag. If the script fails, check the git log to see if a commit was created. If so, you'll have to undo the commit if you want to run the script again. Simply run the following to do so: git reset HEAD\^

Publishing Releases

In order to generate a release, you need to produce a new package version and a corresponding tag for said version.

For example, let's say you want to add a component to this package.

To do so, you'd simply add your component, commit your work, then produce your version via:

  1. Open package.json and update the version accordingly (e.g. 1.2.3 to 1.3.0).
  2. Run the following command with your new version in place of <VERSION>:

    TAG=<VERSION> npm run release

    If it was successful, you'll get a link like https://github.com/Jonhernandez91/emojiplus/releases/new?tag=YOUR_VERSION&title=YOUR_VERSION in the output. Look for the rocket: 🚀

    If the release script fails, check the git log to see if a commit was created. If so, you'll have to undo the commit if you want to run the script again. Simply run the following to do so:

    git reset HEAD\^
  3. Go to the URL provided by the release script output, and make a release for your new version (a tag was produced by the release script using the version you provided).

  4. Once the release is created, go to the Actions tab for this project and you should see a job running for your release, which, if successful, will upload your new version of this package to JFrog. Note that it takes a minute or so for JFrogs API to reflect the successful upload.

0.2.1

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.0

3 years ago