You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 1, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+27-27Lines changed: 27 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
> Runs the [PureScript](https://github.com/purescript/purescript) compiler to produce JavaScript files.
4
4
5
5
## Getting started
6
-
This plugin requires Grunt `~0.4.2` and [PureScript](http://hackage.haskell.org/package/purescript)`>=0.4.7`
6
+
This plugin requires Grunt `~0.4.2` and [PureScript](http://hackage.haskell.org/package/purescript)`>=0.4.9`
7
7
8
8
If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
9
9
@@ -37,11 +37,17 @@ grunt.initConfig({
37
37
38
38
### Options
39
39
40
-
#### options.browserNamespace
41
-
Type: `String`
42
-
Default value: `PS`
40
+
#### options.main
41
+
Type: `Boolean` or `String`
42
+
Default value: `false`
43
43
44
-
Invokes the `--browser-namespace` compiler flag with the specified argument. Specifies the namespace that PureScript modules will be exported to when running in the browser.
44
+
Toggles the `--main` compiler flag. Can be set to `true` or the name of a module in which a `main` function resides. When enabled, a call to `main` will be added after all other generated JavaScript. When set to `true`, the module name will be assumed to be `Main`.
45
+
46
+
#### options.modules
47
+
Type: `String` or `Array`
48
+
Default value: none
49
+
50
+
Enables dead code elimination, ensuring that the named module (or list of modules) are included in the generated JavaScript, along with all their dependencies.
45
51
46
52
#### options.codegen
47
53
Type: `String` or `Array`
@@ -55,48 +61,42 @@ Default value: none
55
61
56
62
Invokes the `--externs` compiler flag with the specified argument. Generates a `.e.ps` file for foreign imports.
57
63
58
-
#### options.magicDo
64
+
#### options.browserNamespace
65
+
Type: `String`
66
+
Default value: `PS`
67
+
68
+
Invokes the `--browser-namespace` compiler flag with the specified argument. Specifies the namespace that PureScript modules will be exported to when running in the browser.
69
+
70
+
#### options.noPrelude
59
71
Type: `Boolean`
60
72
Default value: `false`
61
73
62
-
Toggles the `--magic-do` compiler flag. Overloads the `do` keyword to inline calls to `>>=` for the `Eff` monad to generate more efficient code when enabled.
74
+
Toggles the `--no-prelude` compiler flag. Omits the Prelude from the generated JavaScript when enabled.
63
75
64
76
#### options.noOpts
65
77
Type: `Boolean`
66
78
Default value: `false`
67
79
68
80
Toggles the `--no-opts` compiler flag. Skips the optimization phase for the generated JavaScript when enabled.
69
81
70
-
#### options.noPrelude
82
+
#### options.noMagicDo
71
83
Type: `Boolean`
72
84
Default value: `false`
73
85
74
-
Toggles the `--no-prelude` compiler flag. Omits the Prelude from the generated JavaScript when enabled.
86
+
Toggles the `--no-magic-do` compiler flag. Disables overloading of the `do` keyword to inline calls to `>>=` for the `Eff` monad to generate more efficient code.
75
87
76
-
#### options.main
77
-
Type: `Boolean` or `String`
88
+
#### options.noTco
89
+
Type: `Boolean`
78
90
Default value: `false`
79
91
80
-
Toggles the `--main` compiler flag. Can be set to `true` or the name of a module in which a `main` function resides. When enabled, a call to `main` will be added after all other generated JavaScript. When set to `true`, the module name will be assumed to be `Main`.
81
-
82
-
#### options.modules
83
-
Type: `String` or `Array`
84
-
Default value: none
85
-
86
-
Enables dead code elimination, ensuring that the named module (or list of modules) are included in the generated JavaScript, along with all their dependencies.
92
+
Toggles the `--no-tco` compiler flag. Disables tail-call elimination on the generated JavaScript.
87
93
88
94
#### options.runtimeTypeChecks
89
95
Type: `Boolean`
90
96
Default value: `false`
91
97
92
98
Toggles the `--runtime-type-checks` compiler flag. Generates simple runtime type checks for function arguments with simple types when enabled.
93
99
94
-
#### options.tco
95
-
Type: `Boolean`
96
-
Default value: `false`
97
-
98
-
Toggles the `--tco` compiler flag. Performs tail-call elimination on the generated JavaScript when enabled.
99
-
100
100
## The "purescript-make" task
101
101
102
102
### Overview
@@ -120,11 +120,11 @@ grunt.initConfig({
120
120
### Options
121
121
122
122
- options.browserNamespace
123
-
- options.magicDo
124
-
- options.noOpts
125
123
- options.noPrelude
124
+
- options.noOpts
125
+
- options.noMagicDo
126
+
- options.noTco
126
127
- options.runtimeTypeChecks
127
-
- options.tco
128
128
129
129
These options have the same affect as described for the `purescript` task above.
0 commit comments