Skip to content

Commit fa8ad32

Browse files
committed
feat: init package-demo
1 parent bfc9144 commit fa8ad32

File tree

10 files changed

+59
-5
lines changed

10 files changed

+59
-5
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# templates-monorepo-libs
22
template for monorepo which used to build tool/library.
3+
4+
## NOTE!!!
5+
Your need to replace `templates-monorepo-libs` literal to your actual project name.

lerna.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"useWorkspaces": true,
55
"npmClient": "yarn",
66
"changelog": {
7-
// TODO: replate
87
"repo": "mjolnirjs/template-monorepo-libs",
98
"cacheDir": ".changelog"
109
}

package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
"repository": "https://github.com/mjolnirjs/template-monorepo-libs.git",
1111
"author": "Leo Hui <[email protected]>",
1212
"license": "MIT",
13+
"scripts": {
14+
"start": "jest --watch",
15+
"clean": "lerna run clean --parallel",
16+
"changelog": "lerna-changelog",
17+
"build": "lerna run build",
18+
"lint": "lerna run lint --parallel",
19+
"test": "jest",
20+
"release": "npm run test && npm run build && lerna publish"
21+
},
1322
"devDependencies": {
1423
"@mjolnir/eslint-config": "^0.1.1",
1524
"@mjolnir/tsconfig": "^0.0.2",

packages/package-demo/.eslintrc.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
module.exports = {
2-
extends: ['@mjolnir/eslint-config/typescript', 'plugin:prettier/recommended'],
2+
extends: [
3+
'@mjolnir/eslint-config/typescript',
4+
'plugin:prettier/recommended',
5+
'prettier/@typescript-eslint'
6+
],
37
rules: {}
48
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
extends: [
3+
'@mjolnir/eslint-config/typescript',
4+
'@mjolnir/eslint-config/jest',
5+
'plugin:prettier/recommended',
6+
'prettier/@typescript-eslint'
7+
],
8+
rules: {
9+
'@typescript-eslint/explicit-function-return-type': 'off'
10+
}
11+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
describe('Confirm component', () => {
2+
test('adds 1 + 2 to equal 3', () => {
3+
expect(3).toBe(3);
4+
});
5+
});
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
describe('Confirm component', () => {
2+
test('adds 1 + 2 to equal 3', () => {
3+
expect(3).toBe(3);
4+
});
5+
});

packages/package-demo/package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "package-demo",
3+
"version": "0.0.0",
4+
"main": "dist/index.js",
5+
"scripts": {
6+
"clean": "rimraf dist",
7+
"build:lib": "tsc -p ./tsconfig.json",
8+
"build": "npm run clean && npm run build:lib",
9+
"lint": "eslint --ext .ts src/ __tests__/"
10+
},
11+
"license": "MIT"
12+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "../../tsconfig.json",
3+
"compilerOptions": {
4+
"module": "commonjs",
5+
"outDir": "dist/lib",
6+
"declaration": false,
7+
"sourceMap": false
8+
}
9+
}

packages/tsconfig.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)