diff --git a/Gruntfile.js b/Gruntfile.js index a8789be8545dfc146e6c15dbffb1ba0128f3f376..0af843da4494339561ca5abf7c4fb835213be8bc 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -113,6 +113,14 @@ module.exports = function ( grunt ) { } ] }, + demo: { + files: [ + { + src: '_examples/completeDemo.html', + dest: disDir + 'index.html' + } + ] + }, php: { expand: true, @@ -159,6 +167,17 @@ module.exports = function ( grunt ) { from: /utf-8/gi, to: 'gbk' } ] + }, + demo:{ + src: disDir+'index.html', + overwrite: true, + replacements: [ { + from: /\.\.\//gi, + to: '' + },{ + from: 'editor_api.js', + to: '<%= pkg.name %>.all.min.js' + } ] } } @@ -174,7 +193,7 @@ module.exports = function ( grunt ) { grunt.registerTask('default', 'UEditor build', function () { - var tasks = [ 'concat', 'cssmin', 'gcc', 'copy:base', 'copy:'+server ]; + var tasks = [ 'concat', 'cssmin', 'gcc', 'copy:base', 'copy:demo', 'copy:'+server ]; if ( encode === 'gbk' ) { tasks.push( 'replace' ); diff --git a/_examples/completeDemo.html b/_examples/completeDemo.html index dd0dc42cef68e0431212f0a8e2f1d125094f6dda..40d5623237e334939652bc760104f10afd054092 100755 --- a/_examples/completeDemo.html +++ b/_examples/completeDemo.html @@ -17,6 +17,7 @@