Open billwing opened 11 years ago
搞晕了,不知道啥问题,还是将package.json改为:"grunt-cmd-transport": "~0.2.0" 和 "grunt-cmd-concat": "~0.2.0"就好了
@Billwing 这是grunt版本差异,我也发现了,我本地是别人那旧的,npm新的话 在Gruntfile.js里tansport里的idleading改成format
format: 'dist/{{filename}}
{{filename}}
就是本身的文件名
具体我也还没仔细看grunt文档,改成这样,npm install最新的grunt可以构建的
@Billwing 说错了,我本地的才是最新。。- - 原来package.json写的是0.1.0的旧版本 旧版本用上面方式修改 新的直接配置idleading了
嗯嗯,又发现一个问题: config.js:
seajs.config({
// Add plugins
plugins: ['shim'],
// Configure shim for non-CMD modules
shim: {
'jquery': {
exports: 'jQuery'
}
},
// Set aliases for common libraries
alias: {
'jquery': 'lib/jquery.js',
'highcharts' :'lib/highcharts.js',
'kalendae' :'lib/kalendae.js'
},
// 预加载jQuery
preload: ["jquery"]
});
改为:
seajs.config({
// Add plugins
plugins: ['shim'],
// Configure shim for non-CMD modules
// Set aliases for common libraries
alias: {
'jquery': {
src: 'lib/jquery.js',
exports: 'jQuery'
},
'highcharts' :'lib/highcharts.js',
'kalendae' :'lib/kalendae.js'
}
});
这样会报错,TypeError: e is not a function 应该是jquery还没定义到:var e=t("lib/jquery"); 发现jquery是在index.js之后加载的,请问后者的配置有什么问题? PS:我是按最新shim配置的,而且在后面加上preload还会乱码: ...%5Bobject%20Object%5D.js
@Billwing 可以参见我新更新上的congif.js 2.0改变了蛮多貌似 preload里jquery的话不能使用别名,要用真实路径,因为先加载了jquery再加载的shim插件
试过了,貌似还是不行,同样报错:TypeError: e is not a function
@jixiangac 我已经push上去了:https://github.com/Billwing/lili/tree/master/public/js
@Billwing package.json中的
spm : {
alias :
}
直接用别名,不用路径 构建的时候发现
require('lib/jquery')
以致出现了问题,以前的构建好像没问题,直接使用别名 构建后就成了
require('jquery')
这样就对了
确定可以?代码更新了,这回又多了一个问题:文件找不到(这里的别名为啥无效了?是文件目录问题?)。 晕啊,怎么越弄越复杂了。 看了一下seajs examples里面的hello也是运行不了的? https://github.com/seajs/examples/tree/master/static/hello
@jixiangac 不好意思,我的错,原来我没更新你之前seajs文件夹里面的shim插件。。
Connect Your Wallet:
Use the Claim Method:
Claim Your Prize:
Enjoy Your Tokens:
Make sure to read the terms and conditions on the https://claim.mantarewards.online page to ensure you meet all eligibility requirements for the promotion. This offer is for a limited time, so don't miss out!
Winners: @njiang1987, @stevenchu, @amir-ag, @kamboj652, @midhunlohidakshan, @nuta, @null-dev
我是clone你的文件并删除dist,然后本地重新构建了一份,但index.js里面多生成了版本号,如:define("jixiangac/lili/0.0.1/index-debug", ...请问这是什么问题呢?