Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kityminder-core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
吴志俊
kityminder-core
Commits
5b0fd53a
Commit
5b0fd53a
authored
Dec 08, 2014
by
techird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build
parent
73d588ed
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
46 additions
and
12 deletions
+46
-12
.gitignore
.gitignore
+1
-0
Gruntfile.js
Gruntfile.js
+34
-2
example.html
example.html
+6
-4
kity
lib/kity
+1
-1
kity.js
src/core/kity.js
+1
-1
utils.js
src/core/utils.js
+1
-1
kityminder.js
src/kityminder.js
+2
-3
No files found.
.gitignore
View file @
5b0fd53a
...
@@ -3,5 +3,6 @@
...
@@ -3,5 +3,6 @@
*.sublime-project
*.sublime-project
*.sublime-workspace
*.sublime-workspace
dist/
dist/
release/
node_modules/
node_modules/
_drafts/
_drafts/
\ No newline at end of file
Gruntfile.js
View file @
5b0fd53a
...
@@ -8,6 +8,7 @@ module.exports = function(grunt) {
...
@@ -8,6 +8,7 @@ module.exports = function(grunt) {
// These plugins provide necessary tasks.
// These plugins provide necessary tasks.
/* [Build plugin & task ] ------------------------------------*/
/* [Build plugin & task ] ------------------------------------*/
grunt
.
loadNpmTasks
(
'grunt-module-dependence'
);
grunt
.
loadNpmTasks
(
'grunt-module-dependence'
);
grunt
.
loadNpmTasks
(
'grunt-contrib-clean'
);
grunt
.
loadNpmTasks
(
'grunt-contrib-concat'
);
grunt
.
loadNpmTasks
(
'grunt-contrib-concat'
);
grunt
.
loadNpmTasks
(
'grunt-contrib-uglify'
);
grunt
.
loadNpmTasks
(
'grunt-contrib-uglify'
);
...
@@ -22,12 +23,19 @@ module.exports = function(grunt) {
...
@@ -22,12 +23,19 @@ module.exports = function(grunt) {
' * ====================================================
\
n'
+
' * ====================================================
\
n'
+
' */
\
n
\
n'
;
' */
\
n
\
n'
;
var
expose
=
'
\
nuse(
\'
kityminder
\'
);
\
n'
;
// Project configuration.
// Project configuration.
grunt
.
initConfig
({
grunt
.
initConfig
({
// Metadata.
// Metadata.
pkg
:
grunt
.
file
.
readJSON
(
'package.json'
),
pkg
:
grunt
.
file
.
readJSON
(
'package.json'
),
clean
:
{
last
:
'release'
},
// resolve dependence
dependence
:
{
dependence
:
{
options
:
{
options
:
{
base
:
'src'
,
base
:
'src'
,
...
@@ -36,15 +44,39 @@ module.exports = function(grunt) {
...
@@ -36,15 +44,39 @@ module.exports = function(grunt) {
merge
:
{
merge
:
{
files
:
[{
files
:
[{
src
:
'src/**/*.js'
,
src
:
'src/**/*.js'
,
dest
:
'release/kityminder.
all
.js'
dest
:
'release/kityminder.
core
.js'
}]
}]
}
}
},
// concat
concat
:
{
closure
:
{
options
:
{
banner
:
banner
+
'(function () {
\
n'
,
footer
:
expose
+
'})();'
},
files
:
{
'release/kityminder.core.js'
:
[
'release/kityminder.core.js'
]
}
}
},
uglify
:
{
options
:
{
banner
:
banner
},
minimize
:
{
files
:
{
'release/kityminder.core.min.js'
:
'release/kityminder.core.js'
}
}
}
}
});
});
// Build task(s).
// Build task(s).
grunt
.
registerTask
(
'default'
,
[
'
dependence
'
]);
grunt
.
registerTask
(
'default'
,
[
'
clean'
,
'dependence'
,
'concat'
,
'uglify
'
]);
};
};
\ No newline at end of file
example.html
View file @
5b0fd53a
...
@@ -26,6 +26,8 @@
...
@@ -26,6 +26,8 @@
right
:
210px
;
right
:
210px
;
}
}
</style>
</style>
<script
type=
"text/javascript"
src=
"lib/kity/dist/kity.min.js"
></script>
</head>
</head>
<body>
<body>
<div
id=
"minder-view"
></div>
<div
id=
"minder-view"
></div>
...
@@ -51,12 +53,12 @@ seajs.use('start');
...
@@ -51,12 +53,12 @@ seajs.use('start');
<!-- *********************** 打包文件引入(需要先 grunt 发布) ************************* -->
<!-- *********************** 打包文件引入(需要先 grunt 发布) ************************* -->
<!--
<!--
<script type="text/javascript" src="../release/kityminder.core.min.js"></script>
<script type="text/javascript" src="../release/kityminder.all.min.js">
<script type="text/javascript">
<script type="text/javascript">
// 创建 km 实例
// 创建 km 实例
window.km = new kityminder.Minder('minder-view');
window.km = new kityminder.Minder({
renderTo: 'minder-view'
});
</script>
</script>
-->
-->
</html>
</html>
\ No newline at end of file
kity
@
2b98770c
Subproject commit
37bf46da77a793cba3dde1a78dd83918c12f94ae
Subproject commit
2b98770cf42c20cdc863b95b40911943baa20453
src/core/kity.js
View file @
5b0fd53a
...
@@ -7,5 +7,5 @@
...
@@ -7,5 +7,5 @@
* @copyright: Baidu FEX, 2014
* @copyright: Baidu FEX, 2014
*/
*/
define
(
function
(
require
,
exports
,
module
)
{
define
(
function
(
require
,
exports
,
module
)
{
module
.
exports
=
require
(
'../../lib/kity/src/kity.js'
)
;
module
.
exports
=
window
.
kity
;
});
});
\ No newline at end of file
src/core/utils.js
View file @
5b0fd53a
define
(
function
(
require
,
exports
)
{
define
(
function
(
require
,
exports
)
{
var
kity
=
require
(
'.
./../lib/kity/src
/kity.js'
);
var
kity
=
require
(
'./kity.js'
);
var
uuidMap
=
{};
var
uuidMap
=
{};
exports
.
extend
=
kity
.
Utils
.
extend
.
bind
(
kity
.
Utils
);
exports
.
extend
=
kity
.
Utils
.
extend
.
bind
(
kity
.
Utils
);
...
...
src/kityminder.js
View file @
5b0fd53a
...
@@ -8,13 +8,12 @@
...
@@ -8,13 +8,12 @@
*/
*/
define
(
function
(
require
,
exports
,
module
)
{
define
(
'kityminder'
,
function
(
require
,
exports
,
module
)
{
var
kityminder
=
{
var
kityminder
=
{
version
:
require
(
'core/minder'
).
version
version
:
require
(
'core/minder'
).
version
};
};
// 核心导出,大写的部分导出类,小写的部分简单 require 一下
// 核心导出,大写的部分导出类,小写的部分简单 require 一下
require
(
'core/kity'
);
require
(
'core/utils'
);
require
(
'core/utils'
);
kityminder
.
Minder
=
require
(
'core/minder'
);
kityminder
.
Minder
=
require
(
'core/minder'
);
kityminder
.
Command
=
require
(
'core/command'
);
kityminder
.
Command
=
require
(
'core/command'
);
...
@@ -85,5 +84,5 @@ define(function(require, exports, module) {
...
@@ -85,5 +84,5 @@ define(function(require, exports, module) {
require
(
'template/right'
);
require
(
'template/right'
);
require
(
'template/fish-bone'
);
require
(
'template/fish-bone'
);
module
.
exports
=
kityminder
;
module
.
exports
=
window
.
kityminder
=
kityminder
;
});
});
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment