Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
104 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
SRC_VERSION_TS_FILE='src/version.ts' | ||
|
||
[ -f ${SRC_VERSION_TS_FILE} ] || { | ||
echo ${SRC_VERSION_TS_FILE}" not found" | ||
exit 1 | ||
} | ||
|
||
VERSION=$(npx pkg-jq -r .version) | ||
|
||
cat <<_SRC_ > ${SRC_VERSION_TS_FILE} | ||
/** | ||
* This file was auto generated from scripts/generate-version.sh | ||
*/ | ||
export const VERSION: string = '${VERSION}' | ||
_SRC_ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
VERSION=$(npx pkg-jq -r .version) | ||
|
||
if npx --package @chatie/semver semver-is-prod $VERSION; then | ||
npx pkg-jq -i '.publishConfig.tag="latest"' | ||
echo "production release: publicConfig.tag set to latest." | ||
else | ||
npx pkg-jq -i '.publishConfig.tag="next"' | ||
echo 'development release: publicConfig.tag set to next.' | ||
fi | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env ts-node | ||
|
||
// tslint:disable:no-shadowed-variable | ||
import test from 'blue-tape' | ||
|
||
import { VERSION } from './version' | ||
|
||
test('Make sure the VERSION is fresh in source code', async (t) => { | ||
t.equal(VERSION, '0.0.0', 'version should be 0.0.0 in source code, only updated before publish to NPM') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* This file will be overwrite when we publish NPM module | ||
* by scripts/generate_version.ts | ||
*/ | ||
|
||
export const VERSION = '0.0.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,24 @@ | ||
{ | ||
"extends": "@chatie/tsconfig", | ||
"compilerOptions": { | ||
"target": "es6" | ||
, "module": "commonjs" | ||
, "outDir": "dist" | ||
, "declaration": true | ||
, "sourceMap": true | ||
, "strict": true | ||
, "traceResolution": false | ||
, "esModuleInterop" : true | ||
, "resolveJsonModule": true | ||
, "lib": [ | ||
"dom" | ||
, "esnext" | ||
] | ||
} | ||
, "exclude": [ | ||
"node_modules/" | ||
, "dist/" | ||
] | ||
, "include": [ | ||
"bin/*.ts" | ||
, "scripts/**/*.ts" | ||
, "examples/**/*.ts" | ||
, "src/**/*.ts" | ||
, "tests/**/*.spec.ts" | ||
] | ||
"outDir": "dist", | ||
"lib": [ | ||
"dom", | ||
"esnext", | ||
], | ||
}, | ||
"exclude": [ | ||
"node_modules/", | ||
"dist/", | ||
"tests/fixtures/", | ||
], | ||
"include": [ | ||
"app/**/*.ts", | ||
"bin/*.ts", | ||
"bot/**/*.ts", | ||
"examples/**/*.ts", | ||
"scripts/**/*.ts", | ||
"src/**/*.ts", | ||
"tests/**/*.spec.ts", | ||
], | ||
} |