1 |
|
2 | var path = require('path');
|
3 | var amdDeploy = require('../index');
|
4 |
|
5 | amdDeploy({
|
6 | file: '/Users/zhujl/github/www-fe/src/pay/pay.js',
|
7 | callback: function (code) {
|
8 | console.log(code);
|
9 | },
|
10 | config: {
|
11 | baseUrl: '/Users/zhujl/github/www-fe/src',
|
12 | paths: {
|
13 | cobble: '../dep/cobble/0.3.19/src/'
|
14 | },
|
15 | packages: [
|
16 | {
|
17 | "name": "cobble",
|
18 | "location": "../dep/cobble/0.3.19/src/",
|
19 | "main": "main"
|
20 | },
|
21 | {
|
22 | "name": "moment",
|
23 | "location": "../dep/moment/2.7.0/src",
|
24 | "main": "moment"
|
25 | },
|
26 | {
|
27 | "name": "imageCrop",
|
28 | "location": "../dep/imageCrop/0.0.1/src",
|
29 | "main": "imageCrop"
|
30 | },
|
31 | {
|
32 | "name": "underscore",
|
33 | "location": "../dep/underscore/1.6.0/src",
|
34 | "main": "underscore"
|
35 | },
|
36 | {
|
37 | "name": "audioPlayer",
|
38 | "location": "../dep/audioPlayer/0.0.1/src",
|
39 | "main": "audioPlayer"
|
40 | },
|
41 | {
|
42 | "name": "TextClipboard",
|
43 | "location": "../dep/TextClipboard/0.0.2/src",
|
44 | "main": "TextClipboard"
|
45 | }
|
46 | ],
|
47 | combine: {
|
48 | exclude: [
|
49 | 'cobble',
|
50 | 'cobble/**/*',
|
51 | 'echarts',
|
52 | 'echarts/**/*',
|
53 | 'moment',
|
54 | 'underscore',
|
55 | 'imageCrop',
|
56 | 'audioPlayer',
|
57 | 'TextClipboard'
|
58 | ],
|
59 | modules: {
|
60 | 'ab/service': 1,
|
61 | 'pay/course': 1
|
62 | }
|
63 | },
|
64 | replaceRequireConfig: function (config) {
|
65 | return {
|
66 | baseUrl: '你没啥'
|
67 | };
|
68 | },
|
69 | replaceRequireResource: function (resourceId, absolutePath) {
|
70 |
|
71 | var ext = path.extname(resourceId);
|
72 |
|
73 | return path.join(
|
74 | path.dirname(resourceId),
|
75 | path.basename(resourceId, ext) + Date.now() + ext
|
76 | );
|
77 |
|
78 | },
|
79 | }
|
80 | }); |
\ | No newline at end of file |