Comments (6)
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.
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.
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.
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.
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.
See #13
from buildify.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from buildify.