Skip to content

Commit

Permalink
Merge 681e36d into f3f0548
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyhallett committed Mar 27, 2019
2 parents f3f0548 + 681e36d commit a5dec1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/getting-started/2-javascript-and-gulpfiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A gulpfile is a file in your project directory titled `gulpfile.js` (or capitali

## Transpilation

You can write a gulpfile using a language that requires transpilation, like TypeScript or Babel, by changing the extension on your `gulpfile.js` to indicate the language and install the matching transpiler module.
You can write a gulpfile using a language that requires transpilation, like TypeScript or Babel, by changing the extension on your `gulpfile.js` file or folder ( see Splitting a gulpfile ) to indicate the language and install the matching transpiler module.

* For TypeScript, rename to `gulpfile.ts` and install the [ts-node][ts-node-module] module.
* For Babel, rename to `gulpfile.babel.js` and install the [@babel/register][babel-register-module] module.
Expand All @@ -28,7 +28,7 @@ Many users start by adding all logic to a gulpfile. If it ever grows too big, it

Each task can be split into its own file, then imported into your gulpfile for composition. Not only does this keep things organized, but it allows you to test each task independently or vary composition based on conditions.

Node's module resolution allows you to replace your `gulpfile.js` file with a directory named `gulpfile.js` that contains an `index.js` file which is treated as a `gulpfile.js`. This directory could then contain your individual modules for tasks.
Node's module resolution allows you to replace your `gulpfile.js` file with a directory named `gulpfile.js` that contains an `index.js` file which is treated as a `gulpfile.js`. This directory could then contain your individual modules for tasks. If you are using a transpiler then name the folder and file accordingly.

[gulpfile-transpilation-advanced]: ../documentation-missing.md
[ts-node-module]: https://www.npmjs.com/package/ts-node
Expand Down

0 comments on commit a5dec1d

Please sign in to comment.