Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
4322bb13
Unverified
Commit
4322bb13
authored
Nov 30, 2018
by
Tim Neutkens
Committed by
GitHub
Nov 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build / watch .ts core files (#5776)
parent
af1d10c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
16 deletions
+18
-16
taskfile.js
packages/next-server/taskfile.js
+5
-4
taskfile.js
packages/next/taskfile.js
+13
-12
No files found.
packages/next-server/taskfile.js
View file @
4322bb13
const
notifier
=
require
(
'node-notifier'
)
const
notifier
=
require
(
'node-notifier'
)
export
async
function
lib
(
task
,
opts
)
{
export
async
function
lib
(
task
,
opts
)
{
await
task
.
source
(
opts
.
src
||
'lib/**/*.
js
'
).
typescript
({
module
:
'commonjs'
}).
target
(
'dist/lib'
)
await
task
.
source
(
opts
.
src
||
'lib/**/*.
+(js|ts)
'
).
typescript
({
module
:
'commonjs'
}).
target
(
'dist/lib'
)
notify
(
'Compiled lib files'
)
notify
(
'Compiled lib files'
)
}
}
export
async
function
server
(
task
,
opts
)
{
export
async
function
server
(
task
,
opts
)
{
await
task
.
source
(
opts
.
src
||
'server/**/*.
js
'
).
typescript
({
module
:
'commonjs'
}).
target
(
'dist/server'
)
await
task
.
source
(
opts
.
src
||
'server/**/*.
+(js|ts)
'
).
typescript
({
module
:
'commonjs'
}).
target
(
'dist/server'
)
notify
(
'Compiled server files'
)
notify
(
'Compiled server files'
)
}
}
...
@@ -15,9 +15,10 @@ export async function build (task) {
...
@@ -15,9 +15,10 @@ export async function build (task) {
}
}
export
default
async
function
(
task
)
{
export
default
async
function
(
task
)
{
await
task
.
clear
(
'dist'
)
await
task
.
start
(
'build'
)
await
task
.
start
(
'build'
)
await
task
.
watch
(
'server/**/*.
js
'
,
'server'
)
await
task
.
watch
(
'server/**/*.
+(js|ts)
'
,
'server'
)
await
task
.
watch
(
'lib/**/*.
js
'
,
'lib'
)
await
task
.
watch
(
'lib/**/*.
+(js|ts)
'
,
'lib'
)
}
}
export
async
function
release
(
task
)
{
export
async
function
release
(
task
)
{
...
...
packages/next/taskfile.js
View file @
4322bb13
...
@@ -10,33 +10,33 @@ export async function bin (task, opts) {
...
@@ -10,33 +10,33 @@ export async function bin (task, opts) {
}
}
export
async
function
lib
(
task
,
opts
)
{
export
async
function
lib
(
task
,
opts
)
{
await
task
.
source
(
opts
.
src
||
'lib/**/*.
js
'
).
typescript
({
module
:
'commonjs'
}).
target
(
'dist/lib'
)
await
task
.
source
(
opts
.
src
||
'lib/**/*.
+(js|ts)
'
).
typescript
({
module
:
'commonjs'
}).
target
(
'dist/lib'
)
notify
(
'Compiled lib files'
)
notify
(
'Compiled lib files'
)
}
}
export
async
function
server
(
task
,
opts
)
{
export
async
function
server
(
task
,
opts
)
{
await
task
.
source
(
opts
.
src
||
'server/**/*.
js
'
).
typescript
({
module
:
'commonjs'
}).
target
(
'dist/server'
)
await
task
.
source
(
opts
.
src
||
'server/**/*.
+(js|ts)
'
).
typescript
({
module
:
'commonjs'
}).
target
(
'dist/server'
)
notify
(
'Compiled server files'
)
notify
(
'Compiled server files'
)
}
}
export
async
function
nextbuild
(
task
,
opts
)
{
export
async
function
nextbuild
(
task
,
opts
)
{
await
task
.
source
(
opts
.
src
||
'build/**/*.
js
'
).
typescript
({
module
:
'commonjs'
}).
target
(
'dist/build'
)
await
task
.
source
(
opts
.
src
||
'build/**/*.
+(js|ts)
'
).
typescript
({
module
:
'commonjs'
}).
target
(
'dist/build'
)
notify
(
'Compiled build files'
)
notify
(
'Compiled build files'
)
}
}
export
async
function
client
(
task
,
opts
)
{
export
async
function
client
(
task
,
opts
)
{
await
task
.
source
(
opts
.
src
||
'client/**/*.
js
'
).
typescript
().
target
(
'dist/client'
)
await
task
.
source
(
opts
.
src
||
'client/**/*.
+(js|ts)
'
).
typescript
().
target
(
'dist/client'
)
notify
(
'Compiled client files'
)
notify
(
'Compiled client files'
)
}
}
// export is a reserved keyword for functions
// export is a reserved keyword for functions
export
async
function
nextbuildstatic
(
task
,
opts
)
{
export
async
function
nextbuildstatic
(
task
,
opts
)
{
await
task
.
source
(
opts
.
src
||
'export/**/*.
js
'
).
typescript
({
module
:
'commonjs'
}).
target
(
'dist/export'
)
await
task
.
source
(
opts
.
src
||
'export/**/*.
+(js|ts)
'
).
typescript
({
module
:
'commonjs'
}).
target
(
'dist/export'
)
notify
(
'Compiled export files'
)
notify
(
'Compiled export files'
)
}
}
export
async
function
pages
(
task
,
opts
)
{
export
async
function
pages
(
task
,
opts
)
{
await
task
.
source
(
opts
.
src
||
'pages/**/*.
js
'
).
typescript
().
target
(
'dist/pages'
)
await
task
.
source
(
opts
.
src
||
'pages/**/*.
+(js|ts)
'
).
typescript
().
target
(
'dist/pages'
)
}
}
export
async
function
build
(
task
)
{
export
async
function
build
(
task
)
{
...
@@ -44,14 +44,15 @@ export async function build (task) {
...
@@ -44,14 +44,15 @@ export async function build (task) {
}
}
export
default
async
function
(
task
)
{
export
default
async
function
(
task
)
{
await
task
.
clear
(
'dist'
)
await
task
.
start
(
'build'
)
await
task
.
start
(
'build'
)
await
task
.
watch
(
'bin/*'
,
'bin'
)
await
task
.
watch
(
'bin/*'
,
'bin'
)
await
task
.
watch
(
'pages/**/*.
js
'
,
'pages'
)
await
task
.
watch
(
'pages/**/*.
+(js|ts)
'
,
'pages'
)
await
task
.
watch
(
'server/**/*.
js
'
,
'server'
)
await
task
.
watch
(
'server/**/*.
+(js|ts)
'
,
'server'
)
await
task
.
watch
(
'build/**/*.
js
'
,
'nextbuild'
)
await
task
.
watch
(
'build/**/*.
+(js|ts)
'
,
'nextbuild'
)
await
task
.
watch
(
'export/**/*.
js
'
,
'nextexport'
)
await
task
.
watch
(
'export/**/*.
+(js|ts)
'
,
'nextexport'
)
await
task
.
watch
(
'client/**/*.
js
'
,
'client'
)
await
task
.
watch
(
'client/**/*.
+(js|ts)
'
,
'client'
)
await
task
.
watch
(
'lib/**/*.
js
'
,
'lib'
)
await
task
.
watch
(
'lib/**/*.
+(js|ts)
'
,
'lib'
)
}
}
export
async
function
release
(
task
)
{
export
async
function
release
(
task
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment