Skip to content

Commit f9d0479

Browse files
authored
Improve Grunt section (#2285)
1 parent 6ef44ab commit f9d0479

File tree

1 file changed

+35
-3
lines changed

1 file changed

+35
-3
lines changed

packages/documentation/copy/en/project-config/Integrating with Build Tools.md

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,15 @@ More details: [smrq/tsify](https://github.com/smrq/tsify)
7474

7575
## Grunt
7676

77-
### Install
77+
### Using `grunt-ts` (no longer maintained)
78+
79+
#### Install
7880

7981
```sh
80-
npm install grunt-ts
82+
npm install grunt-ts --save-dev
8183
```
8284

83-
### Basic Gruntfile.js
85+
#### Basic Gruntfile.js
8486

8587
```js
8688
module.exports = function (grunt) {
@@ -98,6 +100,36 @@ module.exports = function (grunt) {
98100

99101
More details: [TypeStrong/grunt-ts](https://github.com/TypeStrong/grunt-ts)
100102

103+
### Using `grunt-browserify` combined with `tsify`
104+
105+
#### Install
106+
107+
```sh
108+
npm install grunt-browserify tsify --save-dev
109+
```
110+
111+
#### Basic Gruntfile.js
112+
113+
```js
114+
module.exports = function (grunt) {
115+
grunt.initConfig({
116+
browserify: {
117+
all: {
118+
src: "src/main.ts",
119+
dest: "dist/main.js",
120+
options: {
121+
plugin: ["tsify"],
122+
},
123+
},
124+
},
125+
});
126+
grunt.loadNpmTasks("grunt-browserify");
127+
grunt.registerTask("default", ["browserify"]);
128+
};
129+
```
130+
131+
More details: [jmreidy/grunt-browserify](https://github.com/jmreidy/grunt-browserify), [TypeStrong/tsify](https://github.com/TypeStrong/tsify)
132+
101133
## Gulp
102134

103135
### Install

0 commit comments

Comments
 (0)