Command line arguments
just-task
uses the best pirate themed command line argument library ever: yargs
, matey! So, rigs get documented pretty much automatically. However, tasks can customize the arguments that are accepted. just-task
exposes these via this.argv
inside a task function.
Command line arguments
just-task
uses the best pirate themed command line argument library ever: yargs
, matey! So, rigs get documented pretty much automatically. However, tasks can customize the arguments that are accepted. just-task
exposes these via this.argv
inside a task function.
Reading arguments
To read the arguments passed in from command line, use the this.argv
object provided by yargs
.
task('pillageMeArgs', function() {
diff --git a/docs/docs/args/index.html b/docs/docs/args/index.html
index 4bc5c39..ad6c645 100644
--- a/docs/docs/args/index.html
+++ b/docs/docs/args/index.html
@@ -27,7 +27,7 @@
};
}
});
-
Command line arguments
just-task
uses the best pirate themed command line argument library ever: yargs
, matey! So, rigs get documented pretty much automatically. However, tasks can customize the arguments that are accepted. just-task
exposes these via this.argv
inside a task function.
Command line arguments
just-task
uses the best pirate themed command line argument library ever: yargs
, matey! So, rigs get documented pretty much automatically. However, tasks can customize the arguments that are accepted. just-task
exposes these via this.argv
inside a task function.
Reading arguments
To read the arguments passed in from command line, use the this.argv
object provided by yargs
.
task('pillageMeArgs', function() {
diff --git a/docs/docs/composition.html b/docs/docs/composition.html
index 352c571..efd4896 100644
--- a/docs/docs/composition.html
+++ b/docs/docs/composition.html
@@ -27,7 +27,7 @@
};
}
});
-
Composition of tasks
Once a project get to be a bit more complex, a build step might consist of multiple sub tasks. This can be achieved with composition. This is the main reason just-task
is made. It simplifies the composition of tasks.
Composition of tasks
Once a project get to be a bit more complex, a build step might consist of multiple sub tasks. This can be achieved with composition. This is the main reason just-task
is made. It simplifies the composition of tasks.
Running tasks in a series
const { task, series } = require('just-task');
diff --git a/docs/docs/composition/index.html b/docs/docs/composition/index.html
index 352c571..efd4896 100644
--- a/docs/docs/composition/index.html
+++ b/docs/docs/composition/index.html
@@ -27,7 +27,7 @@
};
}
});
-
Composition of tasks
Once a project get to be a bit more complex, a build step might consist of multiple sub tasks. This can be achieved with composition. This is the main reason just-task
is made. It simplifies the composition of tasks.
Composition of tasks
Once a project get to be a bit more complex, a build step might consist of multiple sub tasks. This can be achieved with composition. This is the main reason just-task
is made. It simplifies the composition of tasks.
Running tasks in a series
const { task, series } = require('just-task');
diff --git a/docs/docs/condition.html b/docs/docs/condition.html
index 726f51a..b7c63f6 100644
--- a/docs/docs/condition.html
+++ b/docs/docs/condition.html
@@ -27,7 +27,7 @@
};
}
});
-
Controlling Task Flow with Conditionals
Sometimes a just-task.js
would include tasks that are skipped depending on the arguments that are given. Use a condition()
function to decide to run a task or to skip it.
Controlling Task Flow with Conditionals
Sometimes a just-task.js
would include tasks that are skipped depending on the arguments that are given. Use a condition()
function to decide to run a task or to skip it.
Running tasks in a series
As we have seen, tasks can be run in a series.
const { task, series } = require('just-task');
diff --git a/docs/docs/condition/index.html b/docs/docs/condition/index.html
index 726f51a..b7c63f6 100644
--- a/docs/docs/condition/index.html
+++ b/docs/docs/condition/index.html
@@ -27,7 +27,7 @@
};
}
});
-
Controlling Task Flow with Conditionals
Sometimes a just-task.js
would include tasks that are skipped depending on the arguments that are given. Use a condition()
function to decide to run a task or to skip it.
Controlling Task Flow with Conditionals
Sometimes a just-task.js
would include tasks that are skipped depending on the arguments that are given. Use a condition()
function to decide to run a task or to skip it.
Running tasks in a series
As we have seen, tasks can be run in a series.
const { task, series } = require('just-task');
diff --git a/docs/docs/doc-start.html b/docs/docs/doc-start.html
index e4b4911..8a5833a 100644
--- a/docs/docs/doc-start.html
+++ b/docs/docs/doc-start.html
@@ -27,7 +27,7 @@
};
}
});
-
Getting Started with Just ____
Just
is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs. We encourage developers to make just
available locally instead of installing just
as a global tool.
Getting Started with Just ____
Just
is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs. We encourage developers to make just
available locally instead of installing just
as a global tool.
npm i -D just-task
Place some task definitions inside just-task.js
in your root folder (next to package.json):
Getting Started with Just ____
Just
is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs. We encourage developers to make just
available locally instead of installing just
as a global tool.
Getting Started with Just ____
Just
is a build task definition library. It stands on the shoulders of two excellent and well tested libraries: undertaker and yargs. We encourage developers to make just
available locally instead of installing just
as a global tool.
npm i -D just-task
Place some task definitions inside just-task.js
in your root folder (next to package.json):
Logging
just-task
is simple, but it is opinionated. One of the built-in capabilities of just-task
is logging. We feel that this is an important enough of a feature to be available by the library.
Logging
just-task
is simple, but it is opinionated. One of the built-in capabilities of just-task
is logging. We feel that this is an important enough of a feature to be available by the library.
Typically, logging tasks look like the following:
diff --git a/docs/docs/logging/index.html b/docs/docs/logging/index.html index 242616b..faf07b0 100644 --- a/docs/docs/logging/index.html +++ b/docs/docs/logging/index.html @@ -27,7 +27,7 @@ }; } }); - Usage
Logging
just-task
is simple, but it is opinionated. One of the built-in capabilities of just-task
is logging. We feel that this is an important enough of a feature to be available by the library.
Logging
just-task
is simple, but it is opinionated. One of the built-in capabilities of just-task
is logging. We feel that this is an important enough of a feature to be available by the library.
Typically, logging tasks look like the following:
diff --git a/docs/docs/preset-jest.html b/docs/docs/preset-jest.html index 7c3c130..00f8692 100644 --- a/docs/docs/preset-jest.html +++ b/docs/docs/preset-jest.html @@ -27,7 +27,7 @@ }; } }); - Usage
Jest
Jest is one of the most popular testing libraries in the Javascript ecosystem. It is also a preset supported out of the box inside the just-task-preset
library. Similar to the other presets, this task function assumes that you have a jest.config.js
at the root of the project.
Jest
Jest is one of the most popular testing libraries in the Javascript ecosystem. It is also a preset supported out of the box inside the just-task-preset
library. Similar to the other presets, this task function assumes that you have a jest.config.js
at the root of the project.
// just-task.js
import { jestTask } from 'just-task-preset';
task('test', jestTask());
diff --git a/docs/docs/preset-jest/index.html b/docs/docs/preset-jest/index.html
index 7c3c130..00f8692 100644
--- a/docs/docs/preset-jest/index.html
+++ b/docs/docs/preset-jest/index.html
@@ -27,7 +27,7 @@
};
}
});
-
Jest
Jest is one of the most popular testing libraries in the Javascript ecosystem. It is also a preset supported out of the box inside the just-task-preset
library. Similar to the other presets, this task function assumes that you have a jest.config.js
at the root of the project.
Jest
Jest is one of the most popular testing libraries in the Javascript ecosystem. It is also a preset supported out of the box inside the just-task-preset
library. Similar to the other presets, this task function assumes that you have a jest.config.js
at the root of the project.
// just-task.js
import { jestTask } from 'just-task-preset';
task('test', jestTask());
diff --git a/docs/docs/preset-ts.html b/docs/docs/preset-ts.html
index 23a1d10..cfc8a7d 100644
--- a/docs/docs/preset-ts.html
+++ b/docs/docs/preset-ts.html
@@ -27,7 +27,7 @@
};
}
});
-
Typescript
Typescript is a very popular compiler that allows developers to use modern ES6 features as well as a very mature typing system. The benefits are so great that it has become of the first presets supported by the just-task-preset
library.
Typescript
Typescript is a very popular compiler that allows developers to use modern ES6 features as well as a very mature typing system. The benefits are so great that it has become of the first presets supported by the just-task-preset
library.
Given a library with Typescript source code, it might be desirable to have multiple output formats for different audiences. By default, the tscTask()
function looks for the tsconfig.json
present in the project root. The preset higher order function can take in an option that overrides compilation options. The Typescript compiler options are passed to the tsc.js
script.
A list of available options are located at the Typescript documentation site. The options passed into the preset function will be passed in as command line arguments as a string.
// just-task.js
diff --git a/docs/docs/preset-ts/index.html b/docs/docs/preset-ts/index.html
index 23a1d10..cfc8a7d 100644
--- a/docs/docs/preset-ts/index.html
+++ b/docs/docs/preset-ts/index.html
@@ -27,7 +27,7 @@
};
}
});
-
Typescript
Typescript is a very popular compiler that allows developers to use modern ES6 features as well as a very mature typing system. The benefits are so great that it has become of the first presets supported by the just-task-preset
library.
Typescript
Typescript is a very popular compiler that allows developers to use modern ES6 features as well as a very mature typing system. The benefits are so great that it has become of the first presets supported by the just-task-preset
library.
Given a library with Typescript source code, it might be desirable to have multiple output formats for different audiences. By default, the tscTask()
function looks for the tsconfig.json
present in the project root. The preset higher order function can take in an option that overrides compilation options. The Typescript compiler options are passed to the tsc.js
script.
A list of available options are located at the Typescript documentation site. The options passed into the preset function will be passed in as command line arguments as a string.
// just-task.js
diff --git a/docs/docs/preset-tslint.html b/docs/docs/preset-tslint.html
index 8431fd9..e40cf4f 100644
--- a/docs/docs/preset-tslint.html
+++ b/docs/docs/preset-tslint.html
@@ -27,7 +27,7 @@
};
}
});
-
Typescript Lint
Typescript is a very popular compiler. But as the amount of code grows, developers need a way to keep the code looking consistent. tslint
is the de facto linter for TS code.
Typescript Lint
Typescript is a very popular compiler. But as the amount of code grows, developers need a way to keep the code looking consistent. tslint
is the de facto linter for TS code.
// just-task.js
import { tslintTask } from 'just-task-preset';
task('tslint', tslintTask());
diff --git a/docs/docs/preset-tslint/index.html b/docs/docs/preset-tslint/index.html
index 8431fd9..e40cf4f 100644
--- a/docs/docs/preset-tslint/index.html
+++ b/docs/docs/preset-tslint/index.html
@@ -27,7 +27,7 @@
};
}
});
-
Typescript Lint
Typescript is a very popular compiler. But as the amount of code grows, developers need a way to keep the code looking consistent. tslint
is the de facto linter for TS code.
Typescript Lint
Typescript is a very popular compiler. But as the amount of code grows, developers need a way to keep the code looking consistent. tslint
is the de facto linter for TS code.
// just-task.js
import { tslintTask } from 'just-task-preset';
task('tslint', tslintTask());
diff --git a/docs/docs/presets.html b/docs/docs/presets.html
index e0c3a33..751dfe1 100644
--- a/docs/docs/presets.html
+++ b/docs/docs/presets.html
@@ -27,7 +27,7 @@
};
}
});
-
Just Task Presets
Unlike other build libraries, Just strives to be useful from the beginning. You can choose to write your own tasks that call other Node.js tools like Typescript, jest, and webpack. However, Just includes some preset tasks to get you up and running immediately. The included tasks are enough to have a very productive environment without dictating a certain stack to be used with Just.
+Just Task Presets
Unlike other build libraries, Just strives to be useful from the beginning. You can choose to write your own tasks that call other Node.js tools like Typescript, jest, and webpack. However, Just includes some preset tasks to get you up and running immediately. The included tasks are enough to have a very productive environment without dictating a certain stack to be used with Just.
diff --git a/docs/docs/presets/index.html b/docs/docs/presets/index.html index e0c3a33..751dfe1 100644 --- a/docs/docs/presets/index.html +++ b/docs/docs/presets/index.html @@ -27,7 +27,7 @@ }; } }); -NOTE: even though
just-task-preset
interacts withtypescript
, it does not taketypescript
as a dependency. It assumes that the developers will include that in their own projects. This givesjust-task-preset
the flexibility of targeting many different versions of individual build tools without imposing a version on the consumers.
Just Task Presets
Unlike other build libraries, Just strives to be useful from the beginning. You can choose to write your own tasks that call other Node.js tools like Typescript, jest, and webpack. However, Just includes some preset tasks to get you up and running immediately. The included tasks are enough to have a very productive environment without dictating a certain stack to be used with Just.
+Just Task Presets
Unlike other build libraries, Just strives to be useful from the beginning. You can choose to write your own tasks that call other Node.js tools like Typescript, jest, and webpack. However, Just includes some preset tasks to get you up and running immediately. The included tasks are enough to have a very productive environment without dictating a certain stack to be used with Just.
diff --git a/docs/docs/thunk.html b/docs/docs/thunk.html index 9180407..ff1ea04 100644 --- a/docs/docs/thunk.html +++ b/docs/docs/thunk.html @@ -27,7 +27,7 @@ }; } }); -NOTE: even though
just-task-preset
interacts withtypescript
, it does not taketypescript
as a dependency. It assumes that the developers will include that in their own projects. This givesjust-task-preset
the flexibility of targeting many different versions of individual build tools without imposing a version on the consumers.
Higher Order Task Functions
When a project truly gets big enough to have multiple variants of a build, a simple task function might be reused as variants. For example, the just-task-preset
package includes useful collection of task functions like tscTask
. However, these tasks tend of be very generic. tscTask()
is a task function factory. Calling it will generate a task function. But sometimes variations of the same preconfigured task function is needed. We will use a concept called thunk
to create a task function that creates a task function on the fly!
Higher Order Task Functions
When a project truly gets big enough to have multiple variants of a build, a simple task function might be reused as variants. For example, the just-task-preset
package includes useful collection of task functions like tscTask
. However, these tasks tend of be very generic. tscTask()
is a task function factory. Calling it will generate a task function. But sometimes variations of the same preconfigured task function is needed. We will use a concept called thunk
to create a task function that creates a task function on the fly!
Here is an example of a simple usage of a preset task function factory:
const { task } = require('just-task');
const { tscTask } = require('just-task-preset');
diff --git a/docs/docs/thunk/index.html b/docs/docs/thunk/index.html
index 9180407..ff1ea04 100644
--- a/docs/docs/thunk/index.html
+++ b/docs/docs/thunk/index.html
@@ -27,7 +27,7 @@
};
}
});
-
Higher Order Task Functions
When a project truly gets big enough to have multiple variants of a build, a simple task function might be reused as variants. For example, the just-task-preset
package includes useful collection of task functions like tscTask
. However, these tasks tend of be very generic. tscTask()
is a task function factory. Calling it will generate a task function. But sometimes variations of the same preconfigured task function is needed. We will use a concept called thunk
to create a task function that creates a task function on the fly!
Higher Order Task Functions
When a project truly gets big enough to have multiple variants of a build, a simple task function might be reused as variants. For example, the just-task-preset
package includes useful collection of task functions like tscTask
. However, these tasks tend of be very generic. tscTask()
is a task function factory. Calling it will generate a task function. But sometimes variations of the same preconfigured task function is needed. We will use a concept called thunk
to create a task function that creates a task function on the fly!
Here is an example of a simple usage of a preset task function factory:
const { task } = require('just-task');
const { tscTask } = require('just-task-preset');
diff --git a/packages/documentation/website/siteConfig.js b/packages/documentation/website/siteConfig.js
index 7f92a77..fac8fe3 100644
--- a/packages/documentation/website/siteConfig.js
+++ b/packages/documentation/website/siteConfig.js
@@ -73,7 +73,7 @@ const siteConfig = {
// You may provide arbitrary config keys to be used as needed by your
// template. For example, if you need your repo's URL...
- editUrl: 'https://github.com/kenotron/just-task/tree/master/packages/documentation/docs/'
+ editUrl: 'https://github.com/microsoft/just/tree/master/packages/documentation/docs/'
};
module.exports = siteConfig;