Skip to content

Commit

Permalink
push version 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
duncannah committed Jul 7, 2019
1 parent c10fd4c commit 6f06655
Show file tree
Hide file tree
Showing 37 changed files with 4,802 additions and 425 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ Icon
Network Trash Folder
Temporary Items
.apdisk

node_modules
build
114 changes: 114 additions & 0 deletions Gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
const fs = require("fs-extra");
const path = require("path");

const { series, src, dest } = require("gulp");
const babel = require("gulp-babel");
const sass = require("gulp-sass");
const zip = require("gulp-zip");

const BUILDPATH = path.join(__dirname, "/build");

sass.compiler = require("node-sass");

async function clean() {
await fs.emptyDir(BUILDPATH);
}

async function build() {
// copy
await (() =>
new Promise((resv) =>
src(["src/manifest.json"])
.pipe(dest("build/"))
.on("end", resv)
))();
await (() =>
new Promise((resv) =>
src(["src/popup.htm"])
.pipe(dest("build/"))
.on("end", resv)
))();
await (() =>
new Promise((resv) =>
src(["src/lib/*"])
.pipe(dest("build/lib"))
.on("end", resv)
))();
await (() =>
new Promise((resv) =>
src(["assets/**", "!assets/screenshots/**"])
.pipe(dest("build/assets"))
.on("end", resv)
))();

// transpile jsx
await (() =>
new Promise((resv) =>
src(["src/popup.js"])
.pipe(
babel({
presets: [
[
"@babel/preset-react",
{
pragma: "preact.createElement",
pragmaFrag: "preact.Fragment"
}
]
],
plugins: [["@babel/plugin-proposal-class-properties"]]
})
)
.pipe(dest("build/"))
.on("end", resv)
))();

// transpile scss
await (() =>
new Promise((resv) =>
src(["src/popup.scss"])
.pipe(sass().on("error", sass.logError))
.pipe(dest("build/"))
.on("end", resv)
))();

// compile list
let kaomojiList = {};

await fs.readdir(path.join(__dirname, "/kaomojis")).then((files) => {
files.forEach((file) => {
let kaomojis = {};

let currentCat = "";
fs.readFileSync(path.join(__dirname, "/kaomojis", file))
.toString()
.split("\n")
.forEach((line) => {
if (line.startsWith("!!!!!!!!!!!!")) {
currentCat = line.substr(12).trim();
kaomojis[currentCat] = [];
} else if (line.trim().length > 0) kaomojis[currentCat].push(line.trim());
});

kaomojiList[file.substr(3)] = kaomojis;
});
});

await fs.writeFile(path.join(BUILDPATH, "/kaomojis.js"), "const KAOMOJIS = " + JSON.stringify(kaomojiList));
}

async function zipBuild() {
await (() =>
new Promise((resv) =>
src("build/**")
.pipe(zip("archive.zip"))
.pipe(dest("build"))
.on("end", resv)
))();
}

exports.clean = clean;
exports.build = build;
exports.deploy = series(clean, build, zipBuild);

exports.default = series(clean, build);
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# kaomojie

![screenshot](screenshot.png)
![screenshot](assets/screenshots/01.png)

Git repository for the Chrome extension **kaomojie**.

```
Use kaomojis more easily with this extension! Simply pick a category, and click on the kaomoji you want, and it will be copied!
```

<center>
**Easy and fast access to hundreds of kaomojis, all categorised!**

[![Chrome Web Store](https://developer.chrome.com/webstore/images/ChromeWebStore_BadgeWBorder_v2_206x58.png)](https://chrome.google.com/webstore/detail/kaomojie/lmejjdlbclkidnpmcoknihonapppadid)
[![Firefox Add-ons](https://addons.cdn.mozilla.net/static/img/addons-buttons/AMO-button_1.png)](https://addons.mozilla.org/en-US/firefox/addon/kaomojie/)

</center>
## Building

```
gulp
```

# License
## License

This software is licensed under AGPL 3.0; a copy can be found under [LICENSE](LICENSE).
Binary file added assets/icons/icon16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/icon32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/icon48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/icon64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/icon96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshots/01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshots/01.psd
Binary file not shown.
9 changes: 0 additions & 9 deletions browser-polyfill.min.js

This file was deleted.

Binary file added design/icon.sketch
Binary file not shown.
Binary file removed icon.sketch
Binary file not shown.
Binary file removed icons/icon16.png
Binary file not shown.
Binary file removed icons/icon32.png
Binary file not shown.
Binary file removed icons/icon48.png
Binary file not shown.
Binary file removed icons/icon64.png
Binary file not shown.
Binary file removed icons/icon96.png
Binary file not shown.
Loading

0 comments on commit 6f06655

Please sign in to comment.