Skip to content

Commit

Permalink
chore: use @anilanar/mklib for dev deps/scripts
Browse files Browse the repository at this point in the history
affects: @userlike/messenger-internal, @userlike/messenger-types, @userlike/messenger
  • Loading branch information
anilanar committed Aug 6, 2020
1 parent a1d2162 commit c2dfced
Show file tree
Hide file tree
Showing 20 changed files with 3,215 additions and 881 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
indent_style = space
indent_size = 4

[*.json]
indent_size = 2
15 changes: 15 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
],
rules: {
"@typescript-eslint/no-use-before-define": ["error", { functions: false }],
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/explicit-function-return-type": "off",
},
};
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ node_modules
dist
tsconfig.tsbuildinfo
yarn-error.log
--force
lerna-debug.log
2 changes: 1 addition & 1 deletion config/tsconfig.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"composite": false,
"declaration": false
}
}
}
4 changes: 2 additions & 2 deletions config/tsconfig.es.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "ES2018",
"target": "ES5",
"module": "ES2015",
"composite": true,
"lib": ["ESNext", "dom"],
Expand All @@ -13,4 +13,4 @@
"declaration": true,
"types": []
}
}
}
7 changes: 1 addition & 6 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
{
"version": "0.0.1-alpha.15",
"npmClient": "yarn",
"useWorkspaces": true,
"command": {
"publish": {
"conventionalCommits": true
}
}
"useWorkspaces": true
}
45 changes: 19 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,26 @@
{
"name": "umm-api",
"name": "messenger",
"homepage": "https://github.com/userlike/messenger",
"repository": {
"type": "git",
"url": "https://github.com/userlike/messenger.git"
},
"private": true,
"workspaces": ["packages/*"],
"workspaces": [
"packages/*"
],
"scripts": {
"commit": "git-cz",
"lerna:version": "lerna version --conventional-commits",
"lerna:version:pre": "yarn lerna:version --conventional-prerelease",
"lerna:version:grad": "yarn lerna:version --conventional-graduate",
"lerna:publish": "lerna publish from-package",
"prepare": "lerna run clean && lerna run build && lerna run build:cjs"
"build": "mklib build",
"lint": "mklib lint",
"test": "mklib test",
"commit": "mklib commit",
"v": "mklib version",
"v:pre": "mklib version:pre",
"v:grad": "mklib version:grad",
"pub": "mklib publish",
"prepare": "mklib prepare"
},
"devDependencies": {
"@babel/cli": "7.10.5",
"@babel/core": "7.10.5",
"@babel/preset-env": "7.10.4",
"@babel/preset-typescript": "7.10.4",
"@typescript-eslint/eslint-plugin": "2.20.0",
"@typescript-eslint/parser": "2.20.0",
"commitizen": "4.1.2",
"cz-lerna-changelog": "2.0.3",
"eslint": "6.8.0",
"jest": "25.1.0",
"lerna": "3.22.1",
"prettier": "1.19.1",
"typescript": "3.9.7"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-lerna-changelog"
}
"@anilanar/mklib": "^1.0.9"
}
}
2 changes: 1 addition & 1 deletion packages/messenger-internal/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
For internal use only.
See the [homepage]().
20 changes: 14 additions & 6 deletions packages/messenger-internal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,28 @@
"module": "dist/es/index.js",
"types": "dist/es/index.d.ts",
"sideEffects": false,
"scripts": {
"build": "tsc",
"build:cjs": "tsc -b tsconfig.cjs.json",
"clean": "rm -rf dist"
"homepage": "https://github.com/userlike/messenger",
"repository": {
"type": "git",
"url": "https://github.com/userlike/messenger.git",
"directory": "packages/messenger-internal"
},
"license": "MIT",
"files": [
"dist/es",
"dist/cjs"
],
"dependencies": {
"@userlike/messenger-types": "^0.0.1-alpha.13"
"scripts": {
"build": "tsc",
"build:cjs": "tsc -b tsconfig.cjs.json",
"clean": "rm -rf dist",
"lint": "eslint src --ext .ts",
"test": "jest"
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@userlike/messenger-types": "^0.0.1-alpha.13"
}
}
6 changes: 3 additions & 3 deletions packages/messenger-internal/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"references": [
{
"path": "../messenger-internal"
"path": "../messenger-types"
}
],
"extends": "../../config/tsconfig.cjs.json",
"include": ["src/**/*"],
"include": ["src/**/*.ts"],
"compilerOptions": {
"outDir": "dist/cjs",
"rootDir": "src"
}
}
}
2 changes: 1 addition & 1 deletion packages/messenger-internal/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}
],
"extends": "../../config/tsconfig.es.json",
"include": ["src/**/*"],
"include": ["src/**/*.ts"],
"compilerOptions": {
"outDir": "dist/es",
"rootDir": "src"
Expand Down
2 changes: 1 addition & 1 deletion packages/messenger-types/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
See `@userlike/messenger` for further details.
See the [homepage]().
16 changes: 12 additions & 4 deletions packages/messenger-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,24 @@
"module": "dist/es/index.js",
"types": "dist/es/index.d.ts",
"sideEffects": false,
"scripts": {
"build": "tsc",
"build:cjs": "tsc -b tsconfig.cjs.json",
"clean": "rm -rf dist"
"homepage": "https://github.com/userlike/messenger",
"repository": {
"type": "git",
"url": "https://github.com/userlike/messenger.git",
"directory": "packages/messenger-types"
},
"license": "MIT",
"files": [
"dist/es",
"dist/cjs"
],
"scripts": {
"build": "tsc",
"build:cjs": "tsc -b tsconfig.cjs.json",
"clean": "rm -rf dist",
"lint": "eslint src --ext .ts",
"test": "jest"
},
"publishConfig": {
"access": "public"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/messenger-types/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "../../config/tsconfig.cjs.json",
"include": ["src/**/*"],
"include": ["src/**/*.ts"],
"compilerOptions": {
"outDir": "dist/cjs",
"rootDir": "src"
}
}
}
2 changes: 1 addition & 1 deletion packages/messenger-types/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "../../config/tsconfig.es.json",
"include": ["src/**/*"],
"include": ["src/**/*.ts"],
"compilerOptions": {
"outDir": "dist/es",
"rootDir": "src"
Expand Down
2 changes: 1 addition & 1 deletion packages/messenger/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Work in progress.
See the [homepage]().
22 changes: 15 additions & 7 deletions packages/messenger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,29 @@
"module": "dist/es/index.js",
"types": "dist/es/index.d.ts",
"sideEffects": false,
"scripts": {
"build": "tsc",
"build:cjs": "tsc -b tsconfig.cjs.json",
"clean": "rm -rf dist"
"homepage": "https://github.com/userlike/messenger",
"repository": {
"type": "git",
"url": "https://github.com/userlike/messenger.git",
"directory": "packages/messenger"
},
"license": "MIT",
"files": [
"dist/es",
"dist/cjs"
],
"dependencies": {
"@userlike/messenger-internal": "^0.0.1-alpha.15",
"@userlike/messenger-types": "^0.0.1-alpha.13"
"scripts": {
"build": "tsc",
"build:cjs": "tsc -b tsconfig.cjs.json",
"clean": "rm -rf dist",
"lint": "eslint src --ext .ts",
"test": "jest"
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@userlike/messenger-internal": "^0.0.1-alpha.15",
"@userlike/messenger-types": "^0.0.1-alpha.13"
}
}
4 changes: 2 additions & 2 deletions packages/messenger/tsconfig.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
}
],
"extends": "../../config/tsconfig.cjs.json",
"include": ["src/**/*"],
"include": ["src/**/*.ts"],
"compilerOptions": {
"outDir": "dist/cjs",
"rootDir": "src"
}
}
}
2 changes: 1 addition & 1 deletion packages/messenger/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
],
"extends": "../../config/tsconfig.es.json",
"include": ["src/**/*"],
"include": ["src/**/*.ts"],
"compilerOptions": {
"outDir": "dist/es",
"rootDir": "src"
Expand Down
Loading

0 comments on commit c2dfced

Please sign in to comment.