React入门资源整理

另外,附上我搜集的一些比较实用的学习资料,建议先看这些撸起来,再看什么乱七八糟的awsome系列React入门资源整理

 

React项目新手指南 http://www.w3ctech.com/topic/1496

 2016-05-16 项目笔记记录

 2016-05-18 react 富文本编辑器

1.reactjs 中使用百度Ueditor富文本编辑器

2.http://react-china.org/t/react/2674 富文本编辑器推荐

3.Facebook宣布基于React的富文本编辑器Draft.js开源

 2016-05-19 react 如何删除 node_modules

var fs = require('fs');
var path = process.argv[2] || 'node_modules';
console.log(path );
rmdirSync(path); // 你要删除的目录
console.log('done!');
/**
 * 删除 node 模块目录
 * @param {string} filepath 目录名
 */
function rmdirSync(filepath) {
  if (!fs.existsSync(filepath)) { // 无效路径退出
    return false;
  }
  var files = fs.readdirSync(filepath); // 获取目录下文件
  files.forEach(function (file, i) { // 遍历文件
    var subpath = filepath + '/' + file; // 拼接文件路径
    if (fs.statSync(subpath).isDirectory()) { // 判断目录还是文件
      var newpath = filepath + '/' + i+'' ; // 生成新的目录名
      fs.renameSync(subpath, newpath); // 重命名目录
      rmdirSync(newpath); // 递归遍历目录
    } else {
      fs.unlinkSync(subpath); // 删除文件
      // console.log(subpath);
    }
  });
  fs.rmdirSync(filepath); // 删除目录
  console.log(filepath);
}

复制上面代码到项目下面 然后执行上面的命令 即可删除node_modules,产生无法删除是 长度超出了 

原文地址:https://www.cnblogs.com/zxyun/p/5497003.html