Skip to content

Commit

Permalink
目录结构和文件调整
Browse files Browse the repository at this point in the history
  • Loading branch information
techird committed Mar 7, 2014
1 parent 9719d58 commit 838632b
Show file tree
Hide file tree
Showing 17 changed files with 572 additions and 745 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
*.sublime-project
*.sublime-workspace
*.sublime-workspace
node_modules/
65 changes: 34 additions & 31 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
* livereload Default Setting
*-----------------------------------------------------*/
'use strict';
var path = require('path');
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var path = require( 'path' );
var lrSnippet = require( 'grunt-contrib-livereload/lib/utils' ).livereloadSnippet;

/*-----------------------------------------------------
* Module Setting
*-----------------------------------------------------*/
module.exports = function (grunt) {
module.exports = function ( grunt ) {

var banner = '/*!\n' +
' * ====================================================\n' +
Expand All @@ -20,35 +20,35 @@ module.exports = function (grunt) {
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %>\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);
sources = /Array\(([^)]+)\)/.exec( sources );
sources = sources[1].replace( /\/\/.*\n/g, '\n' ).replace( /'|"|\n|\t|\s/g, '' );
sources = sources.split( "," );
sources.forEach( function ( filepath, index ) {
sources[ index ] = filepath;
});
var sources = require( "fs" ).readFileSync( readFile );
sources = /Array\(([^)]+)\)/.exec( sources );
sources = sources[ 1 ].replace( /\/\/.*\n/g, '\n' ).replace( /'|"|\n|\t|\s/g, '' );
sources = sources.split( "," );
sources.forEach( function ( filepath, index ) {
sources[ index ] = filepath;
} );

return sources;
return sources;

};
};

// Project configuration.
grunt.initConfig({
grunt.initConfig( {

// Metadata.
pkg: grunt.file.readJSON('package.json'),
pkg: grunt.file.readJSON( 'package.json' ),

concat: {

js: {
options: {
banner: banner + '(function(kity, window) {\n\n',
footer: '\n\n})(kity, window)',
process: function(src, filepath) {
process: function ( src, filepath ) {
return src + "\n";
}
},
Expand All @@ -60,6 +60,9 @@ module.exports = function (grunt) {

uglify: {
minimize: {
options: {
banner: banner
},
files: {
'dist/kityminder.all.min.js': 'dist/kityminder.all.js'
}
Expand All @@ -76,37 +79,37 @@ module.exports = function (grunt) {
hostname: '*',
port: 9001,
base: '.',
middleware: function(connect, options, middlewares) {
middleware: function ( connect, options, middlewares ) {
return [
lrSnippet,
connect.static(options.base.toString()),
connect.directory(options.base.toString())
]
connect.static( options.base.toString() ),
connect.directory( options.base.toString() )
];
}
}
}
},
regarde: {
js:{
js: {
files: 'src/**/*.js',
tasks: ['default', 'livereload']
tasks: [ 'default', 'livereload' ]
}
}
/* End [Task liverload] ------------------------------------*/

});
} );

// These plugins provide necessary tasks.
/* [Build plugin & task ] ------------------------------------*/
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks( 'grunt-contrib-concat' );
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
// Build task(s).
grunt.registerTask( 'default', [ 'concat:js', 'uglify:minimize' ] );

/* [liverload plugin & task ] ------------------------------------*/
grunt.loadNpmTasks('grunt-regarde');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-livereload');
grunt.registerTask('live', ['livereload-start', 'connect', 'regarde']);
grunt.loadNpmTasks( 'grunt-regarde' );
grunt.loadNpmTasks( 'grunt-contrib-connect' );
grunt.loadNpmTasks( 'grunt-contrib-livereload' );
grunt.registerTask( 'live', [ 'livereload-start', 'connect', 'regarde' ] );

};
};
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
Kity Minder
==========

##简介
KityMinder 是百度FEX团队的f-cube小组(原UEditor小组)的又一力作。作为一款在线的脑图编辑工具,它有着很多Native编辑工具的交互体验。KM与UE有着一样的宗旨,就是注重最终用户的使用体验。同时,它充分发挥了Web云存储的优势,可以直接将编辑中的脑图同步到云端。此外,借由独创的 “云盘分享”功能,用户可以一键将当前编辑的脑图直接生成在线链接共享给其他用户,实现无缝沟通
## 简介
KityMinder 是百度 FEX 团队的 f-cube 小组(原UEditor小组)的又一力作。作为一款在线的脑图编辑工具,它有着很多Native编辑工具的交互体验。KM与UE有着一样的宗旨,就是注重最终用户的使用体验。同时,它充分发挥了Web云存储的优势,可以直接将编辑中的脑图同步到云端。此外,借由独创的 “云盘分享”功能,用户可以一键将当前编辑的脑图直接生成在线链接共享给其他用户,实现无缝沟通

![Alt text](summary.jpg "简介图")

KM是基于SVG技术实现,使用JavaScript+html实现。支持绝大多数的主流浏览器。
支持列表如下

1. chrome
2. firefox
3. safari
4. ie9-11
1. Chrome
2. Firefox
3. Safari
4. IE9+


##项目链接
[直接使用链接](http://kitygraph.github.io/kityminder/dist/)
## 项目链接
[直接使用链接](http://fex-team.github.io/kityminder/dist/)

##联系我们
邮件:kity@baidu.com
讨论群:374918234
## 联系我们
邮件: [email protected]
讨论群: 374918234
23 changes: 0 additions & 23 deletions build.js

This file was deleted.

File renamed without changes.
32 changes: 32 additions & 0 deletions dev/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!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>
63 changes: 25 additions & 38 deletions dist/index.html
Original file line number Diff line number Diff line change
@@ -1,45 +1,32 @@
<!DOCTYPE html>

<html>
<head>
<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="social.js" charset="utf-8"></script>
<script src="../kity/dist/kitygraph.all.js" charset="utf-8"></script>
<script src="../configure.js" charset="utf-8"></script>
<script src="./kityminder.all.min.js" charset="utf-8"></script>

<script src="../lib/jquery-2.1.0.min.js" charset="utf-8"></script>

<script src="../kity/dist/kitygraph.all.min.js" charset="utf-8"></script>
<script src="../dist/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>
<link href="../themes/default/css/import.css" type="text/css" rel="stylesheet">
<link rel="stylesheet" href="social.css">
<link rel="stylesheet" type="text/css" href="../dialogs/dialogs.css">
<style>
.km_receiver{
width:0;
height:0;
}
.km-minderNode{
cursor:default;
}
.kmui-container {
height: 100%;
}
html, body, div {
margin: 0;
padding: 0;
}
html, body, div.kmui-editor-body {
height: 100%;
-moz-user-select: none;
}
</style>

<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" style="height:100%;width:100%" onselectstart="return false">
</div>
<div id="social"></div>
</body>
<script>
window.km = KM.getKityMinder('kityminder');
</script>

<body>
<div id="kityminder" onselectstart="return false"></div>
<body>

</html>
Loading

0 comments on commit 838632b

Please sign in to comment.