Skip to content

magicznyleszek/magicxer

Repository files navigation

magicxer

npm npm npm

Magical words mixer. Combines words from list into a list of clever mixes. You can check it out live at magicxer.magicznyleszek.xyz.

It also has some code for splitting words to syllables -- simple but imperfect solution for a surprisingly complex problem.

Usage

npm install magicxer --save
const magicxer = require("magicxer").magicxer;
return magicxer.mix("snow", "white");
// ["snowte", "snite", "sne", "snowhite", "shite", "ste"]
import { magicxer } from "magicxer";
magicxer.mix("snow", "white");

Technicalities

This is a small webapp project that I created to check out some fancy new tech:

  • Parcel
  • Vue.js
  • Jest
  • TypeScript
  • Prettier
  • 2 spaces indentation :-D
  • .editorconfig

Development

You probably want to watch tests: npm run test-watch.

Website

Change code at src and run Parceljs live server (localhost:2038): npm start.

Module

Change code at lib or src, run npm run build-module and use your local version in your other npm project.

Building

Development website outcome is in dev, production website is in docs1 and module code is in dist.

Before commiting the changes, make sure to run npm run build-website or npm run build-module - depending on what part of the project you've worked on.

Footnotes

  1. We use docs directory, because Github Pages allows to serve only root or docs.