putaoshu / jdf Goto Github PK
View Code? Open in Web Editor NEWJingdong front-end integrated solution(JDF京东前端开发集成解决方案)
Jingdong front-end integrated solution(JDF京东前端开发集成解决方案)
能否添加一个功能,实现一个工程文件包的上传以及一键本地安装该工程
执行命令
$ jdf install demo & cd jdf_demo & jdf build
jdf error [jdf.getConfig] - config.json format error
Error: `libsass` bindings not found in /usr/local/lib/node_modules/jdf/node_mod
ules/jdf-sass/node-sass/vendor/darwin-x64-51/binding.node. Try reinstalling `no
de-sass`?
at Object.sass.getBinaryPath (/usr/local/lib/node_modules/jdf/node_modules/
jdf-sass/node-sass/lib/extensions.js:148:11)
at Object.<anonymous> (/usr/local/lib/node_modules/jdf/node_modules/jdf-sas
s/node-sass/lib/index.js:16:36)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
at Function.Module._load (module.js:441:3)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/jdf/node_modules/jdf-sas
s/index.js:1:80)
/usr/local/lib/node_modules/jdf/node_modules/jdf-sass/node-sass/lib/extensions.
js:148
发布 压缩代码 jdf 对angular 支持吗?有解决方法吗
jdf error [jdf.getConfig] - config.json format error
TypeError: Cannot read property 'lastIndexOf' of undefined
...
环境:
Ubuntu: 13.10
node: v0.10.32
npm: 1.4.28
操作过程:
按照安装说明安装:
npm install jdf -g --save-dev
bug症状:
安装结束后,输入 jdf -v, 提示 “没有那个文件或目录”
失败的解决尝试:
我试过重新安装 node,包括 apt-get 源中安装 以及编译安装 还有使用预编译的版本,都会出现如上错误。
成功的解决尝试:
npm全局安装后,会在 /usr/local/bin/目录下生成一个名为 jdf 的软连接,打开软连接指向的文件,我的机器上是在路径 /usr/local/lib/node_modules/jdf/bin/jdf
然后复制出 jdf 文件内容,自己新建一个文件,粘贴进文件内容,再删除原jdf文件,最后,把我们建的文件重命名为 jdf,
至此,再在terminal输入 jdf -v ,显示 1.6.0 , 问题解决。
重命名文件后服务器上还会保留原来文件
比如将 a.html 重命名成 b.html
localhost列出目录后还有a.html
在cmd下执行 jdf install demo 一直出现jdf downloading ……………………………………………………………… 不断的出现这个
咋回事? 还有一个问题就是jdf.js中的require('fs'); 这个在文件中没使用的到吧 这个可以去掉吧
例如
{%widget name="header" type="tpl"%}
只需要应用tpl的情况,实际页面输出仍然 包含了css 等资源。
jdf version 1.3.12
MacBook-Pro:jdf Alain$ jdf -v
env: node\r: No such file or directory
请问我用npm install jdf -g 提示安装完成后,输入 jdf -v, 提示以上错误,找不到原因,请指教。
合并背景的路径希望能得到解决
要不 生成后还得重新再去改一次路径 很不方便
另外有个小问题
就是 如果有不同的scss 文件 比如果 index.scss 然后又import test.scss 生成的背景图会有两份 并且有重复 这个不知道如何 避免
config.js里的几个相关配置项
"cssImagesUrlReplace": false, "cssCombo": false, "combineWidgetCss":true
配置后所有widget中的css会合并为根目录css文件夹中的widget.css。
但是widget.css中内容为undefined。
文档提到:“编码统一化,即无论当前文件格式是gbk,gb2312,utf8,utf8-bom,统一输出utf8”
但是我翻看源代码也没看见代码里哪个地方把gbk转变成utf8啊?
jdf 已经是一个构建工具了,为什么不用commonjs的规范来写js,然后在构建过程中把依赖分析好,这样,对于在线上运行时,就可以省掉依赖分析这个步骤,也不用seajs等前端的模块化框架了。
jdf u 的时候字体文件不能被上传到服务器
编译以下代码的时候第二个src不会被加上绝对路径
@font-face {
font-family: 'iconfont';
src: url(/css/i/iconfont.eot); /* IE9_/
src: url(/css/i/iconfont.eot?#iefix) format('embedded-opentype'), /_ IE6-IE8 /
url(/css/i/iconfont.woff) format('woff'), / chrome、firefox /
url(/css/i/iconfont.ttf) format('truetype'), / chrome、firefox、opera、Safari, Android, iOS 4.2+/
url(/css/i/iconfont.svg#iconfont) format('svg'); / iOS 4.1- */
}
VM 模板里面可否提供一个全局方法,用来动态加载广告位。这样的话在调试广告位的时候会相当方便。
sth.getAd('2_789_5238'); // 单个广告位
sth.getAds('2_789_5238-2_789_5238-2_789_5238'); // 批量广告位
如此想必是极好的^!^
jdf build 会把 widgetName 下面的所有文件 copy 到 build 目录,应该只copy widgetName 相关的文件吧。
hi,我是金融这边前端开发,想请教咱们有私有npm包管理服务器吗?
QQ:631359926
"imagesSuffix"配置项设置为1和2的时候无效
/*
0:不添加任何后缀
1:给css中需要cssSprite的背景图添加后缀,后缀会被添加在文件扩展名的后面。例如:test.png => test.png?20150319161000
2:给css中需要cssSprite的背景图添加后缀,后缀会被添加在文件名的后面,生成一个新的文件。例如:test.png => test20150319161000.png
*/
jdf可以做首页的静态化么,新人第一次用jdf。
现在JDF的CSS编译好像不会自动加上兼容的前缀,能不能在处理前加上autoprefixer?
现在输出的是windows格式的换行符,上传svn时候经常遇到问题,上传不上去,只能手动转格式之后在上传。建议添加可以配置输出的格式。(这个可以提吗?如果不成就无视我吧。。。)
浏览器推荐用browser-sync,优势明显
安装后执行jdf -v
提示env: node\r: No such file or directory
的错误。
原因应该是在windows下开发的换行符问题,我给转化成Unix的换行符就可以了。
作者可以在MAC下重现调试一下看看。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.