小编use*_*847的帖子

使用requirejs加载小胡子

我想通过requirejs加载和使用小胡子.

也许这个问题已经问过:
使用RequireJS使用Mustache进行AMD模块加载错误

无论如何,我想弄清楚如何修复我的代码:


main.js

require.config({
    paths: {
        jquery: 'libs/jquery/jquery',
        underscore: 'libs/underscore/underscore-min',
        backbone: 'libs/backbone/backbone-optamd3-min',
        mustache: "libs/mustache/mustache"
    }
});

require([
    'views/app'
    ], function(AppView){
        var app_view = new AppView;
 });
Run Code Online (Sandbox Code Playgroud)

app.js

define([
    'jquery',
    'underscore', 
    'backbone',
    "mustache"
    ], function($, _, Backbone, Mustache) {
        console.log($, _, Backbone, Mustache); // <-- *** Mustache is null ***
        // ......
       }
);
Run Code Online (Sandbox Code Playgroud)

正如你在app.js文件评论中看到的那样,Mustache is null......
我应该使用另一个Mustache库吗?这就是我使用的胡子

javascript mustache requirejs

12
推荐指数
3
解决办法
7576
查看次数

Git:'rebase'不是git命令.看'git --help'

为mac设置了github
,现在我正在尝试使用终端的git命令.

如果我尝试运行该git rebase命令,我会收到以下消息

> cd /Applications/GitHub.app/Contents/Resources/git/bin
> git rebase
git: 'rebase' is not a git command. See 'git --help'.

>git --help
usage: git [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           [-c name=value] [--help]
           <command> [<args>]

The most commonly used git commands are:
...
rebase     Forward-port local commits to the updated upstream head
....
Run Code Online (Sandbox Code Playgroud)

因此,从帮助输出中可以看到选项rebase存在.
我的git有什么问题?

git --version
git version 1.7.8.2
Run Code Online (Sandbox Code Playgroud)

git macos github github-for-mac

5
推荐指数
2
解决办法
3295
查看次数

Github上.发生了身份验证错误.我们无法与服务器同步

我正在使用GitHub for Mac.

现在,如果我尝试执行Sync,我收到以下消息:

An authentication error occurred. We could not sync with the server.
Run Code Online (Sandbox Code Playgroud)

如果我转到以下页面https://github.com/settings/ssh/audit
我收到以下消息:

All your SSH Keys have been verified.
Run Code Online (Sandbox Code Playgroud)

我该怎么做才能解决这个问题?

PS
我已经按照以下步骤取得了成功:http: //help.github.com/linux-set-up-git/

macos sync github github-for-mac

2
推荐指数
1
解决办法
3419
查看次数

标签 统计

github ×2

github-for-mac ×2

macos ×2

git ×1

javascript ×1

mustache ×1

requirejs ×1

sync ×1