Skip to content

Commit 9db46a4

Browse files
committed
refactor: mkdir plugins
1 parent 36d05fc commit 9db46a4

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

packages/pages-plugin-layout-now/.gitkeep

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function ( ctx ) {
2+
ctx.data
3+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = async function ( ctx ) {
2+
ctx.rebuild()
3+
ctx.chainWebpack( webpack => {
4+
5+
} )
6+
7+
ctx.gatherer.watchConfig( 'layout', () => {
8+
ctx.writeFile( )
9+
ctx.addRoute( )
10+
} )
11+
12+
ctx.gatherer.watchFile( '', () => {
13+
14+
} )
15+
16+
// like ctx.body
17+
ctx.data = { foo: 'bar' }
18+
}

0 commit comments

Comments
 (0)