Skip to content

Commit

Permalink
Merge pull request #566 from sanctuary-js/davidchambers/installation
Browse files Browse the repository at this point in the history
documentation: add installation instructions
  • Loading branch information
davidchambers authored Jun 4, 2018
2 parents 06aa2a4 + 251d6d6 commit 0612fad
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@
"S": false,
"Sum": false,
"localStorage": false,
"sanctuary": false
"sanctuary": false,
"window": false
},
"rules": {
"comma-dangle": ["error", "always-multiline"],
"indent": ["off"],
"no-eval": ["off"],
"no-extra-semi": ["off"],
"no-unused-vars": ["error", {"varsIgnorePattern": "^S$"}]
"no-unused-vars": ["error", {"varsIgnorePattern": "^([$]|S)$"}]
}
}
]
Expand Down
29 changes: 29 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,35 @@
//. such as mapping over an object with heterogeneous values. This is possible
//. via selective use of [`unchecked`](#unchecked) functions.
//.
//. ## Installation
//.
//. `npm install sanctuary` will install Sanctuary for use in Node.js.
//.
//. Running Sanctuary in the browser is more involved. One must include a
//. `<script>` for each dependency in addition to one for Sanctuary itself:
//.
//. ```html
//. <script src="vendor/sanctuary-show.js"></script>
//. <script src="vendor/sanctuary-type-identifiers.js"></script>
//. <script src="vendor/sanctuary-type-classes.js"></script>
//. <script src="vendor/sanctuary-either.js"></script>
//. <script src="vendor/sanctuary-maybe.js"></script>
//. <script src="vendor/sanctuary-pair.js"></script>
//. <script src="vendor/sanctuary-def.js"></script>
//. <script src="vendor/sanctuary.js"></script>
//. ```
//.
//. To ensure compatibility one should use the dependency versions specified
//. in __package.json__.
//.
//. For convenience one could define aliases for various modules:
//.
//. ```javascript
//. const S = window.sanctuary;
//. const $ = window.sanctuaryDef;
//. // ...
//. ```
//.
//. ## API

(function(f) {
Expand Down

0 comments on commit 0612fad

Please sign in to comment.