Commit 1ac722b0 authored by Dafrok's avatar Dafrok

完善开发环境

parent eb61a0f7
......@@ -13,6 +13,8 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-browser-sync');
grunt.loadNpmTasks('grunt-contrib-watch');
var pkg = grunt.file.readJSON('package.json');
......@@ -39,6 +41,26 @@ module.exports = function(grunt) {
last: 'dist'
},
// watch
watch: {
files: 'src/**',
tasks: ['build']
},
// browser sync for dev
browserSync: {
bsFiles: {
dist: 'dist/css/*.css',
src: 'src/**'
},
options: {
server: {
baseDir: './',
index: 'dev.html',
watchTask: true
}
}
},
// resolve dependence
dependence: {
options: {
......@@ -88,5 +110,6 @@ module.exports = function(grunt) {
// Build task(s).
grunt.registerTask('build', ['clean', 'dependence', 'concat:build', 'uglify:minimize', 'copy']);
grunt.registerTask('dev', ['browserSync', 'watch']);
};
\ No newline at end of file
......@@ -50,6 +50,17 @@ kityminder-core 依赖于 [kity](https://github.com/fex-team/kity),开发中
bower install
```
## 开发说明
1. 安装 [bower](http://bower.io/#install-bower)
2. 安装 [npm](https://www.npmjs.com/get-npm)
```bash
bower install
npm install
npm run dev
```
## 联系我们
问题和建议反馈:[Github Issues](https://github.com/fex-team/kityminder-core/issues)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -8,6 +8,7 @@
"name": "Baidu FEX",
"url": "http://fex.baidu.com"
},
"license": "BSD-3-Clause",
"repository": {
"type": "git",
"url": "https://github.com/fex-team/kityminder-core.git"
......@@ -20,6 +21,10 @@
"graphic",
"javascript"
],
"scripts": {
"dev": "grunt dev",
"build": "grunt build"
},
"bugs": {
"url": "https://github.com/fex-team/kityminder-core/issues"
},
......@@ -29,22 +34,23 @@
"url": "https://github.com/fex-team/kityminder-core/blob/dev/LICENSE"
}
],
"dependencies": {
"grunt-contrib-copy": "^0.8.0"
},
"dependencies": {},
"devDependencies": {
"cz-conventional-changelog": "^1.1.5",
"grunt": "~0.4.1",
"grunt-browser-sync": "^2.2.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-concat": "~0.5.0",
"grunt-contrib-copy": "~0.5.0",
"grunt-contrib-copy": "~0.8.2",
"grunt-contrib-uglify": "~0.4.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-module-dependence": "~0.2.0",
"grunt-replace": "~0.8.0"
"grunt-replace": "~0.8.0",
"uglify-js": "^2.4.14"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
\ No newline at end of file
}
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