├── img ├── cion_info.png ├── touxinag@2x.png ├── button_yue@2x.png ├── cion_juweihui.png ├── icon_dianpu@2x.png ├── icon_lishi@2x.png ├── cion_tianpinghui.png ├── icon_touxiang@2x.png ├── button_dingdan@2x.png ├── button_gouwuche@2x.png ├── icon_guanyuwomen@2x.png ├── icon_kefudianhua@2x.png ├── button_yuyuechaxun@2x.png └── grckbround_touxiangbeijing@2x.png ├── README.md ├── js ├── rem.min.js └── rem.js ├── css └── reset.css ├── test.html └── npm-debug.log /img/cion_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/souying/layout-rem/HEAD/img/cion_info.png -------------------------------------------------------------------------------- /img/touxinag@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/souying/layout-rem/HEAD/img/touxinag@2x.png -------------------------------------------------------------------------------- /img/button_yue@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/souying/layout-rem/HEAD/img/button_yue@2x.png -------------------------------------------------------------------------------- /img/cion_juweihui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/souying/layout-rem/HEAD/img/cion_juweihui.png -------------------------------------------------------------------------------- /img/icon_dianpu@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/souying/layout-rem/HEAD/img/icon_dianpu@2x.png -------------------------------------------------------------------------------- /img/icon_lishi@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/souying/layout-rem/HEAD/img/icon_lishi@2x.png -------------------------------------------------------------------------------- /img/cion_tianpinghui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/souying/layout-rem/HEAD/img/cion_tianpinghui.png -------------------------------------------------------------------------------- /img/icon_touxiang@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/souying/layout-rem/HEAD/img/icon_touxiang@2x.png -------------------------------------------------------------------------------- /img/button_dingdan@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/souying/layout-rem/HEAD/img/button_dingdan@2x.png -------------------------------------------------------------------------------- /img/button_gouwuche@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/souying/layout-rem/HEAD/img/button_gouwuche@2x.png -------------------------------------------------------------------------------- /img/icon_guanyuwomen@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/souying/layout-rem/HEAD/img/icon_guanyuwomen@2x.png -------------------------------------------------------------------------------- /img/icon_kefudianhua@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/souying/layout-rem/HEAD/img/icon_kefudianhua@2x.png -------------------------------------------------------------------------------- /img/button_yuyuechaxun@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/souying/layout-rem/HEAD/img/button_yuyuechaxun@2x.png -------------------------------------------------------------------------------- /img/grckbround_touxiangbeijing@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/souying/layout-rem/HEAD/img/grckbround_touxiangbeijing@2x.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rem.js 2 | 移动端页面满屏自适应方案(采用rem作为单位,设计稿为750 * 1334 或者设计稿为640 * 1334) 3 | > [博客地址](http://www.jiaoyiba.cc) 4 | 5 | [![NPM](https://nodei.co/npm/layout-rem.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/layout-rem/) 6 | * 此方案删除了dpr,保留rem 7 | * 满屏自适应,要求设计稿为750 * 1334 8 | * 单位换算为1rem = 100px 9 | 10 | ## 使用方法 11 | ### 第一种: 12 | 13 | 14 | 20 | 21 | ### 第二种npm下载: 22 | $ npm install --save layout-rem 23 | ### 使用1 24 | import rem from 'layout-rem'; 25 | new Rem({ 26 | desinWidth:750, //750这个值,根据设计师的psd宽度来修改,是多少就写多少,插件默认750 27 | num:100 //100这个值,是1rem = 100px的比例 默认100比1的 可修改自己的比例 计算 28 | }) 29 | 使用2 30 | var rem = require('layout-rem') 31 | var rem = { 32 | desinWidth:750, //750这个值,根据设计师的psd宽度来修改,是多少就写多少,插件默认750 33 | num:100 //100这个值,是1rem = 100px的比例 默认100比1的 可修改自己的比例 计算 34 | } 35 | 36 | ### 推荐使用第一种方法 37 | 38 | > [github地址:](https://github.com/souying/layout-remc) -------------------------------------------------------------------------------- /js/rem.min.js: -------------------------------------------------------------------------------- 1 | ;(function(undefined){var _global;function extend(o,n,override){for(var key in n){if(n.hasOwnProperty(key)&&(!o.hasOwnProperty(key)||override)){o[key]=n[key]}}return o}function Rem(opt){this.init(opt)}Rem.prototype={constructor:this,init:function(opt){var rem={doc:document,win:window,desinWidth:750,num:100};this.rem=extend(rem,opt,true);var r=this.rem.win.document;var m=r.createElement("meta");m.setAttribute("name","viewport");m.setAttribute("content","width=device-width,user-scalable=no,initial-scale="+1+",maximum-scale="+1+",minimum-scale="+1+",minimal-ui");r.head.appendChild(m);var docEl=this.rem.doc.documentElement;var resizeEvt="orientationchange" in window?"orientationchange":"resize";var _self=this;console.log(_self.rem.desinWidth);console.log(_self.rem.num);var recalc=function(){var clientWidth=docEl.clientWidth;if(!clientWidth){return}if(clientWidth>=_self.rem.desinWidth){docEl.style.fontSize="100px"}else{docEl.style.fontSize=_self.rem.num*(clientWidth/_self.rem.desinWidth)+"px"}};if(!_self.rem.doc.addEventListener){return}this.rem.win.addEventListener(resizeEvt,recalc,false);this.rem.doc.addEventListener("DOMContentLoaded",recalc,false)}};_global=(function(){return this||(0,eval)("this")}());if(typeof module!=="undefined"&&module.exports){module.exports=Rem}else{if(typeof define==="function"&&define.amd){define(function(){return Rem})}else{!("Rem" in _global)&&(_global.Rem=Rem)}}}()); -------------------------------------------------------------------------------- /css/reset.css: -------------------------------------------------------------------------------- 1 | html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video { 2 | margin: 0; 3 | padding: 0; 4 | border: 0; 5 | font-size: 100%; 6 | vertical-align: baseline; 7 | outline: 0; 8 | background: transparent; 9 | } 10 | table, caption, tbody, tfoot, thead, tr, th, td { 11 | vertical-align: middle; 12 | } 13 | li { 14 | list-style: none outside none; 15 | } 16 | body { 17 | line-height: 1; 18 | } 19 | :focus { 20 | outline: 1; 21 | } 22 | article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary { 23 | display: block; 24 | } 25 | nav ul { 26 | list-style: none; 27 | } 28 | blockquote, q { 29 | quotes: none; 30 | } 31 | blockquote:before, blockquote:after, q:before, q:after { 32 | content: ""; 33 | content: none; 34 | } 35 | a { 36 | margin: 0; 37 | padding: 0; 38 | border: 0; 39 | font-size: 100%; 40 | vertical-align: baseline; 41 | background: transparent; 42 | } 43 | ins { 44 | text-decoration: none; 45 | color: #000; 46 | background-color: #ff9; 47 | } 48 | mark { 49 | font-weight: bold; 50 | font-style: italic; 51 | color: #000; 52 | background-color: #ff9; 53 | } 54 | del { 55 | text-decoration: line-through; 56 | } 57 | em { 58 | font-style: normal; 59 | } 60 | abbr[title], dfn[title] { 61 | border-bottom: 1px dotted #000; 62 | cursor: help; 63 | } 64 | table { 65 | border-spacing: 0; 66 | border-collapse: collapse; 67 | } 68 | hr { 69 | display: block; 70 | height: 1px; 71 | margin: 1em 0; 72 | padding: 0; 73 | border: 0; 74 | border-top: 1px solid #ccc; 75 | } 76 | input, select { 77 | vertical-align: middle; 78 | } -------------------------------------------------------------------------------- /js/rem.js: -------------------------------------------------------------------------------- 1 | ;(function(undefined) { 2 | "use strict" 3 | var _global; 4 | // 工具函数 5 | // 对象合并函数 6 | function extend(o,n,override) { 7 | for(var key in n){ 8 | if(n.hasOwnProperty(key) && (!o.hasOwnProperty(key) || override)){ 9 | o[key]=n[key]; 10 | } 11 | } 12 | return o; 13 | }; 14 | // 插件构造函数 - 返回数组结构 15 | function Rem(opt){ 16 | // console.log(this.init) 17 | this.init(opt); 18 | }; 19 | //以后内部变量统一前面加 _例如def这个只有内部的变量 , 20 | Rem.prototype = { 21 | constructor: this, 22 | init:function(opt){ 23 | // 默认参数 24 | var rem = { 25 | doc : document, 26 | win : window, 27 | desinWidth:750, 28 | num : 100 29 | }; 30 | this.rem = extend(rem,opt,true); 31 | // console.log(this.settings) 32 | var r = this.rem.win.document; 33 | var m = r.createElement("meta"); 34 | m.setAttribute("name", "viewport"); 35 | m.setAttribute("content", "width=device-width,user-scalable=no,initial-scale=" + 1 + ",maximum-scale=" + 1 + ",minimum-scale=" + 1 +",minimal-ui"); 36 | r.head.appendChild(m); 37 | 38 | var docEl = this.rem.doc.documentElement; 39 | var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize'; 40 | var _self = this; 41 | console.log(_self.rem.desinWidth); 42 | console.log(_self.rem.num) 43 | var recalc = function() { 44 | var clientWidth = docEl.clientWidth; 45 | if (!clientWidth) return; 46 | if (clientWidth >= _self.rem.desinWidth) { //750这个值,根据设计师的psd宽度来修改,是多少就写多少,现在手机端一般是750px的设计稿,如果设计师给的1920的psd,自己用Photoshop等比例缩小 47 | docEl.style.fontSize = '100px'; 48 | } else { 49 | docEl.style.fontSize = _self.rem.num * (clientWidth / _self.rem.desinWidth) + 'px'; //750这个值,根据设计师的psd宽度来修改,是多少就写多少,现在手机端一般是750px的设计稿,如果设计师给的1920的psd,自己用Photoshop等比例缩小 50 | } 51 | }; 52 | 53 | if (!_self.rem.doc.addEventListener) return; 54 | this.rem.win.addEventListener(resizeEvt, recalc, false); 55 | this.rem.doc.addEventListener('DOMContentLoaded', recalc, false); 56 | } 57 | } 58 | 59 | // 最后将插件对象暴露给全局对象 60 | _global = (function(){ return this || (0, eval)('this'); }()); 61 | if (typeof module !== "undefined" && module.exports) { 62 | module.exports = Rem; 63 | } else if (typeof define === "function" && define.amd) { 64 | define(function(){return Rem;}); 65 | } else { 66 | !('Rem' in _global) && (_global.Rem = Rem); 67 | } 68 | }()); -------------------------------------------------------------------------------- /test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 15 | 168 | 169 | 170 |
171 |
172 |
173 | 174 |
175 |
天平管家
176 |
177 |
178 |
179 | 180 | 181 | 182 |
183 | 184 | 185 | 186 |
187 | 188 | 189 | 190 |
191 | 192 | 193 | 194 |
195 |
196 |
197 | 198 | 199 |
我的地址
200 |
201 | 202 | 203 |
关于我们
204 |
205 | 206 | 207 |
208 | 客服电话 209 | 400-0700-016 210 |
211 |
212 |
213 |
214 |
215 | 216 |
217 |
218 | 219 |
220 |
221 | 222 |
223 |
224 | 225 |
226 |
227 |
228 | 229 | -------------------------------------------------------------------------------- /npm-debug.log: -------------------------------------------------------------------------------- 1 | 0 info it worked if it ends with ok 2 | 1 verbose cli [ 'E:\\Program Files\\nodejs\\node.exe', 3 | 1 verbose cli 'E:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 4 | 1 verbose cli 'install', 5 | 1 verbose cli 'layout-rem' ] 6 | 2 info using npm@3.10.10 7 | 3 info using node@v6.10.3 8 | 4 silly loadCurrentTree Starting 9 | 5 silly install loadCurrentTree 10 | 6 silly install readLocalPackageData 11 | 7 silly fetchPackageMetaData layout-rem 12 | 8 silly fetchNamedPackageData layout-rem 13 | 9 silly mapToRegistry name layout-rem 14 | 10 silly mapToRegistry using default registry 15 | 11 silly mapToRegistry registry https://registry.npmjs.org/ 16 | 12 silly mapToRegistry data Result { 17 | 12 silly mapToRegistry raw: 'layout-rem', 18 | 12 silly mapToRegistry scope: null, 19 | 12 silly mapToRegistry escapedName: 'layout-rem', 20 | 12 silly mapToRegistry name: 'layout-rem', 21 | 12 silly mapToRegistry rawSpec: '', 22 | 12 silly mapToRegistry spec: 'latest', 23 | 12 silly mapToRegistry type: 'tag' } 24 | 13 silly mapToRegistry uri https://registry.npmjs.org/layout-rem 25 | 14 verbose request uri https://registry.npmjs.org/layout-rem 26 | 15 verbose request no auth needed 27 | 16 info attempt registry request try #1 at 14:45:03 28 | 17 verbose request using bearer token for auth 29 | 18 verbose request id cc15a460b5ef974e 30 | 19 verbose etag W/"59acefe4-115d" 31 | 20 verbose lastModified Mon, 04 Sep 2017 06:17:08 GMT 32 | 21 http request GET https://registry.npmjs.org/layout-rem 33 | 22 http 304 https://registry.npmjs.org/layout-rem 34 | 23 verbose headers { server: 'nginx/1.10.1', 35 | 23 verbose headers 'last-modified': 'Mon, 04 Sep 2017 06:17:08 GMT', 36 | 23 verbose headers etag: '"59acefe4-115d"', 37 | 23 verbose headers 'cache-control': 'max-age=300', 38 | 23 verbose headers 'accept-ranges': 'bytes', 39 | 23 verbose headers date: 'Mon, 04 Sep 2017 06:41:06 GMT', 40 | 23 verbose headers via: '1.1 varnish', 41 | 23 verbose headers connection: 'keep-alive', 42 | 23 verbose headers 'x-served-by': 'cache-nrt6124-NRT', 43 | 23 verbose headers 'x-cache': 'MISS', 44 | 23 verbose headers 'x-cache-hits': '0', 45 | 23 verbose headers 'x-timer': 'S1504507266.879403,VS0,VE132', 46 | 23 verbose headers vary: 'Accept-Encoding, Accept' } 47 | 24 silly get cb [ 304, 48 | 24 silly get { server: 'nginx/1.10.1', 49 | 24 silly get 'last-modified': 'Mon, 04 Sep 2017 06:17:08 GMT', 50 | 24 silly get etag: '"59acefe4-115d"', 51 | 24 silly get 'cache-control': 'max-age=300', 52 | 24 silly get 'accept-ranges': 'bytes', 53 | 24 silly get date: 'Mon, 04 Sep 2017 06:41:06 GMT', 54 | 24 silly get via: '1.1 varnish', 55 | 24 silly get connection: 'keep-alive', 56 | 24 silly get 'x-served-by': 'cache-nrt6124-NRT', 57 | 24 silly get 'x-cache': 'MISS', 58 | 24 silly get 'x-cache-hits': '0', 59 | 24 silly get 'x-timer': 'S1504507266.879403,VS0,VE132', 60 | 24 silly get vary: 'Accept-Encoding, Accept' } ] 61 | 25 verbose etag https://registry.npmjs.org/layout-rem from cache 62 | 26 verbose get saving layout-rem to C:\Users\Administrator\AppData\Roaming\npm-cache\registry.npmjs.org\layout-rem\.cache.json 63 | 27 verbose correctMkdir C:\Users\Administrator\AppData\Roaming\npm-cache correctMkdir not in flight; initializing 64 | 28 silly install normalizeTree 65 | 29 silly loadCurrentTree Finishing 66 | 30 silly loadIdealTree Starting 67 | 31 silly install loadIdealTree 68 | 32 silly cloneCurrentTree Starting 69 | 33 silly install cloneCurrentTreeToIdealTree 70 | 34 silly cloneCurrentTree Finishing 71 | 35 silly loadShrinkwrap Starting 72 | 36 silly install loadShrinkwrap 73 | 37 silly loadShrinkwrap Finishing 74 | 38 silly loadAllDepsIntoIdealTree Starting 75 | 39 silly install loadAllDepsIntoIdealTree 76 | 40 silly resolveWithNewModule layout-rem@1.0.2 checking installable status 77 | 41 silly cache add args [ 'layout-rem', null ] 78 | 42 verbose cache add spec layout-rem 79 | 43 silly cache add parsed spec Result { 80 | 43 silly cache add raw: 'layout-rem', 81 | 43 silly cache add scope: null, 82 | 43 silly cache add escapedName: 'layout-rem', 83 | 43 silly cache add name: 'layout-rem', 84 | 43 silly cache add rawSpec: '', 85 | 43 silly cache add spec: 'latest', 86 | 43 silly cache add type: 'tag' } 87 | 44 silly addNamed layout-rem@latest 88 | 45 verbose addNamed "latest" is being treated as a dist-tag for layout-rem 89 | 46 info addNameTag [ 'layout-rem', 'latest' ] 90 | 47 silly mapToRegistry name layout-rem 91 | 48 silly mapToRegistry using default registry 92 | 49 silly mapToRegistry registry https://registry.npmjs.org/ 93 | 50 silly mapToRegistry data Result { 94 | 50 silly mapToRegistry raw: 'layout-rem', 95 | 50 silly mapToRegistry scope: null, 96 | 50 silly mapToRegistry escapedName: 'layout-rem', 97 | 50 silly mapToRegistry name: 'layout-rem', 98 | 50 silly mapToRegistry rawSpec: '', 99 | 50 silly mapToRegistry spec: 'latest', 100 | 50 silly mapToRegistry type: 'tag' } 101 | 51 silly mapToRegistry uri https://registry.npmjs.org/layout-rem 102 | 52 verbose addNameTag registry:https://registry.npmjs.org/layout-rem not in flight; fetching 103 | 53 verbose get https://registry.npmjs.org/layout-rem not expired, no request 104 | 54 silly addNameTag next cb for layout-rem with tag latest 105 | 55 silly addNamed layout-rem@1.0.2 106 | 56 verbose addNamed "1.0.2" is a plain semver version for layout-rem 107 | 57 silly cache afterAdd layout-rem@1.0.2 108 | 58 verbose afterAdd C:\Users\Administrator\AppData\Roaming\npm-cache\layout-rem\1.0.2\package\package.json not in flight; writing 109 | 59 verbose correctMkdir C:\Users\Administrator\AppData\Roaming\npm-cache correctMkdir not in flight; initializing 110 | 60 verbose afterAdd C:\Users\Administrator\AppData\Roaming\npm-cache\layout-rem\1.0.2\package\package.json written 111 | 61 silly loadAllDepsIntoIdealTree Finishing 112 | 62 silly loadIdealTree Finishing 113 | 63 silly currentTree layout-rem 114 | 64 silly idealTree layout-rem 115 | 64 silly idealTree `-- layout-rem@1.0.2 116 | 65 silly generateActionsToTake Starting 117 | 66 silly install generateActionsToTake 118 | 67 silly generateActionsToTake Finishing 119 | 68 silly diffTrees action count 1 120 | 69 silly diffTrees add layout-rem@1.0.2 121 | 70 silly decomposeActions action count 8 122 | 71 silly decomposeActions fetch layout-rem@1.0.2 123 | 72 silly decomposeActions extract layout-rem@1.0.2 124 | 73 silly decomposeActions test layout-rem@1.0.2 125 | 74 silly decomposeActions preinstall layout-rem@1.0.2 126 | 75 silly decomposeActions build layout-rem@1.0.2 127 | 76 silly decomposeActions install layout-rem@1.0.2 128 | 77 silly decomposeActions postinstall layout-rem@1.0.2 129 | 78 silly decomposeActions finalize layout-rem@1.0.2 130 | 79 silly runTopLevelLifecycles Starting 131 | 80 silly executeActions Starting 132 | 81 silly install executeActions 133 | 82 silly doSerial global-install 0 134 | 83 silly doParallel fetch 1 135 | 84 verbose correctMkdir C:\Users\Administrator\AppData\Roaming\npm-cache\_locks correctMkdir not in flight; initializing 136 | 85 verbose lock using C:\Users\Administrator\AppData\Roaming\npm-cache\_locks\staging-dcba72bd0c1396b5.lock for C:\Users\Administrator\Desktop\layout-rem\node_modules\.staging 137 | 86 silly doParallel extract 1 138 | 87 silly extract layout-rem@1.0.2 139 | 88 verbose unbuild node_modules\.staging\layout-rem-6e610db5 140 | 89 silly gentlyRm C:\Users\Administrator\Desktop\layout-rem\node_modules\.staging\layout-rem-6e610db5 is being purged from base C:\Users\Administrator\Desktop\layout-rem 141 | 90 verbose gentlyRm don't care about contents; nuking C:\Users\Administrator\Desktop\layout-rem\node_modules\.staging\layout-rem-6e610db5 142 | 91 verbose tar unpack C:\Users\Administrator\AppData\Roaming\npm-cache\layout-rem\1.0.2\package.tgz 143 | 92 verbose tar unpacking to C:\Users\Administrator\Desktop\layout-rem\node_modules\.staging\layout-rem-6e610db5 144 | 93 silly gentlyRm C:\Users\Administrator\Desktop\layout-rem\node_modules\.staging\layout-rem-6e610db5 is being purged 145 | 94 verbose gentlyRm don't care about contents; nuking C:\Users\Administrator\Desktop\layout-rem\node_modules\.staging\layout-rem-6e610db5 146 | 95 silly gunzTarPerm modes [ '777', '666' ] 147 | 96 silly gunzTarPerm extractEntry package.json 148 | 97 silly gunzTarPerm extractEntry README.md 149 | 98 silly gunzTarPerm extractEntry index.js 150 | 99 silly gunzTarPerm extractEntry bin/rem.js 151 | 100 silly gunzTarPerm extractEntry bin/rem.min.js 152 | 101 silly gentlyRm C:\Users\Administrator\Desktop\layout-rem\node_modules\.staging\layout-rem-6e610db5\node_modules is being purged 153 | 102 verbose gentlyRm don't care about contents; nuking C:\Users\Administrator\Desktop\layout-rem\node_modules\.staging\layout-rem-6e610db5\node_modules 154 | 103 silly doParallel preinstall 1 155 | 104 silly preinstall layout-rem@1.0.2 C:\Users\Administrator\Desktop\layout-rem\node_modules\.staging\layout-rem-6e610db5 156 | 105 info lifecycle layout-rem@1.0.2~preinstall: layout-rem@1.0.2 157 | 106 silly lifecycle layout-rem@1.0.2~preinstall: no script for preinstall, continuing 158 | 107 silly doReverseSerial remove 0 159 | 108 silly doSerial move 0 160 | 109 silly doSerial finalize 1 161 | 110 silly finalize C:\Users\Administrator\Desktop\layout-rem\node_modules\layout-rem 162 | 111 silly doSerial build 1 163 | 112 silly build layout-rem@1.0.2 164 | 113 info linkStuff layout-rem@1.0.2 165 | 114 silly linkStuff layout-rem@1.0.2 has C:\Users\Administrator\Desktop\layout-rem\node_modules as its parent node_modules 166 | 115 verbose linkBins layout-rem@1.0.2 167 | 116 verbose link bins [ { 'layout-rem': 'rem.js' }, 168 | 116 verbose link bins 'C:\\Users\\Administrator\\Desktop\\layout-rem\\node_modules\\.bin', 169 | 116 verbose link bins false ] 170 | 117 verbose linkMans layout-rem@1.0.2 171 | 118 verbose unlock done using C:\Users\Administrator\AppData\Roaming\npm-cache\_locks\staging-dcba72bd0c1396b5.lock for C:\Users\Administrator\Desktop\layout-rem\node_modules\.staging 172 | 119 silly rollbackFailedOptional Starting 173 | 120 silly rollbackFailedOptional Finishing 174 | 121 silly runTopLevelLifecycles Finishing 175 | 122 silly install printInstalled 176 | 123 warn enoent ENOENT: no such file or directory, open 'C:\Users\Administrator\Desktop\layout-rem\package.json' 177 | 124 verbose enoent ENOENT: no such file or directory, open 'C:\Users\Administrator\Desktop\layout-rem\package.json' 178 | 124 verbose enoent This is most likely not a problem with npm itself 179 | 124 verbose enoent and is related to npm not being able to find a file. 180 | 125 warn layout-rem No description 181 | 126 verbose If you need help, you may report this error at: 182 | 126 verbose 183 | 127 warn layout-rem No repository field. 184 | 128 verbose If you need help, you may report this error at: 185 | 128 verbose 186 | 129 warn layout-rem No README data 187 | 130 verbose If you need help, you may report this error at: 188 | 130 verbose 189 | 131 warn layout-rem No license field. 190 | 132 verbose If you need help, you may report this error at: 191 | 132 verbose 192 | 133 verbose stack Error: ENOENT: no such file or directory, chmod 'C:\Users\Administrator\Desktop\layout-rem\node_modules\layout-rem\rem.js' 193 | 133 verbose stack at Error (native) 194 | 134 verbose cwd C:\Users\Administrator\Desktop\layout-rem 195 | 135 error Windows_NT 6.1.7601 196 | 136 error argv "E:\\Program Files\\nodejs\\node.exe" "E:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "layout-rem" 197 | 137 error node v6.10.3 198 | 138 error npm v3.10.10 199 | 139 error path C:\Users\Administrator\Desktop\layout-rem\node_modules\layout-rem\rem.js 200 | 140 error code ENOENT 201 | 141 error errno -4058 202 | 142 error syscall chmod 203 | 143 error enoent ENOENT: no such file or directory, chmod 'C:\Users\Administrator\Desktop\layout-rem\node_modules\layout-rem\rem.js' 204 | 144 error enoent ENOENT: no such file or directory, chmod 'C:\Users\Administrator\Desktop\layout-rem\node_modules\layout-rem\rem.js' 205 | 144 error enoent This is most likely not a problem with npm itself 206 | 144 error enoent and is related to npm not being able to find a file. 207 | 145 verbose exit [ -4058, true ] 208 | --------------------------------------------------------------------------------