Aria Templates Forums
[CLOSED]Aria Templates user manual build - Printable Version

+- Aria Templates Forums (http://ariatemplates.com/forum)
+-- Forum: Public forums (/forumdisplay.php?fid=3)
+--- Forum: Support (/forumdisplay.php?fid=8)
+--- Thread: [CLOSED]Aria Templates user manual build (/showthread.php?tid=173)



[CLOSED]Aria Templates user manual build - donk - 30 January 2014 12:43

Hi,

I wanted to contribute to the AT user manual, but the local build is not working.

When I run the node build cmd, I get following error:

GENERATING DOCUMENTATION
Copying g:\dev\ariatemplates-usermanual\resources\documentation.css to g:\dev\ariatemplates-usermanual\out\documentation.css
BUILDING 1.3.4
Creating conrefs...

g:\dev\ariatemplates-usermanual\node_modules\panda-docs\node_modules\markdown_conrefs\markdown_conrefs.js:37
            var foundFiles = findit.sync(src);
                                    ^
TypeError: Object function walk(dir, opts, emitter, dstat) {
    if (!opts) opts = {};
    var fdir = opts._original || dir;
    opts._original = undefined;

    if (!emitter) {
        emitter = new EventEmitter;
        emitter.stop = function () {
            emitter._stopped = true;
            emitter.emit('stop');
        };
        emitter._pending = 0;
        emitter._seen = {};
    }
    emitter._pending ++;

    if (dstat) {
        var stopped = false;
        emitter.emit('directory', fdir, dstat, function stop () {
            stopped = true;
        });
        emitter.emit('path', fdir, dstat);
        if (!stopped) fs.readdir(dir, onreaddir);
        else check()
    }
    else fs.lstat(dir, function onstat (err, stat) {
        if (emitter._stopped) return;
        if (err) return finish();
        emitter._seen[stat.ino || dir] = true;

        if (stat.isSymbolicLink() && opts.followSymlinks) {
            emitter.emit('link', fdir, stat);
            fs.readlink(dir, function (err, rfile) {
                if (emitter._stopped) return;
                if (err) return finish();
                var file_ = path.resolve(dir, rfile);
                emitter.emit('readlink', fdir, file_);
                fs.lstat(file_, onstat);
            });
        }
        else if (stat.isSymbolicLink()) {
            emitter.emit('link', fdir, stat);
            emitter.emit('path', fdir, stat);
            finish();
        }
        else if (stat.isDirectory()) {
            var stopped = false;
            emitter.emit('directory', fdir, stat, function stop () {
                stopped = true;
            });
            emitter.emit('path', fdir, stat);
            if (!stopped) fs.readdir(dir, onreaddir);
            else check()
        }
        else {
            emitter.emit('file', fdir, stat);
            emitter.emit('path', fdir, stat);
            finish();
        }
    });

    return emitter;

    function check () {
        if (-- emitter._pending === 0) finish();
    }

    function finish () {
        emitter.emit('end');
        emitter._seen = null;
    }

    function onreaddir (err, files) {
        if (emitter._stopped) return;
        emitter._pending --;
        if (err) return check();

        files.forEach(function (rfile) {
            emitter._pending ++;
            var file = path.join(fdir, rfile);

            fs.lstat(file, function (err, stat) {
                if (emitter._stopped) return;
                if (err) check()
                else onstat(file, stat)
            });
        });
    }

    function onstat (file, stat, original) {
        if (emitter._seen[stat.ino || file]) return check();
        emitter._seen[stat.ino || file] = true;

        if (stat.isDirectory()) {
            if (original) opts._original = original;
            walk(file, opts, emitter, stat);
            check();
        }
        else if (stat.isSymbolicLink() && opts.followSymlinks) {
            emitter.emit('link', file, stat);

            fs.readlink(file, function (err, rfile) {
                if (emitter._stopped) return;
                if (err) return check();
                var file_ = path.resolve(path.dirname(file), rfile);

                emitter.emit('readlink', file, file_);
                fs.lstat(file_, function (err, stat_) {
                    if (emitter._stopped) return;
                    if (err) return check();

                    emitter._pending ++;
                    onstat(file_, stat_, file);
                    check();
                });
            });
        }
        else if (stat.isSymbolicLink()) {
            emitter.emit('link', file, stat);
            emitter.emit('path', file, stat);
            check();
        }
        else {
            emitter.emit('file', file, stat);
            emitter.emit('path', file, stat);
            check();
        }
    }
} has no method 'sync'
    at exports.init.files.filter.found (g:\dev\ariatemplates-usermanual\node_modules\panda-docs\node_modules\markdown_conrefs\markdown_conrefs.js:37:
7)
    at Array.forEach (native)
    at Object.exports.init (g:\dev\ariatemplates-usermanual\node_modules\panda-docs\node_modules\markdown_conrefs\markdown_conrefs.js:35:12)
    at panda_docs.make.exports.make.async.series.outAssetsDirName (g:\dev\ariatemplates-usermanual\node_modules\panda-docs\index.js:50:19)
    at async.series.results (g:\dev\ariatemplates-usermanual\node_modules\async\lib\async.js:486:21)
    at _asyncMap (g:\dev\ariatemplates-usermanual\node_modules\async\lib\async.js:185:13)
    at async.forEachSeries.iterate (g:\dev\ariatemplates-usermanual\node_modules\async\lib\async.js:108:13)
    at async.forEachSeries.iterate (g:\dev\ariatemplates-usermanual\node_modules\async\lib\async.js:119:25)
    at _asyncMap (g:\dev\ariatemplates-usermanual\node_modules\async\lib\async.js:187:17)
    at async.series.results (g:\dev\ariatemplates-usermanual\node_modules\async\lib\async.js:491:34)

Any ideas on how to fix this? I suspect the node version might be important or the library has changed?


RE: Aria Templates user manual build - jakub-g - 30 January 2014 12:58

Hi Daniel,

thanks for interest in contributing!
You can follow this guide - I just moved it from private to public section of the forum:

http://ariatemplates.com/forum/showthread.php?tid=126

Cheers,
Jakub


RE: Aria Templates user manual build - jakub-g - 30 January 2014 13:07

BTW
you can use

node build latest instead of node build

which will build just the latest version instead of everything from 1.3.x, 1.4.x and latest. Should be much faster.