GithubHelp home page GithubHelp logo

Support for tasks about buildify HOT 6 CLOSED

powmedia avatar powmedia commented on May 26, 2024
Support for tasks

from buildify.

Comments (6)

powmedia avatar powmedia commented on May 26, 2024

It's a good idea; probably would be easiest to set up a few CLI commands as shortcuts to the various functions available e.g. buildify . --concat --wrap though syntax could probably be improved to show that these steps would be conducted in order

from buildify.

josdejong avatar josdejong commented on May 26, 2024

It will be a really powerful extension I think.

I was thinking a little bit more like tasks are solved by build tools like ant and jake, where you can define your own tasks and not only some predefined ones. What you write is a regular script like this:

var buildify = require('buildify');

buildify.task({
    name: 'minify',
    depends: ['concat'],
    task: function () {
        console.log('minify task...');
    }
});

buildify.task({
    name: 'concat',
    task: function () {
        console.log('concat task...');
    }
});

Then buildify will execute all created tasks on the next process tick, taking into account command line arguments, and dealing with dependencies between the tasks. You can call your script the regular way:

node mybuildscript.js

but can also provide the task names that you want to run on the command line:

node mybuildscript.js concat

When buildify is installed globally, you could easily run buildify in the root of your project, like:

buildify
buildify concat

in that case buildify will just run the script buildify.js found in the root of the project (could also be some other default name for the build script of course).

I have created a fully working prototype for tasks (just 140 lines of code), if you like I can make a pull request to a separate branch of the buildify project so we can do some experimenting and development on tasks.

from buildify.

powmedia avatar powmedia commented on May 26, 2024

Great, yes please feel free to submit a pull request. Do you have tests?

On 11 Jul 2013, at 11:20, Jos de Jong wrote:

It will be a really powerful extension I think.

I was thinking a little bit more like tasks are solved by build tools like ant and jake, where you can define your own tasks and not only some predefined ones. What you write is a regular script like this:

var buildify = require('buildify');

buildify.task({
name: 'minify',
depends: ['concat'],
task: function () {
console.log('minify task...');
}
});

buildify.task({
name: 'concat',
task: function () {
console.log('concat task...');
}
});
Then buildify will execute all created tasks on the next process tick, taking into account command line arguments, and dealing with dependencies between the tasks. You can call your script the regular way:

node mybuildscript.js
but can also provide the task names that you want to run on the command line:

node mybuildscript.js concat
When buildify is installed globally, you could easily run buildify in the root of your project, like:

buildify
buildify concat
in that case buildify will just run the script buildify.js found in the root of the project (could also be some other default name for the build script of course).

I have created a fully working prototype for tasks (just 140 lines of code), if you like I can make a pull request to a separate branch of the buildify project so we can do some experimenting and development on tasks.


Reply to this email directly or view it on GitHub.

from buildify.

josdejong avatar josdejong commented on May 26, 2024

It's currently just a proof of concept but its actually easier than I expected, I will add tests as well.

Ok nice, then I will clone the project, add the tasks and do a pull request. Would you like this pull request on the master branch or rather in a develop or feature branch?

from buildify.

powmedia avatar powmedia commented on May 26, 2024

Feature branch would be great thanks

On 11 Jul 2013, at 12:36, Jos de Jong wrote:

It's currently just a proof of concept but its actually easier than I expected, I will add tests as well.

Ok nice, then I will clone the project, add the tasks and do a pull request. Would you like this pull request on the master branch or rather in a develop or feature branch?


Reply to this email directly or view it on GitHub.

from buildify.

josdejong avatar josdejong commented on May 26, 2024

See #13

from buildify.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.