diff --git a/package.json b/package.json
index ddaeb0e..5ea0e60 100644
--- a/package.json
+++ b/package.json
@@ -1,14 +1,13 @@
{
"name": "canihazusername",
- "version": "1.0.3",
+ "version": "2.0.0",
"description": "username generator. typed, simple and customizable",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"scripts": {
"generate": "git -C ./generate/wordlist pull && node ./generate/wordlist.js",
- "dev": "webpack -d -w",
- "build": "webpack -p",
- "test": "mocha",
+ "docs": "rm -r ./docs && parcel build --no-source-maps -d ./docs ./website/index.html",
+ "build": "tsc",
"prepublishOnly": "npm run build && npm run test"
},
"repository": {
@@ -27,7 +26,10 @@
"url": "https://github.com/CupCakeArmy/canihazusername/issues"
},
"homepage": "https://github.com/CupCakeArmy/canihazusername#readme",
- "dependencies": {},
+ "dependencies": {
+ "bulma": "^0.8.0",
+ "tachyons": "^4.11.1"
+ },
"devDependencies": {
"parcel-bundler": "^1.12.4",
"ts-node-dev": "^1.0.0-pre.44",
diff --git a/website/index.html b/website/index.html
index 31a2da2..a0e3af5 100644
--- a/website/index.html
+++ b/website/index.html
@@ -1,7 +1,36 @@
+
+
+
+
+
+
+
+
canihazusername
+
+
+
+
+
+
+
+
+
+
+
+
yarn add canihazusername
+
import { generate } from 'canihazusername'
+generate('{character}_{english}')
+
+
+
+
diff --git a/website/main.css b/website/main.css
new file mode 100644
index 0000000..be385f7
--- /dev/null
+++ b/website/main.css
@@ -0,0 +1,34 @@
+* {
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
+}
+
+body {
+ width: 100vw;
+ height: 100vh;
+}
+
+#main {
+ text-align: center;
+ padding: 1em;
+ display: flex;
+ /* justify-content: center;
+ align-items: center; */
+ height: 100%;
+ width: 100%;
+ overflow: auto;
+}
+
+#main > div {
+ max-width: 35em;
+ margin: auto;
+}
+
+pre {
+ text-align: left;
+ padding: 1em .5em;
+ border-radius: 1.5em;
+}
+
+h2 span{
+ color: #3273dc
+}
\ No newline at end of file
diff --git a/website/main.ts b/website/main.ts
index aab391f..ed7be9c 100644
--- a/website/main.ts
+++ b/website/main.ts
@@ -1,3 +1,17 @@
-import cihu from '../'
+import 'bulma/css/bulma'
+import { showAvailableLists, generate } from '../'
-console.log(cihu())
\ No newline at end of file
+const input = window.document.getElementById('format') as HTMLInputElement
+const output = window.document.getElementById('username') as HTMLInputElement
+const list = window.document.getElementById('lists')
+const button = window.document.getElementById('button')
+
+const gen = () => {
+ output.value = generate(input.value)
+}
+
+button.addEventListener('click', gen)
+button.addEventListener('touchstart', gen)
+
+gen()
+list.innerHTML = showAvailableLists().join(', ')