Skip to content

Commit

Permalink
Merge branch 'release/1.6.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
asaquzzaman committed Jul 6, 2017
2 parents 7e26d28 + f2235b0 commit 7489f7a
Show file tree
Hide file tree
Showing 19 changed files with 433 additions and 1,274 deletions.
100 changes: 13 additions & 87 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,23 @@ module.exports = function(grunt) {
optimization: 2
},
files: {
//"assets/css/admin.css": "assets/css/admin.less", // destination file and source file
"assets/css/admin.css": "assets/css/new-admin.less", // destination file and source file
"includes/pro/assets/css/pro-style.css": "includes/pro/assets/css/pro-style.less", // for my Task stylesheet
"includes/pro/frontend/css/frontend.css": "includes/pro/frontend/css/frontend.less", // frontend css
'<%= dirs.css %>/admin.css': '<%= dirs.css %>/new-admin.less' // destination file and source file
}
}
},
browserify: {
browserify: {
dist: {
options: {
transform: [['partialify']]
},
files: {
"./includes/pro/assets/js/build.js": ["./includes/pro/assets/js/files.js"], // For Files and Folder Tab
"./assets/js/cpm_common_js.js": ["./assets/js/cpm_common_js_raw.js"], // For Commons JS
//"./assets/js/task-vue.js": ["./assets/js/task-raw-vue.js"] // For Taks List and Task
'<%= dirs.js %>/cpm_common_js.js': ['<%= dirs.js %>/cpm_common_js_raw.js'] // For Commons JS
}
}
},
watch: {
styles: {
files: ['assets/css/*.less', 'assets/html/task/*.html', 'includes/pro/assets/css/*.less', 'includes/pro/assets/html/**/*.html', 'includes/pro/assets/js/*.js', 'assets/js/*.js', 'includes/pro/frontend/css/*.less'], // which files to watch
files: ['<%= dirs.css %>/*.less', '<%= dirs.js %>/*.js' ], // which files to watch
tasks: ['less'],
options: {
nospawn: true
Expand All @@ -62,7 +57,6 @@ module.exports = function(grunt) {
'!.git/**',
'!Gruntfile.js',
'!package.json',
'!package-lock.json',
'!debug.log',
'!phpunit.xml',
'!export.sh',
Expand Down Expand Up @@ -91,7 +85,7 @@ module.exports = function(grunt) {
'<%= dirs.js %>/admin.js',
'<%= dirs.js %>/mytask.js',
'<%= dirs.js %>/task.js',
'<%= dirs.js %>/upload.js',
'<%= dirs.js %>/upload.js'
]
},

Expand All @@ -100,29 +94,12 @@ module.exports = function(grunt) {
main: {
options: {
mode: 'zip',
archive: './build/wedevs-project-manager-pro-v' + pkg.version + '.zip'
archive: './build/wedevs-project-manager-v' + pkg.version + '.zip'
},
expand: true,
cwd: 'build/',
src: ['**/*'],
dest: 'wedevs-project-manager-pro'
}
},

replace: {
example: {
src: ['build/cpm.php'],
dest: 'build/cpm.php',
replacements: [
{
from: 'WP Project Manager',
to: 'WP Project Manager PRO'
},
{
from: 'https://wordpress.org/plugins/wedevs-project-manager/',
to: 'https://wedevs.com/products/plugins/wp-project-manager-pro/'
}
]
dest: 'wedevs-project-manager'
}
},

Expand All @@ -140,88 +117,37 @@ module.exports = function(grunt) {
}
}
}
},

secret: grunt.file.readJSON('secret.json'),
sshconfig: {
"myhost": {
host: '<%= secret.host %>',
username: '<%= secret.username %>',
password : "vagrant",
agent: process.env.SSH_AUTH_SOCK,
agentForward: true
}
},
sftp: {
upload: {
files: {
"./": 'build/wedevs-project-manager-pro-v' + pkg.version + '.zip'
},
options: {
path: '<%= secret.path %>',
config: 'myhost',
showProgress: true,
srcBasePath: "build/"
}
}
},
sshexec: {
updateVersion: {
command: '<%= secret.updateFiles %> ' + pkg.version + ' --allow-root',
options: {
config: 'myhost'
}
},

uptime: {
command: 'uptime',
options: {
config: 'myhost'
}
},

updateLounge: {
command: '<%= secret.updateLounge %>',
options: {
config: 'myhost'
}
}
}

});

grunt.loadNpmTasks( 'grunt-contrib-less' );
grunt.loadNpmTasks( 'grunt-contrib-concat' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-wp-i18n' );
// grunt.loadNpmTasks( 'grunt-contrib-uglify' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-contrib-clean' );
grunt.loadNpmTasks( 'grunt-contrib-copy' );
grunt.loadNpmTasks( 'grunt-contrib-compress' );
grunt.loadNpmTasks( 'grunt-text-replace' );
grunt.loadNpmTasks( 'grunt-ssh' );
grunt.loadNpmTasks( 'grunt-browserify' );
grunt.registerTask('default', ['less', 'watch']);

grunt.registerTask('default', ['less', 'watch'] );


grunt.registerTask( 'build', [ 'browserify' ] );

grunt.registerTask('release', [
'makepot',
'less',
'concat',
'clean',
'copy',
'compress',
'uglify'
'concat'
]);

grunt.registerTask('zip', [
grunt.registerTask( 'zip', [
'clean',
'copy',
'replace',
'compress'
]);
])

grunt.registerTask( 'deploy', [
'sftp:upload', 'sshexec:updateVersion'
Expand Down
Loading

0 comments on commit 7489f7a

Please sign in to comment.