Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] feat: support aegir.ts config file #994

Closed
wants to merge 12 commits into from
6 changes: 0 additions & 6 deletions .aegir.js

This file was deleted.

9 changes: 9 additions & 0 deletions .aegir.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { PartialOptions } from './src/types.js'

const options: PartialOptions = {
docs: {
entryPoint: 'utils'
}
}

export default options
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!.aegir.ts
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@
"strip-bom": "^5.0.0",
"strip-json-comments": "^4.0.0",
"tempy": "^2.0.0",
"ts-import": "^3.0.0-beta.3",
"typescript": "^4.6.3",
"uint8arrays": "^3.0.0",
"undici": "^5.0.0",
Expand Down
122 changes: 122 additions & 0 deletions src/config/defaults.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
/**
* @typedef {import("./../types").Options} Options
*/

/** @type {Omit<Options, "fileConfig">} */
const defaults = {
// global options
debug: false,
// test cmd options
test: {
build: false,
runner: 'node',
target: ['node', 'browser', 'webworker'],
watch: false,
files: [],
timeout: 60000,
grep: '',
bail: false,
progress: false,
cov: false,
browser: {
config: {
buildConfig: {
conditions: ['production']
}
}
},
before: async () => { return undefined },
after: async () => {}
},
// build cmd options
build: {
bundle: true,
bundlesize: false,
bundlesizeMax: '100kB',
types: true,
config: {}
},
// linter cmd options
lint: {
silent: false,
fix: false,
files: [
'*.{js,ts}',
'bin/**',
'config/**/*.{js,ts}',
'test/**/*.{js,ts}',
'src/**/*.{js,ts}',
'tasks/**/*.{js,ts}',
'benchmarks/**/*.{js,ts}',
'utils/**/*.{js,ts}',
'!**/node_modules/**'
]
},
// docs cmd options
docs: {
publish: false,
entryPoint: 'src/index.js'
},
// ts cmd options
ts: {
preset: undefined,
include: []
},
// release cmd options
release: {
build: true,
types: true,
test: true,
lint: true,
contributors: true,
bump: true,
changelog: true,
publish: true,
commit: true,
tag: true,
push: true,
ghrelease: true,
docs: true,
ghtoken: '',
type: 'patch',
preid: undefined,
distTag: 'latest',
remote: 'origin'
},
// dependency check cmd options
dependencyCheck: {
input: [
'package.json',
'.aegir.js',
'.aegir.cjs',
'src/**/*.js',
'src/**/*.cjs',
'test/**/*.js',
'test/**/*.cjs',
'dist/**/*.js',
'benchmarks/**/*.js',
'benchmarks/**/*.cjs',
'utils/**/*.js',
'utils/**/*.cjs',
'!./test/fixtures/**/*.js',
'!./test/fixtures/**/*.cjs',
'!./dist/test/fixtures/**/*.js',
'!./dist/test/fixtures/**/*.cjs',
'!**/*.min.js'
],
productionOnly: false,
productionInput: [
'package.json',
'src/**/*.js',
'src/**/*.cjs',
'dist/src/**/*.js',
'utils/**/*.js',
'utils/**/*.cjs'
],
ignore: [
'@types/*'
]
}
}

export { defaults }
Loading