Socket
Socket
Sign inDemoInstall

jake

Package Overview
Dependencies
12
Maintainers
4
Versions
165
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    jake

JavaScript build tool, similar to Make or Rake


Version published
Weekly downloads
12M
increased by3.96%
Maintainers
4
Install size
1.17 MB
Created
Weekly downloads
 

Package description

What is jake?

Jake is a JavaScript build tool for Node.js, similar to Make or Rake. It is designed to automate the building of complex tasks, running shell commands, and managing file operations. Jake can be used for a wide range of automation tasks, from minifying and compiling code to running tests and deploying applications.

What are jake's main functionalities?

Task definition and execution

This feature allows you to define and execute tasks. In the code sample, a default task is defined which depends on another task named 'dependency'. When the default task is run, it first ensures that the 'dependency' task is executed.

"use strict";
let jake = require('jake');

task('default', ['dependency'], function () {
  console.log('Running default task');
});

task('dependency', function () {
  console.log('Running dependency task');
});

File operations

Jake can perform various file operations such as creating directories, copying files, and iterating over sets of files. In this example, a task named 'createFile' is defined to process all JavaScript files in the current directory, create a new directory named 'build', and copy all files from 'src/' to 'build/'.

"use strict";
let jake = require('jake');

task('createFile', function () {
  jake.FileList('*.js').forEach(function (file) {
    console.log('Processing file: ' + file);
  });
  jake.mkdirP('build');
  jake.cpR('src/', 'build/');
});

Running shell commands

Jake allows you to run shell commands directly from your tasks. This example shows a task named 'deploy' that runs a shell command to push changes to the master branch of a git repository. The output of the command is printed to the console.

"use strict";
let jake = require('jake');

task('deploy', function () {
  let command = 'git push origin master';
  jake.exec(command, {printStdout: true}, function () {
    console.log('Deployed to master');
  });
});

Other packages similar to jake

Readme

Source

Jake -- the JavaScript build tool for Node.js

Build Status

Documentation site at http://jakejs.com

Contributing

  1. Install node.
  2. Clone this repository $ git clone git@github.com:jakejs/jake.git.
  3. Install dependencies $ npm install.
  4. Run tests with $ npm test.
  5. Start Hacking!

License

Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)

Keywords

FAQs

Last updated on 20 Apr 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc