1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/yorkie/bin/install.js

25 lines
647 B
JavaScript
Raw Permalink Normal View History

2023-12-18 13:12:25 +08:00
'use strict'
// Run when package is installed
const path = require('path')
const isCI = require('is-ci')
const installFrom = require('../src/install')
if (isCI && !process.env.HUSKY_IGNORE_CI && !process.env.YORKIE_IGNORE_CI) {
console.log('CI detected, skipping Git hooks installation')
process.exit(0)
}
if (process.env.HUSKY_SKIP_INSTALL || process.env.YORKIE_SKIP_INSTALL) {
console.log(
`env variable HUSKY_SKIP_INSTALL is set to ${process.env
.HUSKY_SKIP_INSTALL}, skipping Git hooks installation`
)
process.exit(0)
}
console.log('setting up Git hooks')
const depDir = path.join(__dirname, '..')
installFrom(depDir)