Skip to content

Commit

Permalink
docs: add playground
Browse files Browse the repository at this point in the history
  • Loading branch information
lihbr committed Jun 2, 2021
1 parent d1d3c0d commit 347f7c9
Show file tree
Hide file tree
Showing 14 changed files with 79 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# custom
playground

# .gitignore copy

# custom
Expand Down
15 changes: 15 additions & 0 deletions playground/dico
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -x "$basedir/../node" ]; then
"$basedir/../node" "$basedir/../bin/cli" "$@"
ret=$?
else
node "$basedir/../bin/cli" "$@"
ret=$?
fi
exit $ret
7 changes: 7 additions & 0 deletions playground/dico.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@IF EXIST "%~dp0\..\node.exe" (
"%~dp0\..\node.exe" "%~dp0\..\bin\cli" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\bin\cli" %*
)
16 changes: 16 additions & 0 deletions playground/dico.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"dico": "my-dico",
"sources": [
"src/**/*.(js|jsx)",
"src/**/*.(ts|tsx)",
"src/**/*.vue"
],
"schema": {
"foo": {
"bar": "",
"baz": "",
"qux": {}
}
},
"updated_at": "2021-06-01T10:00:08.413473+00:00"
}
3 changes: 3 additions & 0 deletions playground/src/nested/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const jsNestedFoo = "$dico.js.nested.foo";

const jsNestedBar = "$dico.js.nested.bar";
3 changes: 3 additions & 0 deletions playground/src/nested/test.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const jsxNestedFoo = "$dico.jsx.nested.foo";

const jsxNestedBar = "$dico.jsx.nested.bar";
3 changes: 3 additions & 0 deletions playground/src/nested/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const tsNestedFoo = "$dico.ts.nested.foo";

const tsNestedBar = "$dico.ts.nested.bar";
3 changes: 3 additions & 0 deletions playground/src/nested/test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const tsxNestedFoo = "$dico.tsx.nested.foo";

const tsxNestedBar = "$dico.tsx.nested.bar";
7 changes: 7 additions & 0 deletions playground/src/nested/test.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script>
const vueNestedFoo = "$dico.vue.nested.foo";
const vueNestedBar = "$dico.vue.nested.bar";
export default {}
</script>
3 changes: 3 additions & 0 deletions playground/src/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const jsFoo = "$dico.js.foo";

const jsBar = "$dico.js.bar";
3 changes: 3 additions & 0 deletions playground/src/test.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const jsxFoo = "$dico.jsx.foo";

const jsxBar = "$dico.jsx.bar";
3 changes: 3 additions & 0 deletions playground/src/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const tsFoo = "$dico.ts.foo";

const tsBar = "$dico.ts.bar";
3 changes: 3 additions & 0 deletions playground/src/test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const tsxFoo = "$dico.tsx.foo";

const tsxBar = "$dico.tsx.bar";
7 changes: 7 additions & 0 deletions playground/src/test.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script>
const vueFoo = "$dico.vue.foo";
const vueBar = "$dico.vue.bar";
export default {}
</script>

0 comments on commit 347f7c9

Please sign in to comment.