Skip to content

Commit 8b90412

Browse files
committed
init projet structure
1 parent d474cc7 commit 8b90412

File tree

10 files changed

+74
-106
lines changed

10 files changed

+74
-106
lines changed

Diff for: .eslintrc.js

-99
This file was deleted.

Diff for: .gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ yarn-debug.log*
99
yarn-error.log*
1010

1111
node_modules
12-
coverage
12+
coverage
13+
dist

Diff for: lerna.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"packages": [
3+
"packages/*"
4+
],
5+
"version": 1.0.0",
6+
"npmClient": "npm"
7+
}

Diff for: package.json

+9-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"description": "The internationalizational (i18n) library for wechat miniprogram",
55
"main": "index.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"postinstall": "lerna bootstrap",
9+
"lint": "tslint -c tslint.json 'packages/**/*.ts'"
810
},
911
"repository": {
1012
"type": "git",
@@ -17,10 +19,11 @@
1719
},
1820
"homepage": "https://github.com/ele828/miniprogram-i18n#readme",
1921
"devDependencies": {
20-
"eslint": "^5.3.0",
21-
"eslint-config-airbnb-base": "13.1.0",
22-
"eslint-plugin-import": "^2.14.0",
23-
"eslint-plugin-node": "^7.0.1",
24-
"eslint-plugin-promise": "^3.8.0"
22+
"jest": "^23.6.0",
23+
"lerna": "^3.6.0",
24+
"rollup": "^0.68.0",
25+
"rollup-plugin-typescript": "^1.0.0",
26+
"tslib": "^1.9.3",
27+
"typescript": "^3.2.2"
2528
}
2629
}

Diff for: packages/cli/package.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "cli",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"author": "",
10+
"license": "ISC"
11+
}

Diff for: packages/i18n/package.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "i18n",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"build": "rollup -c rollup.config.js"
8+
},
9+
"author": "",
10+
"license": "ISC"
11+
}

Diff for: packages/i18n/rollup.config.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import typescript from 'rollup-plugin-typescript';
2+
3+
module.exports = {
4+
input: 'src/index.ts',
5+
output: {
6+
file: 'dist/bundle.js',
7+
format: 'cjs'
8+
},
9+
plugins: [
10+
typescript()
11+
]
12+
}

Diff for: packages/i18n/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('test i18n/index')

Diff for: scripts/rollup.config.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import typescript from 'rollup-plugin-typescript';
2+
3+
module.exports = {
4+
input: 'packages/i18n/src/index.js',
5+
output: {
6+
file: 'bundle.js',
7+
format: 'cjs'
8+
},
9+
plugins: [
10+
typescript()
11+
]
12+
}

Diff for: tslint.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"defaultSeverity": "error",
3+
"extends": [
4+
"tslint:recommended"
5+
],
6+
"jsRules": {},
7+
"rules": {},
8+
"rulesDirectory": []
9+
}

0 commit comments

Comments
 (0)