Skip to content

Commit 7c3097e

Browse files
committed
refactor: cleaning code nuxt module
1 parent f514175 commit 7c3097e

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

example/nuxt.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ export default {
2323
buildModules: [
2424
'vue-notion/nuxt'
2525
]
26-
2726
};

nuxt/index.js

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,15 @@ module.exports = function (moduleOptions) {
1010
}, defaultOptions)
1111

1212
this.nuxt.hook('build:before', () => {
13-
console.log('this.options.build => ', this.options.build)
14-
15-
// Enable transpilation of `src/` directory
13+
// Enable transpilation for `vue-notion`
1614
this.options.build.transpile.push('vue-notion')
1715

18-
console.log('this.options.build after => ', this.options.build)
19-
2016
this.addPlugin({
2117
src: path.resolve(__dirname, 'plugin.js'),
22-
fileName: 'vue-notion.js'
18+
fileName: 'vue-notion.js',
19+
options
2320
})
2421
})
2522
}
2623

27-
module.exports.meta = require('../package.json')
28-
29-
// export default NotionModule
30-
31-
//export const meta = require('../package.json')
24+
module.exports.meta = require('../package.json')

nuxt/plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ Vue.use(VueNotion)
77
export default (_, inject) => {
88
const notion = { getPageBlocks, getPageTable }
99
inject('notion', notion)
10-
}
10+
}

0 commit comments

Comments
 (0)