codecamp

百度脑图 编译运行

如何编译

1. 安装所有依赖

## 安装必备工具
npm install -g gulp
npm install -g bower

## 自动安装依赖
npm install
bower install

2. 更换graceful-fs版本(对于Node v10.x及以上版本)

npm install graceful-fs

## 如果仍出现"ReferenceError: primordials is not defined" 的错误,
## 则删掉cnpm安装的旧版本
rm -rf node_modules/_graceful-fs@3.0.12@graceful-fs

## 如果某个子模块依赖旧版本graceful-fs,则请根据报错信息,
## 切换到该模块目录下更新。
cd node_modules/<PATH_TO_MODULE_USING_DEPRECATED_GRACEFUL_FS>
npm install graceful-fs@4.x

3. 更换@types/node版本

npm install @types/node@12.x

4. 开始编译

gulp

5. 测试运行

npm run demo
百度脑图 下载与版本
百度脑图 使用帮助
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }