我正在创建一个npm包并使用webpack作为babel,eslint等加载器.但是我假设包的最终编译版本应该只包含那个模块,没有webpackBootstrap.
我当前的包,webpack配置和源代码.我把它剥离下来让它"工作".
我采取的步骤来检查它是否正常工作:
npm install
npm run build
npm install -g .
node
var test = require('test-package');
Run Code Online (Sandbox Code Playgroud)
导致此错误:
Error: Cannot find module 'test-package'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at repl:1:12
at REPLServer.defaultEval (repl.js:248:27)
at bound (domain.js:280:14)
at REPLServer.runBound [as eval] (domain.js:293:12)
at REPLServer.<anonymous> (repl.js:412:12)
at emitOne (events.js:82:20)
Run Code Online (Sandbox Code Playgroud)
我是webpack和npm的新手,所以如果您需要更多信息请告诉我.
我需要生成PDF文档并通过电子邮件发送它们,并通过链接使它们可以访问.通过电子邮件发送是可以的,但我不知道如何创建链接.
由于我使用的是Laravel 4,所有链接都会通过routes.php.那么如何在给定目录中创建指向文件的链接?
<a href="http://my.domain.org/assets/pdf/file.pdf">Link</a>
Run Code Online (Sandbox Code Playgroud)
不起作用,因为laravel不知道这条路线......
我想知道如何在用户选择一天或更改一个月/一年后每天运行一些代码(附加mouseenter事件)?
我试图在这些事件上附上活动
在悬停时,我想在同一行中突出显示第二天(如果存在).
目前,我将moouseenter/mouseleave事件附加到创建datepicker之后的所有日期(内联).
我已经简化了我在JS小提琴中所做的事情.我需要在选择日期之后以及月/年之后更改这些事件.
JS小提琴:http://jsfiddle.net/MartinTale/Xx4GS/2/
$("div").datepicker({
changeMonth: true,
changeYear: true,
inline: true,
altField: "#datep"
});
$("tbody td:not(.ui-state-disabled, .active-calendar-cell)").mouseenter(function (e) {
$(this).closest('td').next().find("a").addClass("hover-calendar-cell");
console.log('test');
});
$("tbody td:not(.ui-state-disabled)").mouseleave(function (e) {
$("a.hover-calendar-cell").removeClass("hover-calendar-cell");
console.log('test out');
});
Run Code Online (Sandbox Code Playgroud)
提前致谢.