-
Notifications
You must be signed in to change notification settings - Fork 24
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
AbigailDeng
authored and
AbigailDeng
committed
Oct 21, 2024
1 parent
b086c81
commit 24ea35f
Showing
26 changed files
with
179 additions
and
181 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
HUSKY_GIT_PARAMS=$1 node scripts/verify-commit-msg.js | ||
HUSKY_GIT_PARAMS=$1 node scripts/verify-commit-msg.cjs |
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,10 +1,5 @@ | ||
/** | ||
* @file utils | ||
* @author atom-yang | ||
* @date 2019-06-28 | ||
*/ | ||
const path = require('path'); | ||
import path from 'path'; | ||
|
||
module.exports.ROOT = path.resolve(__dirname, '..'); | ||
export const ROOT = path.resolve(process.cwd(), '.'); | ||
|
||
module.exports.OUTPUT_PATH = path.resolve(__dirname, '..', 'dist/'); | ||
export const OUTPUT_PATH = path.resolve(process.cwd(), '.', 'dist/'); |
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
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,30 @@ | ||
/** | ||
* @file node config | ||
* @author atom-yang | ||
*/ | ||
|
||
/* eslint-env node */ | ||
import { merge } from 'webpack-merge'; | ||
import baseConfig from './webpack.common.js'; | ||
import { OUTPUT_PATH } from './utils.js'; | ||
|
||
const nodeConfig = { | ||
mode: 'production', | ||
output: { | ||
path: OUTPUT_PATH, | ||
filename: 'aelf.esm.js', | ||
libraryTarget: 'module' | ||
}, | ||
experiments: { | ||
outputModule: true | ||
}, | ||
resolve: { | ||
alias: {}, | ||
fallback: { | ||
crypto: 'crypto-browserify', | ||
stream: 'stream-browserify' | ||
} | ||
} | ||
}; | ||
|
||
export default merge(baseConfig, nodeConfig); |
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,18 @@ | ||
const chalk = require('chalk'); | ||
const msgPath = process.env.HUSKY_GIT_PARAMS; | ||
const msg = require('fs').readFileSync(msgPath, 'utf-8').trim(); | ||
|
||
const commitRE = | ||
/^(revert: )?(feat|security|fix|polish|docs|style|refactor|perf|test|workflow|ci|chore|types|build)(\(.+\))?: .{1,50}/; | ||
|
||
if (!commitRE.test(msg)) { | ||
console.error( | ||
` ${chalk.bgRed.white(' ERROR ')} ${chalk.red(`invalid commit message format.`)}\n\n` + | ||
chalk.red(` Proper commit message format is required for automated changelog generation. Examples:\n\n`) + | ||
` ${chalk.green(`feat(wallet): add getContractAddress`)}\n` + | ||
` ${chalk.green(`fix(contract): handle contract conflict (close #28)`)}\n\n` + | ||
chalk.red(` See .github/COMMIT_CONVENTION.md for more details.\n`) + | ||
chalk.red(` You can also use ${chalk.cyan(`npm run commit`)} to interactively generate a commit message.\n`) | ||
); | ||
process.exit(1); | ||
} |
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
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
Oops, something went wrong.