diff --git a/scripts/development-release.ts b/scripts/development-release.ts deleted file mode 100755 index 5689b2aab68216d193ff7042400919fa3bf0e739..0000000000000000000000000000000000000000 --- a/scripts/development-release.ts +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env ts-node -/** - * Author: Huan LI - * https://github.com/zixia - * License: Apache-2.0 - */ -import readPkgUp from 'read-pkg-up' -import { minor } from 'semver' - -const pkg = readPkgUp.sync({ cwd: __dirname })!.package -export const VERSION = pkg.version - -if (minor(VERSION) % 2 === 0) { // production release - console.log(`${VERSION} is production release`) - process.exit(1) // exit 1 for not development -} - -// development release -console.log(`${VERSION} is development release`) -process.exit(0) diff --git a/scripts/package-publish-config-tag-next.ts b/scripts/package-publish-config-tag-next.ts deleted file mode 100755 index 5bf83f7171589d207568ae248b38b734dea00f04..0000000000000000000000000000000000000000 --- a/scripts/package-publish-config-tag-next.ts +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env ts-node -import * as fs from 'fs' -import * as path from 'path' -import readPkgUp from 'read-pkg-up' - -const PACKAGE_JSON = path.join(__dirname, '../package.json') - -const pkg = readPkgUp.sync({ cwd: __dirname })!.package - -// pkg.publishConfig.tag = 'next' -pkg.publishConfig = { - access: 'public', - ...pkg.publishConfig, - tag: 'next', -} - -fs.writeFileSync(PACKAGE_JSON, JSON.stringify(pkg, null, 2)) -// console.log(JSON.stringify(pkg, null, 2)) - -console.log('set package.json:publicConfig.tag to next.') diff --git a/scripts/pre-push.sh b/scripts/pre-push.sh deleted file mode 100755 index 3ba4505f832388da7e2f3ecf137508240dd4926c..0000000000000000000000000000000000000000 --- a/scripts/pre-push.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -# -# An example hook script to verify what is about to be committed. -# Called by "git commit" with no arguments. The hook should -# exit with non-zero status after issuing an appropriate message if -# it wants to stop the commit. -# -# To enable this hook, rename this file to "pre-commit". -set -e - -[ -n "$NO_HOOK" ] && exit 0 - -[ -n "$HUAN_INNER_PRE_HOOK" ] && { - # http://stackoverflow.com/a/21334985/1123955 - exit 0 -} - -npm run lint - -[ -z "$CYGWIN" ] && { - # git rebase - rm -f package-lock.json - npm version patch --no-package-lock - HUAN_INNER_PRE_HOOK=1 git push - - cat <<'_STR_' - ____ _ _ ____ _ - / ___(_) |_ | _ \ _ _ ___| |__ -| | _| | __| | |_) | | | / __| '_ \ -| |_| | | |_ | __/| |_| \__ \ | | | - \____|_|\__| |_| \__,_|___/_| |_| - - ____ _ _ -/ ___| _ _ ___ ___ ___ ___ __| | | -\___ \| | | |/ __/ __/ _ \/ _ \/ _` | | - ___) | |_| | (_| (_| __/ __/ (_| |_| -|____/ \__,_|\___\___\___|\___|\__,_(_) - -_STR_ - - echo - echo - echo - echo " ### Npm verion bumped and pushed by inner push inside hook pre-push ###" - echo " ------- vvvvvvv outer push will be canceled, never mind vvvvvvv -------" - echo - echo - echo - exit 127 -} - -# must run this after the above `test` ([ -z ...]), -# or will whow a error: error: failed to push some refs to 'git@github.com:Chatie/wechaty.git' -echo "PRE-PUSH HOOK PASSED" -echo - diff --git a/tslint.json b/tslint.json deleted file mode 100644 index fc87828cfbc220a00054d6572d86eb7453aeba15..0000000000000000000000000000000000000000 --- a/tslint.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "rulesDirectory": [ - "node_modules/@wwwouter/tslint-contrib" - ], - "extends": ["tslint:recommended", "tslint-config-standard"], - "rules": { - "interface-name": [true, "never-prefix"], - "trailing-comma": true, - "import-spacing": false, - "no-multi-spaces": false, - "no-console": false, - "space-within-parens": false, - "arrow-parens": false, - "max-line-length": false, - "unified-signatures": false, - "ter-indent": false, - "member-ordering": false, - "no-promise-as-boolean": true, - "typedef-whitespace": false - } -}