-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
4,802 additions
and
425 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,6 @@ Icon | |
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
node_modules | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.