crcn / capirona Goto Github PK
View Code? Open in Web Editor NEWJavascript Build System
Javascript Build System
would set variable scope, along with parsing data.
@symbolTable.get("taskConfigVar", { parseRelativePath: true, parseTpl: true }); //parse this
see loadTask, and baseTask
Useful for testing servers.
Example:
{
"run": {
"parallel": true,
"chain": [
{
"exec": "./bin/api --type=master"
},
{
"exec":"./bin/api --type=slave"
},
{
"exec": "node ./server"
}
]
}
}
should:
example:
module.exports = {
tasks: {
sayHello: function() {
}
}
}
e.g:
exports.validate = {
'input': path.exists,
'output': path.exists
}
exports.run = function(ops, next){}
This stuff should be doable:
{
"make:{{target}}": {
"include": "./make/{{target}}.json"
}
}
AND
{
"./make/{{target}} -> something": {
"log" : "hello world!"
}
}
Where the pre-processed varaibles are set as defaults which can be overwritten.
ability to execute tasks based on stdin
{
"exec": "node server",
"expect": {
"listening on port (\\d+)": {
"exec": "open http://localhost:<%-$1 %>"
},
"enter in a password": {
"stdin": "some password\n"
}
}
}
Features
This is a common log:
---> make copy
* target hashifyAllHtml
---> make hashify
* target hashifyAllHtml
---> make hashify
* target hashifyAllHtml
---> make hashify
Like so:
{
"someVar": "hello!",
"directories": {
"src": "./src",
"lib": "./lib"
},
"tasks": {
"hello": {
"log": "{{someVar}}!"
}
}
}
input / output for instance may attach a buffer to the target which reads & writes the given file.
Example:
{
make: {
something: function() {
console.log("do something!");
next();
}
}
}
Or:
{
make: {
someVar: 'blah',
task: function() {
console.log("do something!");
next();
}
}
}
e.g:
../makeFile - one level up
./makeFile - current tree
/makeFile - root
example:
{
"each": ["some","data"],
"as": "platform",
"task": {
"log": "<%-platform %>"
}
}
or:
{
"each": ["some","data"],
"value": "v",
"key": "k",
"task": {
"log": "<%-v %>"
}
}
or:
{
"each": { k: 2, k2: 3 },
"value": "v",
"key": "k",
"task": {
"log": "<%-v %>"
}
}
target for instance should have highest priority
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.