Commit 838632b3 authored by techird's avatar techird

目录结构和文件调整

parent 9719d582
.idea .idea
*.sublime-project *.sublime-project
*.sublime-workspace *.sublime-workspace
node_modules/
\ No newline at end of file
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
* livereload Default Setting * livereload Default Setting
*-----------------------------------------------------*/ *-----------------------------------------------------*/
'use strict'; 'use strict';
var path = require('path'); var path = require( 'path' );
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet; var lrSnippet = require( 'grunt-contrib-livereload/lib/utils' ).livereloadSnippet;
/*----------------------------------------------------- /*-----------------------------------------------------
* Module Setting * Module Setting
*-----------------------------------------------------*/ *-----------------------------------------------------*/
module.exports = function (grunt) { module.exports = function ( grunt ) {
var banner = '/*!\n' + var banner = '/*!\n' +
' * ====================================================\n' + ' * ====================================================\n' +
...@@ -20,27 +20,27 @@ module.exports = function (grunt) { ...@@ -20,27 +20,27 @@ module.exports = function (grunt) {
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %>\n' + ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %>\n' +
' * ====================================================\n' + ' * ====================================================\n' +
' */\n\n', ' */\n\n',
buildPath = 'dist/dev.php'; buildPath = 'dev/import.php';
var getPath = function ( readFile) { var getPath = function ( readFile ) {
var sources = require("fs").readFileSync(readFile); var sources = require( "fs" ).readFileSync( readFile );
sources = /Array\(([^)]+)\)/.exec( sources ); sources = /Array\(([^)]+)\)/.exec( sources );
sources = sources[1].replace( /\/\/.*\n/g, '\n' ).replace( /'|"|\n|\t|\s/g, '' ); sources = sources[ 1 ].replace( /\/\/.*\n/g, '\n' ).replace( /'|"|\n|\t|\s/g, '' );
sources = sources.split( "," ); sources = sources.split( "," );
sources.forEach( function ( filepath, index ) { sources.forEach( function ( filepath, index ) {
sources[ index ] = filepath; sources[ index ] = filepath;
}); } );
return sources; return sources;
}; };
// Project configuration. // Project configuration.
grunt.initConfig({ grunt.initConfig( {
// Metadata. // Metadata.
pkg: grunt.file.readJSON('package.json'), pkg: grunt.file.readJSON( 'package.json' ),
concat: { concat: {
...@@ -48,7 +48,7 @@ module.exports = function (grunt) { ...@@ -48,7 +48,7 @@ module.exports = function (grunt) {
options: { options: {
banner: banner + '(function(kity, window) {\n\n', banner: banner + '(function(kity, window) {\n\n',
footer: '\n\n})(kity, window)', footer: '\n\n})(kity, window)',
process: function(src, filepath) { process: function ( src, filepath ) {
return src + "\n"; return src + "\n";
} }
}, },
...@@ -60,6 +60,9 @@ module.exports = function (grunt) { ...@@ -60,6 +60,9 @@ module.exports = function (grunt) {
uglify: { uglify: {
minimize: { minimize: {
options: {
banner: banner
},
files: { files: {
'dist/kityminder.all.min.js': 'dist/kityminder.all.js' 'dist/kityminder.all.min.js': 'dist/kityminder.all.js'
} }
...@@ -76,37 +79,37 @@ module.exports = function (grunt) { ...@@ -76,37 +79,37 @@ module.exports = function (grunt) {
hostname: '*', hostname: '*',
port: 9001, port: 9001,
base: '.', base: '.',
middleware: function(connect, options, middlewares) { middleware: function ( connect, options, middlewares ) {
return [ return [
lrSnippet, lrSnippet,
connect.static(options.base.toString()), connect.static( options.base.toString() ),
connect.directory(options.base.toString()) connect.directory( options.base.toString() )
] ];
} }
} }
} }
}, },
regarde: { regarde: {
js:{ js: {
files: 'src/**/*.js', files: 'src/**/*.js',
tasks: ['default', 'livereload'] tasks: [ 'default', 'livereload' ]
} }
} }
/* End [Task liverload] ------------------------------------*/ /* End [Task liverload] ------------------------------------*/
}); } );
// These plugins provide necessary tasks. // These plugins provide necessary tasks.
/* [Build plugin & task ] ------------------------------------*/ /* [Build plugin & task ] ------------------------------------*/
grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks( 'grunt-contrib-concat' );
grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks( 'grunt-contrib-uglify' );
// Build task(s). // Build task(s).
grunt.registerTask( 'default', [ 'concat:js', 'uglify:minimize' ] ); grunt.registerTask( 'default', [ 'concat:js', 'uglify:minimize' ] );
/* [liverload plugin & task ] ------------------------------------*/ /* [liverload plugin & task ] ------------------------------------*/
grunt.loadNpmTasks('grunt-regarde'); grunt.loadNpmTasks( 'grunt-regarde' );
grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks( 'grunt-contrib-connect' );
grunt.loadNpmTasks('grunt-contrib-livereload'); grunt.loadNpmTasks( 'grunt-contrib-livereload' );
grunt.registerTask('live', ['livereload-start', 'connect', 'regarde']); grunt.registerTask( 'live', [ 'livereload-start', 'connect', 'regarde' ] );
}; };
\ No newline at end of file
Kity Minder Kity Minder
========== ==========
##简介 ## 简介
KityMinder 是百度FEX团队的f-cube小组(原UEditor小组)的又一力作。作为一款在线的脑图编辑工具,它有着很多Native编辑工具的交互体验。KM与UE有着一样的宗旨,就是注重最终用户的使用体验。同时,它充分发挥了Web云存储的优势,可以直接将编辑中的脑图同步到云端。此外,借由独创的 “云盘分享”功能,用户可以一键将当前编辑的脑图直接生成在线链接共享给其他用户,实现无缝沟通 KityMinder 是百度 FEX 团队的 f-cube 小组(原UEditor小组)的又一力作。作为一款在线的脑图编辑工具,它有着很多Native编辑工具的交互体验。KM与UE有着一样的宗旨,就是注重最终用户的使用体验。同时,它充分发挥了Web云存储的优势,可以直接将编辑中的脑图同步到云端。此外,借由独创的 “云盘分享”功能,用户可以一键将当前编辑的脑图直接生成在线链接共享给其他用户,实现无缝沟通。
![Alt text](summary.jpg "简介图") ![Alt text](summary.jpg "简介图")
KM是基于SVG技术实现,使用JavaScript+html实现。支持绝大多数的主流浏览器。 KM是基于SVG技术实现,使用JavaScript+html实现。支持绝大多数的主流浏览器。
支持列表如下 支持列表如下
1. chrome 1. Chrome
2. firefox 2. Firefox
3. safari 3. Safari
4. ie9-11 4. IE9+
##项目链接 ## 项目链接
[直接使用链接](http://kitygraph.github.io/kityminder/dist/) [直接使用链接](http://fex-team.github.io/kityminder/dist/)
##联系我们 ## 联系我们
邮件:kity@baidu.com 邮件: kity@baidu.com
讨论群:374918234 讨论群: 374918234
var fs = require('fs');
var dependience = [
'src/core/km.js',
'src/core/command.js',
'src/core/mindernode.js',
'src/core/minderevent.js',
'src/core/kityminder.js'
];
var buildPath = 'dist/kityminder.js';
var contents = [], content;
while(dependience.length) {
contents.push(fs.readFileSync(dependience.shift()));
}
content = contents.join('\n\n');
content = '(function(kity, window) {\n\n' + content + '\n\n})(kity, window);';
fs.writeFileSync(buildPath, content);
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../lib/jquery-2.1.0.min.js" charset="utf-8"></script>
<script src="../kity/dist/kitygraph.all.js" charset="utf-8"></script>
<script src="../dev/import.php" charset="utf-8"></script>
<script src="../kityminder.config.js" charset="utf-8"></script>
<script src="../lang/zh-cn/zh-cn.js" charset="utf-8"></script>
<script src="../lib/baidu-frontia-js-full-1.0.0.js" charset="utf-8"></script>
<script src="../social/social.js" charset="utf-8"></script>
<link href="../social/social.css" rel="stylesheet">
<link href="../themes/default/css/import.css" type="text/css" rel="stylesheet" />
<link href="../dialogs/dialogs.css" rel="stylesheet" type="text/css" />
<script>
$(function () {
// create km instance
window.km = KM.getKityMinder('kityminder');
});
</script>
</head>
<body>
<div id="kityminder" onselectstart="return false"></div>
<body>
</html>
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<script src="jquery-2.1.0.min.js" charset="utf-8"></script>
<script src="baidu-frontia-js-full-1.0.0.js" charset="utf-8"></script> <script src="../lib/jquery-2.1.0.min.js" charset="utf-8"></script>
<script src="social.js" charset="utf-8"></script>
<script src="../kity/dist/kitygraph.all.js" charset="utf-8"></script> <script src="../kity/dist/kitygraph.all.min.js" charset="utf-8"></script>
<script src="../configure.js" charset="utf-8"></script> <script src="../dist/kityminder.all.min.js" charset="utf-8"></script>
<script src="./kityminder.all.min.js" charset="utf-8"></script> <script src="../kityminder.config.js" charset="utf-8"></script>
<script src="../lang/zh-cn/zh-cn.js" charset="utf-8"></script> <script src="../lang/zh-cn/zh-cn.js" charset="utf-8"></script>
<link href="../themes/default/css/import.css" type="text/css" rel="stylesheet">
<link rel="stylesheet" href="social.css"> <script src="../lib/baidu-frontia-js-full-1.0.0.js" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="../dialogs/dialogs.css"> <script src="../social/social.js" charset="utf-8"></script>
<style> <link href="../social/social.css" rel="stylesheet">
.km_receiver{
width:0; <link href="../themes/default/css/import.css" type="text/css" rel="stylesheet" />
height:0; <link href="../dialogs/dialogs.css" rel="stylesheet" type="text/css" />
}
.km-minderNode{ <script>
cursor:default; $(function () {
} // create km instance
.kmui-container {
height: 100%;
}
html, body, div {
margin: 0;
padding: 0;
}
html, body, div.kmui-editor-body {
height: 100%;
-moz-user-select: none;
}
</style>
</head>
<body >
<div id="kityminder" style="height:100%;width:100%" onselectstart="return false">
</div>
<div id="social"></div>
</body>
<script>
window.km = KM.getKityMinder('kityminder'); window.km = KM.getKityMinder('kityminder');
</script> });
</script>
</head>
<body>
<div id="kityminder" onselectstart="return false"></div>
<body>
</html> </html>
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
"name": "kityminder", "name": "kityminder",
"title": "kityminder", "title": "kityminder",
"description": "Kity Minder", "description": "Kity Minder",
"version": "1.1.0", "version": "1.0.0",
"homepage": "https://github.com/kitygraph/kityminder", "homepage": "https://github.com/fex-team/kityminder",
"author": { "author": {
"name": "Baidu UEditor Group", "name": "f-cube @ FEX",
"url": "http://ueditor.baidu.com" "url": "http://fex.baidu.com"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/kitygraph/kityminder.git" "url": "https://github.com/fex-team/kityminder.git"
}, },
"keywords": [ "keywords": [
"kityminder", "kityminder",
...@@ -21,12 +21,12 @@ ...@@ -21,12 +21,12 @@
"javascript" "javascript"
], ],
"bugs": { "bugs": {
"url": "https://github.com/kitygraph/kityminder/issues" "url": "https://github.com/fex-team/kityminder/issues"
}, },
"licenses": [ "licenses": [
{ {
"type": "MIT", "type": "MIT",
"url": "https://github.com/kitygraph/kityminder/blob/dev/LICENSE" "url": "https://github.com/fex-team/kityminder/blob/dev/LICENSE"
} }
], ],
"dependencies": {}, "dependencies": {},
......
...@@ -36,7 +36,7 @@ $.extend( $.fn, { ...@@ -36,7 +36,7 @@ $.extend( $.fn, {
} ); } );
$( function () { $( function () {
var $panel = $( '#social' ); var $panel = $( '<div id="social"></div>' ).appendTo( 'body' );
var $login_btn, $save_btn, $share_btn, $user_btn, $user_menu; var $login_btn, $save_btn, $share_btn, $user_btn, $user_menu;
var baseUrl = ( function () { var baseUrl = ( function () {
...@@ -322,7 +322,7 @@ $( function () { ...@@ -322,7 +322,7 @@ $( function () {
if ( currentUser ) { if ( currentUser ) {
setCurrentUser( currentUser ); setCurrentUser( currentUser );
loadPath(); loadPath();
if(thisMapFilename) { if ( thisMapFilename ) {
loadPersonal( thisMapFilename ); loadPersonal( thisMapFilename );
} }
} else { } else {
......
html, body, div {
margin: 0;
padding: 0;
}
html, body, #kity-minder, div.kmui-editor-body {
height:100%;
width:100%
-moz-user-select: none;
}
.km_receiver{
width:0;
height:0;
}
.km-minderNode{
cursor:default;
}
.kmui-container {
height: 100%;
}
.kmui-container { .kmui-container {
} }
.kmui-container .kmui-toolbar{ .kmui-container .kmui-toolbar{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment