Skip to content

Commit

Permalink
Improve Grunt section (#2285)
Browse files Browse the repository at this point in the history
  • Loading branch information
yelliver committed Jul 24, 2023
1 parent 6ef44ab commit f9d0479
Showing 1 changed file with 35 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@ More details: [smrq/tsify](https://github.com/smrq/tsify)

## Grunt

### Install
### Using `grunt-ts` (no longer maintained)

#### Install

```sh
npm install grunt-ts
npm install grunt-ts --save-dev
```

### Basic Gruntfile.js
#### Basic Gruntfile.js

```js
module.exports = function (grunt) {
Expand All @@ -98,6 +100,36 @@ module.exports = function (grunt) {

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

### Using `grunt-browserify` combined with `tsify`

#### Install

```sh
npm install grunt-browserify tsify --save-dev
```

#### Basic Gruntfile.js

```js
module.exports = function (grunt) {
grunt.initConfig({
browserify: {
all: {
src: "src/main.ts",
dest: "dist/main.js",
options: {
plugin: ["tsify"],
},
},
},
});
grunt.loadNpmTasks("grunt-browserify");
grunt.registerTask("default", ["browserify"]);
};
```

More details: [jmreidy/grunt-browserify](https://github.com/jmreidy/grunt-browserify), [TypeStrong/tsify](https://github.com/TypeStrong/tsify)

## Gulp

### Install
Expand Down

0 comments on commit f9d0479

Please sign in to comment.