README
@trigen/scripts
Scripts and configs for TrigenSoftware's projects.
Usage
- Install
scripts
package
yarn add -D @trigen/scripts
- Install any plugin package
yarn add -D @trigen/scripts-plugin-jest @trigen/scripts-plugin-eslint
- Create
scripts.js
file (orscripts/index.js
) and define tasks
import { rm } from '@trigen/scripts'
import { jest } from '@trigen/scripts-plugin-jest'
import { eslint } from '@trigen/scripts-plugin-eslint'
export default {
lint: {
title: 'Lint',
run: eslint()
},
jest: {
title: 'Jest',
run: jest()
},
test: {
title: 'Test',
run: ['lint', 'jest'],
parallel: true
},
clean: {
title: 'Clean',
run: rm([
'./coverage',
'./node_modules/.cache'
])
}
}
- Now you can run one of defined task
yarn exec -- trigen-scripts test