Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
NiGhTTraX committed May 25, 2019
0 parents commit 85ba73a
Show file tree
Hide file tree
Showing 15 changed files with 157 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
dist
results
.nyc_output
*.tsbuildinfo
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2019 Andrei Picus

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Empty file added README.md
Empty file.
6 changes: 6 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"packages": [
"packages/*"
],
"version": "independent"
}
14 changes: 14 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "lerna-ts",
"private": true,
"scripts": {
"bootstrap": "lerna bootstrap --hoist",
"clean": "lerna run clean",
"build": "lerna run build",
"pub": "lerna publish"
},
"devDependencies": {
"lerna": "~3.14.0",
"typescript": "~3.4.5"
}
}
20 changes: 20 additions & 0 deletions packages/bar/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "@nighttrax/bar",
"version": "1.0.0",
"main": "dist/index",
"types": "dist/index",
"files": [
"dist"
],
"scripts": {
"build": "npm run clean && npm run compile",
"clean": "rm -rf ./dist && rm -rf tsconfig.build.tsbuildinfo",
"compile": "tsc -b tsconfig.build.json"
},
"dependencies": {
"@nighttrax/foo": "^1.0.0"
},
"devDependencies": {
"typescript": "~3.4.5"
}
}
3 changes: 3 additions & 0 deletions packages/bar/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import meaningOfLife from '@nighttrax/foo';

console.log(meaningOfLife);
18 changes: 18 additions & 0 deletions packages/bar/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": "../../tsconfig.json",

"compilerOptions": {
"composite": true,
"declaration": true,
"outDir": "./dist",
"rootDir": "./src"
},

"references": [{
"path": "../foo/tsconfig.build.json"
}],

"include": [
"src/**/*"
]
}
7 changes: 7 additions & 0 deletions packages/bar/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../../tsconfig.json",

"include": [
"src/**/*"
]
}
17 changes: 17 additions & 0 deletions packages/foo/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "@nighttrax/foo",
"version": "1.0.0",
"main": "dist/index",
"types": "dist/index",
"files": [
"dist"
],
"scripts": {
"build": "npm run clean && npm run compile",
"clean": "rm -rf ./dist && rm -rf tsconfig.build.tsbuildinfo",
"compile": "tsc -b tsconfig.build.json"
},
"devDependencies": {
"typescript": "~3.4.5"
}
}
3 changes: 3 additions & 0 deletions packages/foo/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const meaningOfLife = 42;

export default meaningOfLife;
14 changes: 14 additions & 0 deletions packages/foo/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "../../tsconfig.json",

"compilerOptions": {
"composite": true,
"declaration": true,
"outDir": "./dist",
"rootDir": "./src"
},

"include": [
"src/**/*"
]
}
7 changes: 7 additions & 0 deletions packages/foo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../../tsconfig.json",

"include": [
"src/**/*"
]
}
12 changes: 12 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"sourceMap": true
},

"exclude": [
"node_modules",
"dist"
]
}
10 changes: 10 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.build.json",

"compilerOptions": {
"baseUrl": ".",
"paths": {
"@nighttrax/*": ["packages/*/src"]
}
}
}

0 comments on commit 85ba73a

Please sign in to comment.