UNPKG

608 BMarkdownView Raw
1<h1 style="font-weight: normal"> Node.js API </h1>
2
3<h2 style="font-weight: normal"> 调用 Ykit 打包方法 </h2>
4
5```javascript
6let ykit = require("ykit");
7
8ykit.pack({
9 // 配置
10}, (err, stats) => {
11
12});
13```
14
15<h2 style="font-weight: normal"> 与 Gulp 结合使用 </h2>
16
17```javascript
18let ykit = require("ykit");
19
20gulp.task('pack', () => {
21 return gulp.src('./')
22 .pipe(ykit({
23 // 配置
24 }));
25});
26```
27
28<h2 style="font-weight: normal"> 与 Grunt 结合使用 </h2>
29
30```javascript
31grunt.initConfig({
32 ykit: {
33 // 配置
34 }
35});
36
37grunt.loadNpmTasks('ykit');
38```