Skip to content

Commit 3875beb

Browse files
committed
Merge remote-tracking branch 'origin/master' into dev
2 parents a9ef19d + 17b4f39 commit 3875beb

File tree

7 files changed

+32
-59
lines changed

7 files changed

+32
-59
lines changed

.github/main.workflow

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

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 1.0.0 (2019-06-14)
2+
3+
4+
### Features
5+
6+
* First release

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,18 @@ it('hello world test', () => {
1919
});
2020
```
2121

22-
### After
22+
### After (`it` removed)
2323
```js
2424
function hello(greet) {
2525
if (greet === void 0) { greet = 'world'; }
2626
return "hello " + greet;
2727
}
2828
````
2929

30+
### Pros and Cons
31+
\+ All in one file
32+
\- Collecting coverage can be tricky
33+
3034
## Installation
3135
```sh
3236
npm install --save-dev typescript-transform-unspec

Taskfile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
#!/bin/bash
22
PATH="$PWD/node_modules/.bin":$PATH
33

4-
prebuild() {
5-
rm -rf dist
6-
cp -rf src dist && /usr/bin/find dist -name '*.spec.ts' | xargs rm -f
7-
cat tsconfig.json | jq 'del(.include, .compilerOptions.outDir)' > dist/tsconfig.json
8-
cp README.md LICENSE package.json dist
9-
}
10-
114
build() {
5+
set -x
6+
rm -rfv dist
7+
cp -rfv src dist && /usr/bin/find dist -name '*.spec.ts' | xargs rm -rvf
8+
cat tsconfig.json | jq 'del(.include, .compilerOptions.outDir)' | jq -r '.compilerOptions.plugins[0].transform = "./index.ts"' > dist/tsconfig.json
9+
cp -v README.md LICENSE package.json dist
1210
cd dist
13-
tsc -p .
14-
rm tsconfig.json
11+
rm -rvf example.ts
12+
ttsc -p .
13+
rm -rvf tsconfig.json
1514
cd ..
15+
set +x
1616
}
1717

1818
"$@"

jest.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ module.exports = {
1414
'!src/**/*.spec.ts',
1515
],
1616
testMatch: [
17-
'<rootDir>/src/**/*.spec.ts'
17+
'<rootDir>/src/**/*.spec.ts',
18+
'<rootDir>/src/example.ts',
1819
],
1920
moduleFileExtensions: [
2021
'ts',

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"node": ">=8"
1212
},
1313
"repository": {
14-
"type": "git"
14+
"type": "git",
15+
"url": "https://github.com/unlight/typescript-transform-unspec.git"
1516
},
1617
"scripts": {
1718
"test": "npm run eslint && npm run tscheck && npm run test:cov && npm run typecov",
@@ -39,8 +40,9 @@
3940
"setupwebpack": "npm i -D webpack webpack-cli webpack-dev-server html-webpack-plugin source-map-loader ts-loader html-loader swc-loader @swc/core",
4041
"commit": "git-cz"
4142
},
43+
"dependencies": {},
4244
"peerDependencies": {
43-
"typescript": ">=3.2"
45+
"typescript": ">=2.9"
4446
},
4547
"devDependencies": {
4648
"@semantic-release/changelog": "^3.0.2",
@@ -76,6 +78,7 @@
7678
"tslint-clean-code": "^0.2.9",
7779
"tslint-microsoft-contrib": "^6.2.0",
7880
"tslint-sonarts": "^1.9.0",
81+
"ttypescript": "^1.5.7",
7982
"type-coverage": "^2.0.2",
8083
"typescript": "~3.4.5",
8184
"watchexec-bin": "^1.0.0",

tsconfig.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
"skipLibCheck": true,
1818
"lib": [
1919
"esnext"
20+
],
21+
"plugins": [
22+
{
23+
"transform": "./src/index.ts"
24+
}
2025
]
2126
},
2227
"include": [

0 commit comments

Comments
 (0)