owl-cli 7.3.0 → 7.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/deploy.js +12 -0
- package/bin/owl-init.js +3 -1
- package/bin/owl.js +1 -0
- package/package.json +1 -1
package/bin/deploy.js
CHANGED
|
@@ -18,6 +18,7 @@ const isAppDir = function (dir) {
|
|
|
18
18
|
return false
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
+
|
|
21
22
|
var target = null;
|
|
22
23
|
if(process.argv.length>2){
|
|
23
24
|
target = process.argv[2];
|
|
@@ -62,5 +63,16 @@ var owlconfig = JSON.parse(content)
|
|
|
62
63
|
var full = resolve(cwd,owlconfig.generatedApps);
|
|
63
64
|
buildDir(full);
|
|
64
65
|
|
|
66
|
+
var deployApps = owlconfig.deployApps;
|
|
67
|
+
|
|
68
|
+
if (Array.isArray(deployApps)) {
|
|
69
|
+
// 遍历 deployApps 并对每个项目执行 buildDir
|
|
70
|
+
deployApps.forEach(appPath => {
|
|
71
|
+
const fullPath = resolve(cwd, appPath);
|
|
72
|
+
buildDir(fullPath);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
|
|
65
77
|
|
|
66
78
|
|
package/bin/owl-init.js
CHANGED
|
@@ -58,7 +58,9 @@ copyRecursiveSync(appsDir,destAppsDir);
|
|
|
58
58
|
|
|
59
59
|
let buildPropertiesPath = join(__dirname,'../examples/buildProperties');
|
|
60
60
|
let fullname = resolve(buildPropertiesPath,'build.properties');
|
|
61
|
-
let
|
|
61
|
+
let buildPropertiesDir = join(cwd,"buildProperties");
|
|
62
|
+
fs.mkdirSync(buildPropertiesDir)
|
|
63
|
+
let dstBuildProperties = resolve(buildPropertiesDir,'build.properties')
|
|
62
64
|
fs.copyFileSync(fullname, dstBuildProperties)
|
|
63
65
|
|
|
64
66
|
|
package/bin/owl.js
CHANGED
|
@@ -223,6 +223,7 @@ function setProject(owl, project){
|
|
|
223
223
|
//处理一个文件的主入口
|
|
224
224
|
function processOwlFile(dir,name, outdir, templatePath, buildType, modelDir,project) {
|
|
225
225
|
var inputFile = resolve(dir,name);
|
|
226
|
+
console.log('going to process file:',inputFile);
|
|
226
227
|
var content = fs.readFileSync(inputFile, {encoding: 'utf-8'})
|
|
227
228
|
var owl = JSON.parse(content)
|
|
228
229
|
var projectCode = getProjectCode(owl)
|