How to use jake - 10 common examples

To help you get started, we’ve selected a few jake examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github almende / vis / Jakefile.js View on Github external
task('test', function () {
  // TODO: use a testing suite for testing: nodeunit, mocha, tap, ...
  var filelist = new jake.FileList();
  filelist.include([
    './test/**/*.js'
  ]);

  var files = filelist.toArray();
  files.forEach(function (file) {
    require('./' + file);
  });

  console.log('Executed ' + files.length + ' test files successfully');
});
github josdejong / jsoneditor / Jakefile.js View on Github external
separator: '\n'
  });
  console.log('Created ' + JSONEDITOR_CSS);

  // minify the css file
  write(JSONEDITOR_CSS_MIN, new CleanCSS().minify(String(read(JSONEDITOR_CSS))));

  // create a folder img and copy the icons
  jake.mkdirP('./img');
  jake.cpR(jsoneditorSrc + 'css/img/jsoneditor-icons.png', './img/');
  console.log('Copied jsoneditor-icons.png to ./img/');

  // copy assets
  // concatenate and copy ace files
  var aceSrc = './node_modules/ace/build/src-min/';
  jake.mkdirP(BUILD_ACE);
  concat({
    src: [
          aceSrc + 'ace.js',
          aceSrc + 'ext-searchbox.js',
          aceSrc + 'mode-json.js',
          aceSrc + 'theme-textmate.js',
          jsoneditorSrc + 'js/ace/theme-jsoneditor.js'
    ],
    dest: BUILD_ACE + 'ace.js',
    separator: '\n'
  });
  jake.cpR(aceSrc + 'worker-json.js', BUILD_ACE);

  // copy and minify json lint file
  jake.mkdirP(BUILD_JSONLINT);
  minify({
github josdejong / jsoneditor / Jakefile.js View on Github external
src: [
      jsoneditorSrc + 'css/jsoneditor.css',
      jsoneditorSrc + 'css/contextmenu.css',
      jsoneditorSrc + 'css/menu.css',
      jsoneditorSrc + 'css/searchbox.css'
    ],
    dest: JSONEDITOR_CSS,
    separator: '\n'
  });
  console.log('Created ' + JSONEDITOR_CSS);

  // minify the css file
  write(JSONEDITOR_CSS_MIN, new CleanCSS().minify(String(read(JSONEDITOR_CSS))));

  // create a folder img and copy the icons
  jake.mkdirP('./img');
  jake.cpR(jsoneditorSrc + 'css/img/jsoneditor-icons.png', './img/');
  console.log('Copied jsoneditor-icons.png to ./img/');

  // copy assets
  // concatenate and copy ace files
  var aceSrc = './node_modules/ace/build/src-min/';
  jake.mkdirP(BUILD_ACE);
  concat({
    src: [
          aceSrc + 'ace.js',
          aceSrc + 'ext-searchbox.js',
          aceSrc + 'mode-json.js',
          aceSrc + 'theme-textmate.js',
          jsoneditorSrc + 'js/ace/theme-jsoneditor.js'
    ],
    dest: BUILD_ACE + 'ace.js',
github MapBBCode / mapbbcode / build / build.js View on Github external
'cp -r dist/lib/* ' + mapbb,
        'cat ' + mapbb + 'override.css dist/lib/leaflet.css > ' + mapbb + 'leaflet.css',
		'rm ' + mapbb + 'override.css',
        'cp -r dist/lang ' + mapbb,
        'cp -r src/layers ' + mapbb + 'proprietary',
        'mv ' + mapbb + 'proprietary/LayerList.js ' + mapbb,
        'cp src/handlers/Handler.Length.js ' + mapbb,
        'cp dist/mapbbcode.js ' + mapbb,
        'cp dist/mapbbcode-config.js ' + mapbb,
        'cp dist/mapbbcode-window.html ' + mapbb,
        'rm -f dist/' + archive,
        'cd ' + target + '; zip -r ../' + archive + ' *',
        'rm -r ' + target
    ];
	console.log('Creating ' + archive + '...');
    jake.exec(commands);
};
github microsoft / azure-pipelines-tasks / Tasks / Jake / jakerunner.js View on Github external
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

var jake = require('jake');
var args = process.argv.slice(2);

jake.addListener('complete', function () {
	console.log('Complete.');
});

jake.addListener('start', function () {
	console.log('start.');
});

jake.addListener('error', function (msg, code) {
    console.error('Fatal error: ', msg, code);
});

jake.run.apply(jake, args);
github microsoft / azure-pipelines-tasks / Tasks / Jake / jakerunner.js View on Github external
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

var jake = require('jake');
var args = process.argv.slice(2);

jake.addListener('complete', function () {
	console.log('Complete.');
});

jake.addListener('start', function () {
	console.log('start.');
});

jake.addListener('error', function (msg, code) {
    console.error('Fatal error: ', msg, code);
});

jake.run.apply(jake, args);
github microsoft / azure-pipelines-tasks / Tasks / Jake / jakerunner.js View on Github external
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

var jake = require('jake');
var args = process.argv.slice(2);

jake.addListener('complete', function () {
	console.log('Complete.');
});

jake.addListener('start', function () {
	console.log('start.');
});

jake.addListener('error', function (msg, code) {
    console.error('Fatal error: ', msg, code);
});

jake.run.apply(jake, args);
github josdejong / jsoneditor / Jakefile.js View on Github external
jsoneditorSrc + 'css/jsoneditor.css',
      jsoneditorSrc + 'css/contextmenu.css',
      jsoneditorSrc + 'css/menu.css',
      jsoneditorSrc + 'css/searchbox.css'
    ],
    dest: JSONEDITOR_CSS,
    separator: '\n'
  });
  console.log('Created ' + JSONEDITOR_CSS);

  // minify the css file
  write(JSONEDITOR_CSS_MIN, new CleanCSS().minify(String(read(JSONEDITOR_CSS))));

  // create a folder img and copy the icons
  jake.mkdirP('./img');
  jake.cpR(jsoneditorSrc + 'css/img/jsoneditor-icons.png', './img/');
  console.log('Copied jsoneditor-icons.png to ./img/');

  // copy assets
  // concatenate and copy ace files
  var aceSrc = './node_modules/ace/build/src-min/';
  jake.mkdirP(BUILD_ACE);
  concat({
    src: [
          aceSrc + 'ace.js',
          aceSrc + 'ext-searchbox.js',
          aceSrc + 'mode-json.js',
          aceSrc + 'theme-textmate.js',
          jsoneditorSrc + 'js/ace/theme-jsoneditor.js'
    ],
    dest: BUILD_ACE + 'ace.js',
    separator: '\n'
github howardabrams / jake-utils / minify.js View on Github external
if (!(params.options instanceof Object)) {
            throw new Error('Parameter "options" must be an object.');
        }
    }

    var code = '';
    var separator = params.separator ? String(params.separator) : '';
    var options = params.options || {};

    // header
    if (params.header) {
        code += String(params.header) + separator;
    }

    // src
    var filelist = new jake.FileList();
    filelist.include(params.src);
    var filenames = filelist.toArray();
    var minified = uglify.minify(filenames, options);
    code += minified.code;

    // footer
    if (params.footer) {
        code += separator + String(params.footer);
    }

    // write output
    if (params.dest) {
        write(params.dest, code);
    }

    return {
github cappuccino / cappuccino / Objective-J / CommonJS / lib / objective-j / compiler.js View on Github external
}
        finally
        {
            p.stdin.close();
            p.stdout.close();
            p.stderr.close();
        }

        return fileContents;
    }

    // Preprocess contents into fragments.
    // FIXME: should calculate relative path, etc.
    try
    {
        var sources = new JAKE.FileList("**/*.j"),
            translateFilenameToPath = {},
            otherwayTranslateFilenameToPath = {};

        // Create a filename to filename path dictionary. (For example: CPArray.j -> CPArray/CPArray.j)
        sources.forEach(function(/*String*/ aFilename)
        {
            translateFilenameToPath[FILE.basename(aFilename)] = aFilename;
            otherwayTranslateFilenameToPath[aFilename] = FILE.basename(aFilename);
        }, this);

        var translatedFilename = translateFilenameToPath[aFilePath] ? translateFilenameToPath[aFilePath] : aFilePath,
            otherwayTranslatedFilename = otherwayTranslateFilenameToPath[aFilePath] ? otherwayTranslateFilenameToPath[aFilePath] : aFilePath,
            theTranslatedFilename = otherwayTranslatedFilename ? otherwayTranslatedFilename : translatedFilename,
            absolutePath = FILE.absolute(theTranslatedFilename),
            basePath = absolutePath.substring(0, absolutePath.length - theTranslatedFilename.length);