摘要:分析脚本文件分析去除测试文件分析结果去除测试文件,个真是不少啊,有这个看源码,看见,就知道在哪了
分析脚本
// react 文件分析 var fs = require("fs"), path = require("path"); function log(){ console.log.apply(console, arguments); } var rootPath = "/to/you/path/react-0.14-stable/src"; function readFilePath(dir){ fs.readdir(dir, function(e, files){ var arrayPath = []; files.forEach(function(file){ var filePath = path.resolve(dir + "/" + file); arrayPath.push(filePath); }); arrayPath.forEach(function(file){ fs.stat(file, function(e, stats){ if(stats && stats.isDirectory()){ // 去除测试文件 if(file.indexOf("__tests__") === -1 && file.indexOf("test") === -1){ readFilePath(file); } }else if(stats && stats.isFile()){ var data = file.split(rootPath + "/")[1] + " "; fs.appendFile("files.txt", data, function (err) { log("write success"); }); } }); }); }); } readFilePath(rootPath);分析结果
React.js
package.json
ReactVersion.js
isomorphic/ReactIsomorphic.js
addons/ReactComponentWithPureRenderMixin.js
addons/ReactFragment.js
addons/ReactWithAddons.js
addons/renderSubtreeIntoContainer.js
addons/shallowCompare.js
addons/update.js
isomorphic/children/ReactChildren.js
isomorphic/children/onlyChild.js
isomorphic/children/sliceChildren.js
isomorphic/deprecated/OrderedMap.js
isomorphic/deprecated/ReactPropTransferer.js
isomorphic/deprecated/cloneWithProps.js
addons/link/LinkedStateMixin.js
addons/link/ReactLink.js
addons/transitions/ReactCSSTransitionGroup.js
addons/transitions/ReactCSSTransitionGroupChild.js
addons/transitions/ReactTransitionChildMapping.js
addons/transitions/ReactTransitionEvents.js
addons/transitions/ReactTransitionGroup.js
renderers/dom/ReactDOM.js
renderers/dom/ReactDOMServer.js
shared/stubs/Object.assign.js
shared/utils/CallbackQueue.js
shared/utils/PooledClass.js
shared/utils/ReactErrorUtils.js
shared/utils/Transaction.js
shared/utils/accumulate.js
shared/utils/accumulateInto.js
shared/utils/adler32.js
shared/utils/canDefineProperty.js
shared/utils/deprecated.js
shared/utils/escapeTextContentForBrowser.js
shared/utils/flattenChildren.js
shared/utils/forEachAccumulated.js
shared/utils/getIteratorFn.js
shared/utils/isTextInputElement.js
shared/utils/quoteAttributeValueForBrowser.js
shared/utils/traverseAllChildren.js
isomorphic/classic/class/ReactClass.js
isomorphic/classic/element/ReactDOMFactories.js
isomorphic/classic/element/ReactCurrentOwner.js
isomorphic/classic/element/ReactElement.js
isomorphic/classic/element/ReactElementValidator.js
isomorphic/classic/types/ReactPropTypeLocationNames.js
isomorphic/classic/types/ReactPropTypes.js
isomorphic/classic/types/ReactPropTypeLocations.js
isomorphic/modern/class/ReactDOM.d.ts
isomorphic/modern/class/React.d.ts
isomorphic/modern/class/ReactComponent.js
isomorphic/modern/class/ReactNoopUpdateQueue.js
renderers/dom/client/ClientReactRootIndex.js
renderers/dom/client/ReactBrowserEventEmitter.js
renderers/dom/client/ReactDOMIDOperations.js
renderers/dom/client/ReactDOMSelection.js
renderers/dom/client/ReactEventListener.js
renderers/dom/client/ReactInputSelection.js
renderers/dom/client/ReactMount.js
renderers/dom/client/ReactReconcileTransaction.js
renderers/dom/client/findDOMNode.js
renderers/dom/client/validateDOMNesting.js
renderers/dom/server/ReactMarkupChecksum.js
renderers/dom/server/ReactServerBatchingStrategy.js
renderers/dom/server/ReactServerRendering.js
renderers/dom/server/ReactServerRenderingTransaction.js
renderers/dom/server/ServerReactRootIndex.js
renderers/dom/shared/CSSPropertyOperations.js
renderers/dom/shared/CSSProperty.js
renderers/dom/shared/DOMPropertyOperations.js
renderers/dom/shared/DOMProperty.js
renderers/dom/shared/Danger.js
renderers/dom/shared/HTMLDOMPropertyConfig.js
renderers/dom/shared/ReactBrowserComponentMixin.js
renderers/dom/shared/ReactComponentBrowserEnvironment.js
renderers/dom/shared/ReactDOMComponent.js
renderers/dom/shared/ReactDOMFeatureFlags.js
renderers/dom/shared/ReactDOMTextComponent.js
renderers/dom/shared/ReactDefaultInjection.js
renderers/dom/shared/ReactInjection.js
renderers/dom/shared/SVGDOMPropertyConfig.js
renderers/dom/shared/dangerousStyleValue.js
renderers/shared/event/EventConstants.js
renderers/shared/event/EventPluginRegistry.js
renderers/shared/event/EventPluginHub.js
renderers/shared/event/EventPluginUtils.js
renderers/shared/event/EventPropagators.js
renderers/shared/reconciler/ReactChildReconciler.js
renderers/shared/reconciler/ReactComponentEnvironment.js
renderers/shared/reconciler/ReactCompositeComponent.js
renderers/shared/reconciler/ReactDefaultBatchingStrategy.js
renderers/shared/reconciler/ReactEmptyComponent.js
renderers/shared/reconciler/ReactEmptyComponentRegistry.js
renderers/shared/reconciler/ReactInstanceHandles.js
renderers/shared/reconciler/ReactEventEmitterMixin.js
renderers/shared/reconciler/ReactInstanceMap.js
renderers/shared/reconciler/ReactMultiChild.js
renderers/shared/reconciler/ReactMultiChildUpdateTypes.js
renderers/shared/reconciler/ReactNativeComponent.js
renderers/shared/reconciler/ReactOwner.js
renderers/shared/reconciler/ReactReconciler.js
renderers/shared/reconciler/ReactRef.js
renderers/shared/reconciler/ReactStateSetters.js
renderers/shared/reconciler/ReactRootIndex.js
renderers/shared/reconciler/ReactUpdateQueue.js
renderers/shared/reconciler/ReactUpdates.js
renderers/shared/reconciler/instantiateReactComponent.js
renderers/shared/reconciler/shouldUpdateReactComponent.js
shared/vendor/third_party/webcomponents.js
renderers/dom/client/eventPlugins/BeforeInputEventPlugin.js
renderers/dom/client/eventPlugins/ChangeEventPlugin.js
renderers/dom/client/eventPlugins/DefaultEventPluginOrder.js
renderers/dom/client/eventPlugins/EnterLeaveEventPlugin.js
renderers/dom/client/eventPlugins/FallbackCompositionState.js
renderers/dom/client/eventPlugins/SelectEventPlugin.js
renderers/dom/client/eventPlugins/SimpleEventPlugin.js
renderers/dom/client/eventPlugins/TapEventPlugin.js
renderers/dom/client/syntheticEvents/SyntheticClipboardEvent.js
renderers/dom/client/syntheticEvents/SyntheticCompositionEvent.js
renderers/dom/client/syntheticEvents/SyntheticDragEvent.js
renderers/dom/client/syntheticEvents/SyntheticEvent.js
renderers/dom/client/syntheticEvents/SyntheticFocusEvent.js
renderers/dom/client/syntheticEvents/SyntheticInputEvent.js
renderers/dom/client/syntheticEvents/SyntheticKeyboardEvent.js
renderers/dom/client/syntheticEvents/SyntheticMouseEvent.js
renderers/dom/client/syntheticEvents/SyntheticTouchEvent.js
renderers/dom/client/syntheticEvents/SyntheticUIEvent.js
renderers/dom/client/syntheticEvents/SyntheticWheelEvent.js
renderers/dom/client/utils/DOMChildrenOperations.js
renderers/dom/client/utils/ViewportMetrics.js
renderers/dom/client/utils/getEventCharCode.js
renderers/dom/client/utils/getEventKey.js
renderers/dom/client/utils/getEventModifierState.js
renderers/dom/client/utils/getEventTarget.js
renderers/dom/client/utils/getNodeForCharacterOffset.js
renderers/dom/client/utils/isEventSupported.js
renderers/dom/client/utils/getTextContentAccessor.js
renderers/dom/client/utils/setInnerHTML.js
renderers/dom/client/utils/setTextContent.js
renderers/dom/client/wrappers/AutoFocusUtils.js
renderers/dom/client/wrappers/LinkedValueUtils.js
renderers/dom/client/wrappers/ReactDOMButton.js
renderers/dom/client/wrappers/ReactDOMInput.js
renderers/dom/client/wrappers/ReactDOMOption.js
renderers/dom/client/wrappers/ReactDOMSelect.js
renderers/dom/client/wrappers/ReactDOMTextarea.js
renderers/shared/event/eventPlugins/ResponderEventPlugin.js
renderers/shared/event/eventPlugins/ResponderSyntheticEvent.js
renderers/shared/event/eventPlugins/ResponderTouchHistoryStore.js
去除测试文件,151个真是不少啊,有这个看react 源码,看见 require(‘xx’), 就知道在哪了
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/86232.html
摘要:并不是组件中的任何地方都能够使用获取结构,只对挂载后的组件生效。组件的一个特殊属性,接受一个回调函数作为参数。反之,则表示卸载失败。再看一下这段代码这个回调函数其实是没有参数的,但是,当方法变成异步方法之后,说不定就会向其注入一些参数了。 在react的组件的开发过程中,一般来说,我们并不会真正的去操作dom。只有在顶层组件的渲染的过程中,我们借助ReactDOM.render()方法...
摘要:对于上面这个评论功能,可以粗略地划分成以下几部分评论功能的整体用一个叫的组件包含起来。每个评论列表项由独立的组件负责显示,这个组件被所使用。下一节中我们将介绍小书实战分析评论功能二。 React.js 小书 Lesson14 - 实战分析:评论功能(一) 本文作者:胡子大哈本文原文:http://react.huziketang.com/blog/lesson14 转载请注明出处,保...
摘要:的英文含义是名单种技术的确都是把当做清单使用缓存清单清单打包资源路径清单打包清单只不过是在不同的场景中使用特定的清单来完成某些功能所以,学好英文是多么重要,这样才不会傻傻分不清到底是干啥的 在前端,说到manifest,其实是有歧义的,就我了解的情况来说,manifest可以指代下列含义: html标签的manifest属性: 离线缓存(目前已被废弃) PWA: 将Web应用程序...
摘要:可能在项目正式上线的时候才需要发布配置单文件入口版本新建一个和开发环境不同的是,入口和出口。相应的在的源也要进行修改。加载模块发布配置多文件模式库最好就不要打包进来。因为一般库都是不会改动的。所以这里就要进行库的分离。 react-js开发环境 时间:2016.3.19-12:29作者:三月懒驴基于:react版本:0.14基于:babel版本:6相关代码:github 开始一个项目 ...
摘要:指定启用例如上述代码,就使用和处理了除了以外的。设置当前的为,同样这个配置也可以写在中。设置目录删除注释去除空格去除属性引号复制静态目录将所以可能被请求的静态文件,分别放在目录下。结语本次从零到一,新建了一个脚手架。 react-sample-javascript 为了实现一个可定制化高的react工程,我们往往会自己搭建一个react工程。所以本文会从零开始搭建一个react脚手架工...
阅读 3758·2023-04-25 20:00
阅读 3108·2021-09-22 15:09
阅读 504·2021-08-25 09:40
阅读 3411·2021-07-26 23:38
阅读 2200·2019-08-30 15:53
阅读 1096·2019-08-30 13:46
阅读 2788·2019-08-29 16:44
阅读 2043·2019-08-29 15:32