1 |
|
2 | const fs = require('fs');
|
3 | const path = require('path');
|
4 |
|
5 | module.exports = {
|
6 |
|
7 |
|
8 | path: __dirname,
|
9 |
|
10 |
|
11 | pkg: '.',
|
12 |
|
13 |
|
14 | task(cuf, pkg, rootPath) {
|
15 |
|
16 | let banner = `
|
17 | /*!
|
18 | * Debug - ${pkg.description}
|
19 | * ${pkg.repository.url}
|
20 | *
|
21 | * author ${pkg.author}
|
22 | *
|
23 | * version ${pkg.version}
|
24 | *
|
25 | * Copyright 心叶
|
26 | * Released under the ${pkg.license} license
|
27 | *
|
28 | * Date:${new Date()}
|
29 | */
|
30 | `;
|
31 |
|
32 | [
|
33 | path.join(rootPath, './build/debug.console.min.js')
|
34 | ].forEach(targetPath => {
|
35 |
|
36 | fs.writeFileSync(targetPath, banner + "\n" + fs.readFileSync(targetPath));
|
37 |
|
38 | });
|
39 |
|
40 | }
|
41 | }; |
\ | No newline at end of file |