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

Combine taskr next-server tasks into one #13842

Merged
merged 3 commits into from
Jun 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 5 additions & 20 deletions packages/next/taskfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,7 @@ export async function compile(task) {
'lib',
'client',
'telemetry',
'nextserverserver',
'nextserverlib',
'nextserver',
])
}

Expand Down Expand Up @@ -709,33 +708,19 @@ export default async function (task) {
await task.watch('lib/**/*.+(js|ts|tsx)', 'lib')
await task.watch('cli/**/*.+(js|ts|tsx)', 'cli')
await task.watch('telemetry/**/*.+(js|ts|tsx)', 'telemetry')
await task.watch('next-server/server/**/*.+(js|ts|tsx)', 'nextserverserver')
await task.watch('next-server/lib/**/*.+(js|ts|tsx)', 'nextserverlib')
await task.watch('next-server/server/**/*.+(js|ts|tsx)', 'nextserver')
}

export async function nextserverlib(task, opts) {
export async function nextserver(task, opts) {
await task
.source(opts.src || 'next-server/lib/**/*.+(js|ts|tsx)')
.source(opts.src || 'next-server/**/*.+(js|ts|tsx)')
.babel('server')
.target('dist/next-server/lib')
notify('Compiled lib files')
}

export async function nextserverserver(task, opts) {
await task
.source(opts.src || 'next-server/server/**/*.+(js|ts|tsx)')
.babel('server')
.target('dist/next-server/server')
.target('dist/next-server')
notify('Compiled server files')
}

export async function nextserverbuild(task) {
await task.parallel(['nextserverserver', 'nextserverlib'])
}

export async function release(task) {
await task.clear('dist').start('build')
await task.clear('dist/next-server').start('nextserverbuild')
}

// notification helper
Expand Down