jsharmony-cms 1.5.3 → 1.5.4
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/doc/deployment_target.json +6 -0
- package/models/_funcs.deploy.js +10 -19
- package/package.json +2 -2
|
@@ -101,6 +101,12 @@
|
|
|
101
101
|
"onDeploy": true, //true (all), false (none), or array of items, ex: ["page","media"]
|
|
102
102
|
"onDeploy_PostBuild": true, //true (all), false (none), or array of items, ex: ["page","media"]
|
|
103
103
|
},
|
|
104
|
+
//Remote folders or files to ignore when deleting excess files on publish
|
|
105
|
+
//Use with FTP, FTPS, SFTP, S3, and Local File System deployments
|
|
106
|
+
"ignore_remote": [
|
|
107
|
+
"path/to/folder",
|
|
108
|
+
"path/to/file"
|
|
109
|
+
]
|
|
104
110
|
}
|
|
105
111
|
|
|
106
112
|
//Template Variables
|
package/models/_funcs.deploy.js
CHANGED
|
@@ -2011,27 +2011,16 @@ module.exports = exports = function(module, funcs){
|
|
|
2011
2011
|
|
|
2012
2012
|
exports.deploy_ignore_remote = function(publish_params, fpath){
|
|
2013
2013
|
if(fpath=='.git') return true;
|
|
2014
|
-
return false;
|
|
2015
|
-
/*
|
|
2016
2014
|
if(!publish_params || !publish_params.ignore_remote) return false;
|
|
2017
|
-
var origpath = fpath;
|
|
2018
2015
|
fpath = HelperFS.convertWindowsToPosix(fpath);
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
else {
|
|
2026
|
-
if(ignore_expr == fpath) return true;
|
|
2027
|
-
}
|
|
2028
|
-
}
|
|
2029
|
-
fpath = path.dirname(fpath);
|
|
2030
|
-
if(fpath=='.') fpath = '';
|
|
2031
|
-
if(fpath=='..') fpath = '';
|
|
2016
|
+
for(var i=0;i<publish_params.ignore_remote.length;i++){
|
|
2017
|
+
var ignore_expr = publish_params.ignore_remote[i];
|
|
2018
|
+
if(!ignore_expr) continue;
|
|
2019
|
+
var ignore_path = HelperFS.convertWindowsToPosix(ignore_expr.toString());
|
|
2020
|
+
if(ignore_path == fpath) return true;
|
|
2021
|
+
if(fpath.indexOf(ignore_path+'/')==0) return true;
|
|
2032
2022
|
}
|
|
2033
|
-
return
|
|
2034
|
-
*/
|
|
2023
|
+
return false;
|
|
2035
2024
|
}
|
|
2036
2025
|
|
|
2037
2026
|
exports.deploy_fs = function(deployment, publish_path, deploy_path, site_files, cb){
|
|
@@ -2613,7 +2602,9 @@ module.exports = exports = function(module, funcs){
|
|
|
2613
2602
|
if(site_md5 != s3_md5) s3_upload.push(fname);
|
|
2614
2603
|
}
|
|
2615
2604
|
else {
|
|
2616
|
-
|
|
2605
|
+
if(!funcs.deploy_ignore_remote(deployment.publish_params, fname)){
|
|
2606
|
+
s3_delete.push(fname);
|
|
2607
|
+
}
|
|
2617
2608
|
}
|
|
2618
2609
|
}
|
|
2619
2610
|
for(var fname in site_files){
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsharmony-cms",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.4",
|
|
4
4
|
"description": "jsHarmony CMS",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"diff2html": "3.4.1",
|
|
31
31
|
"ejs": "2.7.4",
|
|
32
32
|
"js-beautify": "^1.11.0",
|
|
33
|
-
"jsharmony": "^1.
|
|
33
|
+
"jsharmony": "^1.5.2",
|
|
34
34
|
"jsharmony-factory": "^1.2.0",
|
|
35
35
|
"lodash": "^4.17.19",
|
|
36
36
|
"node-forge": "^0.10.0",
|