提交 41b978bd 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

remove useless files

上级 21ff9ca2
#!/usr/bin/env ts-node
/**
* Author: Huan LI <zixia@zixia.net>
* 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)
#!/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.')
#!/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
{
"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
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册