Weyland Build Error for DurandalAuth 2.0.1

There's a pretty eye-catching example based on DurandalJS, ASP.NET MVC 5, supported by SPA:

https://durandalauth.azurewebsites.net/

However, the problem with this is that Weyland-powered optimization is not performed for Visual Studio Post-Build events with a message, as shown below.

enter image description here

Which is strange, because the post build event is as follows:

cd $(ProjectDir)
weyland build

Which when executed from the command line works very well:

enter image description here

Why was that? I search all over the network, and all I keep looking for is links to a similar, but (possibly) unrelated problem, when an extra configuration line

"insertRequire: ['main'],"

[EDIT]

I am using Visual Studio 2013 Pro Update 2, no plugins.

I have a git clone of the latest project from DurandalAuth on GitHub using this URL:

git clone https://github.com/yagopv/DurandalAuth.git

: https://github.com/yagopv/durandalauth

post-build visual studio:

cd $(ProjectDir)
weyland build

pastebin: http://pastebin.com/ezpTEPk7

, , , git Clone.

+4
1

, ,

ERR! jshint 52 , ....

WARN: ....

showstoppers, , .

Visual Studio .

, ReSharper.

.js , .task.jshint weyland-config.js

, main-built.js weyland-config.js

.task.uglify App/mail-built.js .task.uglify . main-built.js .. /, .

, , debug = false web.config .

weyland-config.js :

exports.config = function(weyland) {
    weyland.build('main')
        .task.jshint({
            include: 'App/**/*.js',
            exclude: 'App/main-built.js'
        })
        .task.uglifyjs({
            include: ['App/**/*.js', 'Scripts/durandal/**/*.js'],
            exclude: 'App/main-built.js'
        })
        .task.rjs({
            include:['App/**/*.{js,html}', 'Scripts/durandal/**/*.js'],
            loaderPluginExtensionMaps:{
            '.html':'text'
        },
        rjs: {
            name:'../Scripts/almond-custom', //to deploy with require.js, use the build name here instead
            insertRequire: ['main'], //not needed for require
            baseUrl: 'App',
            wrap:true, //not needed for require
            paths: {
                'text': '../Scripts/text',
                'durandal': '../Scripts/durandal',
                'plugins': '../Scripts/durandal/plugins',
                'transitions': '../Scripts/durandal/transitions',
                'knockout': '../Scripts/knockout-3.1.0',
                'bootstrap': '../Scripts/bootstrap',
                'jquery': '../Scripts/jquery-2.1.1',
                'jquery.utilities': '../Scripts/jquery.utilities',
                'toastr': '../Scripts/toastr',
                'stashy': '../Scripts/stashy'
            },
            inlineText: true,
            optimize: 'none',
            pragmas: {
                build: true
            },
            stubModules: ['text'],
            keepBuildDir: true,
            out:'App/main-built.js'
        }
    })
    .task.uglifyjs({
        include: ['../App/main-built.js']
    });
}
+1

Source: https://habr.com/ru/post/1539376/


All Articles