Skip to content

Commit

Permalink
Merge pull request #38 from juno7803/master
Browse files Browse the repository at this point in the history
feat: apply prettier
  • Loading branch information
738 authored Dec 4, 2021
2 parents ce9bd50 + e8fcf0d commit d1d20f0
Show file tree
Hide file tree
Showing 15 changed files with 5,048 additions and 473 deletions.
4 changes: 2 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"presets": ["es2015"]
}
"presets": ["es2015"]
}
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
build:
working_directory: ~/inko
docker:
- image: "circleci/node:9.6.1"
- image: 'circleci/node:9.6.1'
steps:
- checkout
- run:
Expand Down
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.vscode
node_modules
README.md
inko.min.js
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
trailingComma: 'es5',
tabWidth: 2,
printWidth: 80,
semi: true,
singleQuote: true,
};
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["esbenp.prettier-vscode"]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.formatOnSave": true
}
4 changes: 1 addition & 3 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"version": "1.1.1",
"description": "์˜ํƒ€๋ฅผ ํ•œ๊ธ€๋กœ ์ณค์„ ๋•Œ, ํ˜น์€ ํ•œํƒ€๋ฅผ ์˜์–ด๋กœ ๋ณ€ํ™˜ํ•ด์ฃผ๋Š” ๊ธฐ๋Šฅ์„ ๊ฐ€์ง„ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ์˜คํ”ˆ์†Œ์Šค ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์ž…๋‹ˆ๋‹ค.",
"main": "inko.js",
"authors": [
"Jon Jee"
],
"authors": ["Jon Jee"],
"license": "MIT",
"keywords": [
"inko",
Expand Down
71 changes: 43 additions & 28 deletions examples/example.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,47 @@
<!Doctype html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/inko@1.1.1/inko.min.js"></script>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/npm/inko@1.1.1/inko.min.js"
></script>
<title>example</title>
</head>
<body>
<script>
var inko = new Inko();
function englishToKorean(text) {
document.getElementById("koreanOutput").innerHTML = inko.en2ko(text);
}
</head>
<body>
<script>
var inko = new Inko();
function englishToKorean(text) {
document.getElementById('koreanOutput').innerHTML = inko.en2ko(text);
}

function koreanToEnglish(text) {
document.getElementById("englishOutput").innerHTML = inko.ko2en(text);
}
</script>
<h1>inko.js EXAMPLE HTML</h1>
<h2>์˜ํƒ€ -> ํ•œ๊ธ€</h2>
<textarea id="englishInput" type="text" onkeyup="englishToKorean(this.value)" value=""></textarea>
<br />
<div id="koreanOutput"></div>
function koreanToEnglish(text) {
document.getElementById('englishOutput').innerHTML = inko.ko2en(text);
}
</script>
<h1>inko.js EXAMPLE HTML</h1>
<h2>์˜ํƒ€ -> ํ•œ๊ธ€</h2>
<textarea
id="englishInput"
type="text"
onkeyup="englishToKorean(this.value)"
value=""
></textarea>
<br />
<div id="koreanOutput"></div>

<h2>ํ•œํƒ€ -> ์˜์–ด</h2>
<textarea id="koreanInput" type="text" onkeyup="koreanToEnglish(this.value)" value=""></textarea>
<br />
<div id="englishOutput"></div>

</body>
</html>
<h2>ํ•œํƒ€ -> ์˜์–ด</h2>
<textarea
id="koreanInput"
type="text"
onkeyup="koreanToEnglish(this.value)"
value=""
></textarea>
<br />
<div id="englishOutput"></div>
</body>
</html>
27 changes: 15 additions & 12 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,26 @@ import rename from 'gulp-rename';
import sourcemaps from 'gulp-sourcemaps';
import pump from 'pump';

gulp.task('test', () =>
gulp.src('test/**/*.js')
.pipe(mocha())
);
gulp.task('test', () => gulp.src('test/**/*.js').pipe(mocha()));

gulp.task('watch', () => {
gulp.watch(['index.js', 'gulpfile.babel.js', 'test/**/*.js'], ['test'])
gulp.watch(['index.js', 'gulpfile.babel.js', 'test/**/*.js'], ['test']);
});


gulp.task('build', (cb) => {
pump([gulp.src('index.js'), sourcemaps.init(),
rename('inko.min.js'), uglify(), sourcemaps.write('.'),
gulp.dest('./'),
], cb);
})
pump(
[
gulp.src('index.js'),
sourcemaps.init(),
rename('inko.min.js'),
uglify(),
sourcemaps.write('.'),
gulp.dest('./'),
],
cb
);
});

gulp.task('default', ['watch', 'test'], () => {
gutil.log('Gulp is running...');
gutil.log('Gulp is running...');
});
1 change: 0 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

export interface InkoOption {
allowDoubleConsonant?: boolean;
}
Expand Down
Loading

0 comments on commit d1d20f0

Please sign in to comment.