Skip to content

Commit

Permalink
remove notify function
Browse files Browse the repository at this point in the history
  • Loading branch information
jankaifer committed Dec 7, 2022
1 parent 1309eb0 commit 3f2b566
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions packages/next/taskfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// eslint-disable-next-line import/no-extraneous-dependencies
const notifier = require('node-notifier')
// eslint-disable-next-line import/no-extraneous-dependencies
const { relative, basename, resolve, join, dirname } = require('path')
// eslint-disable-next-line import/no-extraneous-dependencies
const glob = require('glob')
Expand Down Expand Up @@ -2130,31 +2128,27 @@ export async function bin(task, opts) {
.source(opts.src || 'bin/*')
.swc('server', { stripExtension: true, dev: opts.dev })
.target('dist/bin', { mode: '0755' })
notify('Compiled binaries')
}

export async function cli(task, opts) {
await task
.source('cli/**/*.+(js|ts|tsx)')
.swc('server', { dev: opts.dev })
.target('dist/cli')
notify('Compiled cli files')
}

export async function lib(task, opts) {
await task
.source(opts.src || 'lib/**/*.+(js|ts|tsx)')
.swc('server', { dev: opts.dev })
.target('dist/lib')
notify('Compiled lib files')
}

export async function lib_esm(task, opts) {
await task
.source(opts.src || 'lib/**/*.+(js|ts|tsx)')
.swc('server', { dev: opts.dev, esm: true })
.target('dist/esm/lib')
notify('Compiled lib files')
}

export async function server(task, opts) {
Expand All @@ -2167,16 +2161,13 @@ export async function server(task, opts) {
join(__dirname, 'server/google-font-metrics.json'),
join(__dirname, 'dist/server/google-font-metrics.json')
)

notify('Compiled server files')
}

export async function server_esm(task, opts) {
await task
.source(opts.src || 'server/**/*.+(js|ts|tsx)')
.swc('server', { dev: opts.dev, esm: true })
.target('dist/esm/server')
notify('Compiled server files to ESM')
}

export async function nextbuild(task, opts) {
Expand All @@ -2186,7 +2177,6 @@ export async function nextbuild(task, opts) {
})
.swc('server', { dev: opts.dev })
.target('dist/build')
notify('Compiled build files')
}

export async function nextbuild_esm(task, opts) {
Expand All @@ -2196,7 +2186,6 @@ export async function nextbuild_esm(task, opts) {
})
.swc('server', { dev: opts.dev, esm: true })
.target('dist/esm/build')
notify('Compiled build files to ESM')
}

export async function nextbuildjest(task, opts) {
Expand All @@ -2206,23 +2195,20 @@ export async function nextbuildjest(task, opts) {
})
.swc('server', { dev: opts.dev, interopClientDefaultExport: true })
.target('dist/build/jest')
notify('Compiled build/jest files')
}

export async function client(task, opts) {
await task
.source(opts.src || 'client/**/*.+(js|ts|tsx)')
.swc('client', { dev: opts.dev, interopClientDefaultExport: true })
.target('dist/client')
notify('Compiled client files')
}

export async function client_esm(task, opts) {
await task
.source(opts.src || 'client/**/*.+(js|ts|tsx)')
.swc('client', { dev: opts.dev, esm: true })
.target('dist/esm/client')
notify('Compiled client files to ESM')
}

// export is a reserved keyword for functions
Expand All @@ -2231,7 +2217,6 @@ export async function nextbuildstatic(task, opts) {
.source(opts.src || 'export/**/*.+(js|ts|tsx)')
.swc('server', { dev: opts.dev })
.target('dist/export')
notify('Compiled export files')
}

export async function pages_app(task, opts) {
Expand Down Expand Up @@ -2300,15 +2285,13 @@ export async function telemetry(task, opts) {
.source(opts.src || 'telemetry/**/*.+(js|ts|tsx)')
.swc('server', { dev: opts.dev })
.target('dist/telemetry')
notify('Compiled telemetry files')
}

export async function trace(task, opts) {
await task
.source(opts.src || 'trace/**/*.+(js|ts|tsx)')
.swc('server', { dev: opts.dev })
.target('dist/trace')
notify('Compiled trace files')
}

export async function build(task, opts) {
Expand Down Expand Up @@ -2370,7 +2353,6 @@ export async function shared(task, opts) {
)
.swc('client', { dev: opts.dev })
.target('dist/shared')
notify('Compiled shared files')
}

export async function shared_esm(task, opts) {
Expand All @@ -2380,7 +2362,6 @@ export async function shared_esm(task, opts) {
)
.swc('client', { dev: opts.dev, esm: true })
.target('dist/esm/shared')
notify('Compiled shared files to ESM')
}

export async function shared_re_exported(task, opts) {
Expand All @@ -2391,7 +2372,6 @@ export async function shared_re_exported(task, opts) {
)
.swc('client', { dev: opts.dev, interopClientDefaultExport: true })
.target('dist/shared')
notify('Compiled shared re-exported files')
}

export async function shared_re_exported_esm(task, opts) {
Expand All @@ -2404,19 +2384,12 @@ export async function shared_re_exported_esm(task, opts) {
esm: true,
})
.target('dist/esm/shared')
notify('Compiled shared re-exported files as ESM')
}

export async function server_wasm(task, opts) {
await task.source(opts.src || 'server/**/*.+(wasm)').target('dist/server')
notify('Moved server wasm files')
}

export async function release(task) {
await task.clear('dist').start('build')
}

// notification helper
function notify(msg) {
// We don't know how to easily emit notifications in M1 mac and using `notify-send` with Gnome fills notification centre.
}

0 comments on commit 3f2b566

Please sign in to comment.