Skip to content

Commit fa133bb

Browse files
committed
🐣 release: commit first
0 parents  commit fa133bb

17 files changed

+5555
-0
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
./lib
2+
./jest.config.js
3+
./test/fixtures

.eslintrc.js

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
'use strict'
2+
3+
module.exports = {
4+
root: true,
5+
env: {
6+
node: true,
7+
jest: true
8+
},
9+
extends: [
10+
'plugin:vue-libs/recommended'
11+
],
12+
plugins: [
13+
'@typescript-eslint'
14+
],
15+
parser: 'vue-eslint-parser',
16+
parserOptions: {
17+
parser: '@typescript-eslint/parser',
18+
sourceType: 'module'
19+
},
20+
rules: {
21+
'no-unused-vars': 'off', // HACK: due to override with @typescript-eslint/no-unused-vars
22+
'@typescript-eslint/no-unused-vars': [2, { 'vars': 'all', 'args': 'none' }]
23+
}
24+
}

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
coverage
2+
node_modules
3+
.DS_Store
4+
*.log
5+
*.swp
6+
*~

.mergify.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pull_request_rules:
2+
- name: merge pull requests from dependabot if CI passes
3+
conditions:
4+
- author=dependabot[bot]
5+
- status-success=ci/circleci
6+
actions:
7+
merge:
8+
method: merge

.npmignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.*
2+
*.log
3+
*.swp
4+
*.yml
5+
coverage
6+
__snapshots__
7+
test

LICENSE

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2019 kazuya kawaguchi
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# vue-i18n-locale-message
2+
3+
i18n locale messages management tool for vue-i18n
4+
5+
:construction_worker: WIP
6+
7+
## :white_check_mark: TODO
8+
- [ ] API design
9+
- [ ] extract locale messages from SFC
10+
- [ ] infuse to SFC from locale mesasges
11+
- [ ] CLI tool
12+
- [ ] integrate vue-cli-plugin-i18n
13+
- [ ] documentation
14+
15+
## :copyright: License
16+
17+
[MIT](http://opensource.org/licenses/MIT)

jest.config.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
'use strict'
2+
3+
module.exports = {
4+
preset: 'ts-jest',
5+
testEnvironment: 'node',
6+
coveragePathIgnorePatterns: [
7+
'node_modules',
8+
'<rootDir>/test/*.*'
9+
],
10+
globals: {
11+
'ts-jest': {
12+
diagnostics: false
13+
}
14+
}
15+
}

lib/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
exports.default = {};

lib/src/index.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
function add(a, b) {
4+
return a + b;
5+
}
6+
exports.default = add;

lib/test/index.test.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"use strict";
2+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3+
return new (P || (P = Promise))(function (resolve, reject) {
4+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6+
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
7+
step((generator = generator.apply(thisArg, _arguments || [])).next());
8+
});
9+
};
10+
var __importDefault = (this && this.__importDefault) || function (mod) {
11+
return (mod && mod.__esModule) ? mod : { "default": mod };
12+
};
13+
Object.defineProperty(exports, "__esModule", { value: true });
14+
const index_1 = __importDefault(require("../src/index"));
15+
test('add', () => __awaiter(this, void 0, void 0, function* () {
16+
expect(index_1.default(1, 1)).toBe(2);
17+
}));

package.json

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"name": "vue-i18n-locale-message",
3+
"description": "i18n locale messages management tool for vue-i18n",
4+
"version": "0.0.1",
5+
"author": {
6+
"name": "kazuya kawaguchi",
7+
"email": "[email protected]"
8+
},
9+
"bugs": {
10+
"url": "https://github.com/kazupon/vue-i18n-locale-message/issues"
11+
},
12+
"files": [
13+
"lib",
14+
"src"
15+
],
16+
"dependencies": {
17+
"@vue/component-compiler-utils": "^3.0.0",
18+
"debug": "^4.1.1",
19+
"vue-template-compiler": "^2.6.10"
20+
},
21+
"devDependencies": {
22+
"@types/debug": "^4.1.4",
23+
"@types/jest": "^24.0.15",
24+
"@types/node": "^12.6.8",
25+
"@typescript-eslint/eslint-plugin": "^1.13.0",
26+
"@typescript-eslint/parser": "^1.13.0",
27+
"@typescript-eslint/typescript-estree": "^1.13.0",
28+
"conventional-changelog-cli": "^2.0.21",
29+
"conventional-github-releaser": "^3.1.3",
30+
"eslint": "^6.1.0",
31+
"eslint-plugin-vue-libs": "^4.0.0",
32+
"git-commit-message-convention": "git://github.com/kazupon/git-commit-message-convention.git",
33+
"jest": "^24.8.0",
34+
"opener": "^1.5.1",
35+
"ts-jest": "^24.0.2",
36+
"typescript": "^3.5.3",
37+
"typescript-eslint-language-service": "^1.1.2"
38+
},
39+
"engines": {
40+
"node": ">= 8"
41+
},
42+
"homepage": "https://github.com/kazupon/vue-i18n-locale-message#readme",
43+
"keywords": [
44+
"i18n",
45+
"messages",
46+
"vue",
47+
"vue-i18n"
48+
],
49+
"license": "MIT",
50+
"main": "lib/index.js",
51+
"peerDependencies": {
52+
"vue-template-compiler": "*"
53+
},
54+
"private": true,
55+
"repository": {
56+
"type": "git",
57+
"url": "git+https://github.com/kazupon/vue-i18n-locale-message.git"
58+
},
59+
"scripts": {
60+
"build": "tsc -p .",
61+
"test:cover": "npm run test:unit -- --coverage",
62+
"test:unit": "jest --env node",
63+
"watch": "tsc -p . --watch",
64+
"lint": "eslint ./src ./test --ext .ts",
65+
"release": "conventional-github-releaser -n ./node_modules/git-commit-message-convention/convention.js",
66+
"test": "npm run lint && npm run test:cover",
67+
"changelog": "conventional-changelog -i CHANGELOG.md -s -n ./node_modules/git-commit-message-convention/convention.js",
68+
"clean": "rm -rf ./coverage && rm -rf ./lib/*.js*",
69+
"coverage": "opener coverage/lcov-report/index.html"
70+
}
71+
}

src/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function add (a: number, b: number) {
2+
return a + b
3+
}

test/index.test.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import add from '../src/index'
2+
3+
test('add', async () => {
4+
expect(add(1, 1)).toBe(2)
5+
})

tsconfig.json

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"compilerOptions": {
3+
/* Basic Options */
4+
// "incremental": true, /* Enable incremental compilation */
5+
"target": "es2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
6+
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
7+
// "lib": [], /* Specify library files to be included in the compilation. */
8+
// "allowJs": true, /* Allow javascript files to be compiled. */
9+
// "checkJs": true, /* Report errors in .js files. */
10+
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
11+
// "declaration": true, /* Generates corresponding '.d.ts' file. */
12+
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
13+
// "sourceMap": true, /* Generates corresponding '.map' file. */
14+
// "outFile": "./", /* Concatenate and emit output to single file. */
15+
"outDir": "./lib", /* Redirect output structure to the directory. */
16+
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
17+
// "composite": true, /* Enable project compilation */
18+
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
19+
// "removeComments": true, /* Do not emit comments to output. */
20+
// "noEmit": true, /* Do not emit outputs. */
21+
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
22+
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
23+
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
24+
25+
/* Strict Type-Checking Options */
26+
"strict": true, /* Enable all strict type-checking options. */
27+
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
28+
// "strictNullChecks": true, /* Enable strict null checks. */
29+
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
30+
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
31+
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
32+
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
33+
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
34+
35+
/* Additional Checks */
36+
// "noUnusedLocals": true, /* Report errors on unused locals. */
37+
// "noUnusedParameters": true, /* Report errors on unused parameters. */
38+
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
39+
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
40+
41+
/* Module Resolution Options */
42+
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
43+
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
44+
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
45+
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
46+
/* List of folders to include type definitions from. */
47+
// "typeRoots": [
48+
// "node_modules/@types",
49+
// "node_modules/@vue/component-compiler-utils/dist"
50+
// ],
51+
// "types": [], /* Type declaration files to be included in compilation. */
52+
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
53+
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
54+
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
55+
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
56+
57+
/* Source Map Options */
58+
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
59+
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
60+
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
61+
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
62+
63+
/* Experimental Options */
64+
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
65+
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
66+
},
67+
"plugins": [
68+
{
69+
"name": "typescript-eslint-language-service"
70+
}
71+
]
72+
}

0 commit comments

Comments
 (0)