mint 0.3.5 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CONTRIBUTING.md +3 -0
  2. package/LICENSE +93 -0
  3. package/README.md +67 -100
  4. package/index.js +2 -0
  5. package/package.json +25 -43
  6. package/.npmignore +0 -11
  7. package/.travis.yml +0 -4
  8. package/MIT-LICENSE +0 -20
  9. package/mint.js +0 -367
  10. package/test/fixtures/docs/markdown.markdown +0 -6
  11. package/test/fixtures/images/facebook.png +0 -0
  12. package/test/fixtures/images/github.png +0 -0
  13. package/test/fixtures/images/linkedIn.png +0 -0
  14. package/test/fixtures/images/twitter.png +0 -0
  15. package/test/fixtures/javascripts/application.js +0 -3
  16. package/test/fixtures/javascripts/coffee.js +0 -4
  17. package/test/fixtures/javascripts/some.extensions.js.coffee.ejs +0 -2
  18. package/test/fixtures/stylesheets/application.css +0 -3
  19. package/test/fixtures/stylesheets/less.css +0 -13
  20. package/test/fixtures/stylesheets/less.less +0 -11
  21. package/test/fixtures/stylesheets/sass.css +0 -2
  22. package/test/fixtures/stylesheets/sass.sass +0 -4
  23. package/test/fixtures/stylesheets/scss.css +0 -12
  24. package/test/fixtures/stylesheets/scss.scss +0 -14
  25. package/test/fixtures/stylesheets/stylus-error.styl +0 -2
  26. package/test/fixtures/stylesheets/stylus.css +0 -13
  27. package/test/fixtures/stylesheets/stylus.styl +0 -14
  28. package/test/fixtures/views/ejs.ejs +0 -1
  29. package/test/fixtures/views/haml-coffee.hamlc +0 -6
  30. package/test/fixtures/views/haml.haml +0 -1
  31. package/test/fixtures/views/handlebars.hbs +0 -1
  32. package/test/fixtures/views/jade.jade +0 -6
  33. package/test/fixtures/views/mustache.mustache +0 -1
  34. package/test/mocha.opts +0 -4
  35. package/vendor/cssmin.js +0 -1
  36. package/vendor/yuicompressor/cssmin.js +0 -353
  37. package/vendor/yuicompressor/cssmin.node.js +0 -11
@@ -0,0 +1,3 @@
1
+ # Mint CLI
2
+
3
+ `mint` is an alias for [@mintlify/cli](https://www.npmjs.com/package/@mintlify/cli).
package/LICENSE ADDED
@@ -0,0 +1,93 @@
1
+ Copyright (c) 2022 Mintlify, Inc.
2
+
3
+ Elastic License 2.0
4
+
5
+ ## Acceptance
6
+
7
+ By using the software, you agree to all of the terms and conditions below.
8
+
9
+ ## Copyright License
10
+
11
+ The licensor grants you a non-exclusive, royalty-free, worldwide,
12
+ non-sublicensable, non-transferable license to use, copy, distribute, make
13
+ available, and prepare derivative works of the software, in each case subject to
14
+ the limitations and conditions below.
15
+
16
+ ## Limitations
17
+
18
+ You may not provide the software to third parties as a hosted or managed
19
+ service, where the service provides users with access to any substantial set of
20
+ the features or functionality of the software.
21
+
22
+ You may not move, change, disable, or circumvent the license key functionality
23
+ in the software, and you may not remove or obscure any functionality in the
24
+ software that is protected by the license key.
25
+
26
+ You may not alter, remove, or obscure any licensing, copyright, or other notices
27
+ of the licensor in the software. Any use of the licensor’s trademarks is subject
28
+ to applicable law.
29
+
30
+ ## Patents
31
+
32
+ The licensor grants you a license, under any patent claims the licensor can
33
+ license, or becomes able to license, to make, have made, use, sell, offer for
34
+ sale, import and have imported the software, in each case subject to the
35
+ limitations and conditions in this license. This license does not cover any
36
+ patent claims that you cause to be infringed by modifications or additions to
37
+ the software. If you or your company make any written claim that the software
38
+ infringes or contributes to infringement of any patent, your patent license for
39
+ the software granted under these terms ends immediately. If your company makes
40
+ such a claim, your patent license ends immediately for work on behalf of your
41
+ company.
42
+
43
+ ## Notices
44
+
45
+ You must ensure that anyone who gets a copy of any part of the software from you
46
+ also gets a copy of these terms.
47
+
48
+ If you modify the software, you must include in any modified copies of the
49
+ software prominent notices stating that you have modified the software.
50
+
51
+ ## No Other Rights
52
+
53
+ These terms do not imply any licenses other than those expressly granted in
54
+ these terms.
55
+
56
+ ## Termination
57
+
58
+ If you use the software in violation of these terms, such use is not licensed,
59
+ and your licenses will automatically terminate. If the licensor provides you
60
+ with a notice of your violation, and you cease all violation of this license no
61
+ later than 30 days after you receive that notice, your licenses will be
62
+ reinstated retroactively. However, if you violate these terms after such
63
+ reinstatement, any additional violation of these terms will cause your licenses
64
+ to terminate automatically and permanently.
65
+
66
+ ## No Liability
67
+
68
+ _As far as the law allows, the software comes as is, without any warranty or
69
+ condition, and the licensor will not be liable to you for any damages arising
70
+ out of these terms or the use or nature of the software, under any kind of
71
+ legal claim._
72
+
73
+ ## Definitions
74
+
75
+ The **licensor** is the entity offering these terms, and the **software** is the
76
+ software the licensor makes available under these terms, including any portion
77
+ of it.
78
+
79
+ **you** refers to the individual or entity agreeing to these terms.
80
+
81
+ **your company** is any legal entity, sole proprietorship, or other kind of
82
+ organization that you work for, plus all organizations that have control over,
83
+ are under the control of, or are under common control with that
84
+ organization. **control** means ownership of substantially all the assets of an
85
+ entity, or the power to direct its management and policies by vote, contract, or
86
+ otherwise. Control can be direct or indirect.
87
+
88
+ **your licenses** are all the licenses granted to you for the software under
89
+ these terms.
90
+
91
+ **use** means anything you do with the software requiring one of your licenses.
92
+
93
+ **trademark** means trademarks, service marks, and similar rights.
package/README.md CHANGED
@@ -1,126 +1,93 @@
1
- # Mint.js
1
+ <div align="center">
2
+ <a href="https://mintlify.com">
3
+ <img
4
+ src="https://res.cloudinary.com/mintlify/image/upload/v1665385627/logo-rounded_zuk7q1.svg"
5
+ alt="Mintlify Logo"
6
+ height="64"
7
+ />
8
+ </a>
9
+ <br />
10
+ <p>
11
+ <h3>
12
+ <b>
13
+ Mint CLI
14
+ </b>
15
+ </h3>
16
+ </p>
17
+ <p>
18
+ The Mint CLI is the easiest way to build Mintlify apps from the command line.
19
+ </p>
20
+ <p>
21
+
22
+ [![Website](https://img.shields.io/website?url=https%3A%2F%2Fmintlify.com&logo=mintlify)](https://mintlify.com) [![Tweet](https://img.shields.io/twitter/url?url=https%3A%2F%2Fmintlify.com%2F)](https://twitter.com/intent/tweet?url=&text=Check%20out%20%40mintlify)
23
+ [![Discuss on Slack](https://img.shields.io/badge/chat-on%20Slack-blueviolet)](https://mintlify.com/community)
24
+
25
+ </p>
26
+ <p>
27
+ <sub>
28
+ Built with ❤︎ by
29
+ <a href="https://mintlify.com">
30
+ Mintlify
31
+ </a>
32
+ </sub>
33
+ </p>
34
+ </div>
35
+
36
+ ### Installation
37
+
38
+ Download the Mint CLI using the following command
2
39
 
3
- > Standard Interface to the Node.js Template Engines (JavaScript, CSS, text, etc.).
4
-
5
- [![Build Status](https://secure.travis-ci.org/viatropos/mint.png)](http://travis-ci.org/viatropos/mint)
6
-
7
- ## Install
8
-
9
- ``` bash
10
- npm install mint
11
40
  ```
12
-
13
- ## Engines
14
-
15
- ``` coffeescript
16
- mint = require("mint")
17
- mint.coffee
18
- mint.coffeekup
19
- mint.eco
20
- mint.ejs
21
- mint.haml
22
- mint.hamlcoffee
23
- mint.handlebars
24
- mint.jade
25
- mint.less
26
- mint.stylus
27
- mint.markdown
28
- mint.mustache
29
- mint.uglifyjs
30
- mint.yui
41
+ npm i -g mint
31
42
  ```
32
43
 
33
- ## Example
44
+ ### Development
34
45
 
35
- ``` coffeescript
36
- mint = require('mint')
37
- mint.mustache "{title}!", locals: title: "Hello World", (string) -> console.log(string) #=> "Hello World!"
38
- ```
46
+ #### `mint dev`
39
47
 
40
- or more formally:
48
+ Run this command at the root of your Mintlify project to preview changes locally.
41
49
 
42
- ``` coffeescript
43
- input = fs.readFileSync("./test/fixtures/views/jade.jade", "utf-8")
44
- output = fs.readFileSync("./test/fixtures/views/jade.html", "utf-8")
45
- mint.jade input, {}, (error, result) ->
46
- assert.equal result, output
47
- ```
50
+ Notes
48
51
 
49
- or if you want just to compile a template(**Note**: supports only jade, haml, handlebars, eco, ejs):
52
+ - `mint dev` requires Node v18 or higher.
50
53
 
51
- ``` coffeescript
52
- fn = mint.compile template: input, engine: 'jade' # Function
53
- fn title: 'Title', author: 'Some author' # String, rendered template
54
- ```
54
+ #### Custom Ports
55
55
 
56
- ## API
56
+ Mintlify uses port 3000 by default. You can use the `--port` flag to customize the port Mintlify runs on. For example, use this command to run in port 3333:
57
57
 
58
- ``` coffeescript
59
- mint[engine](string, options, callback)
58
+ ```
59
+ mint dev --port 3333
60
60
  ```
61
61
 
62
- ## Preprocessing
63
-
64
- Sometimes you might need to hack in a feature to the language. Like right now, stylus doesn't support multiline values for css attributes, so you might add it like this:
65
-
66
- ``` coffeescript
67
- input = '''
68
- div
69
- box-shadow: 0 -2px 2px hsl(220, 20%, 40%),
70
- 0 -10px 10px hsl(220, 20%, 20%),
71
- 0 0 15px black,
72
-
73
- inset 0 5px 1px hsla(220, 80%, 10%, 0.4),
74
- inset 0 0 5px hsla(220, 80%, 10%, 0.1),
75
- inset 0 20px 15px hsla(220, 80%, 100%, 1),
76
-
77
- inset 0 1px 0 hsl(219, 20%, 0%),
78
-
79
- inset 0 -50px 50px -40px hsla(220, 80%, 10%, .3), /* gradient to inset */
80
-
81
- inset 0 -1px 0px hsl(220, 20%, 20%),
82
- inset 0 -2px 0px hsl(220, 20%, 40%),
83
- inset 0 -2px 1px hsl(220, 20%, 65%)
84
- '''
62
+ You will see an error like this if you try to run Mintlify in a port that's already taken:
85
63
 
86
- output = '''
87
- div {
88
- box-shadow: 0 -2px 2px #525f7a, 0 -10px 10px #29303d, 0 0 15px #000, inset 0 5px 1px rgba(5,19,46,0.40), inset 0 0 5px rgba(5,19,46,0.10), inset 0 20px 15px #fff, inset 0 1px 0 #000, inset 0 -50px 50px -40px rgba(5,19,46,0.30), inset 0 -1px 0px #29303d, inset 0 -2px 0px #525f7a, inset 0 -2px 1px #94a0b8;
89
- }
64
+ ```
65
+ Error: listen EADDRINUSE: address already in use :::3000
66
+ ```
90
67
 
91
- '''
92
- # locally
93
- options =
94
- preprocessor: (content) ->
95
- content.replace /(\s+)(.*),\s+(?:\/\*.*\*\/)?\s*/mg, (_, indent, attribute) ->
96
- "#{indent}#{attribute.replace(/\s+/g, " ")}, "
68
+ #### Troubleshooting
97
69
 
98
- mint.stylus input, options, (error, result) ->
99
- expect(result).toEqual output
70
+ Steps you can take if the dev CLI is not working (After each step try to run `mint dev` again):
100
71
 
101
- # globally
102
- mint.stylus.preprocessor = (content) ->
103
- content.replace /(\s+)(.*),\s+(?:\/\*.*\*\/)?\s*/mg, (_, indent, attribute) ->
104
- "#{indent}#{attribute.replace(/\s+/g, " ")}, "
72
+ - Make sure you are running in a folder with a `docs.json` file.
73
+ - Run `npm update -g mint` to ensure you have the most recent version of the CLI.
74
+ - Make sure you are using Node v18 or higher.
75
+ - Navigate to the `.mintlify` folder in your home directory and delete its contents.
105
76
 
106
- mint.stylus input, {}, (error, result) ->
107
- expect(result).toEqual output
108
- ```
77
+ ### Additional Commands
109
78
 
110
- ## Test
79
+ #### `mint broken-links`
111
80
 
112
- ``` bash
113
- mocha
114
- ```
81
+ Check for broken internal links in your Mintlify project.
115
82
 
116
- ## License
83
+ #### `mint rename <from> <to>`
117
84
 
118
- (The MIT License)
85
+ Rename a file in a Mintlify project and update all internal link references.
119
86
 
120
- Copyright &copy; 2011 [Lance Pollard](http://twitter.com/viatropos) &lt;lancejpollard@gmail.com&gt;
87
+ #### `mint openapi-check <openapiFilenameOrUrl>`
121
88
 
122
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
89
+ Check your OpenAPI file for errors. You can pass in a filename (e.g. `./openapi.yaml`) or a URL (e.g. `https://petstore3.swagger.io/api/v3/openapi.json`).
123
90
 
124
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
91
+ ### Get Started
125
92
 
126
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
93
+ [Create an account](https://mintlify.com/start) to start using Mintlify for your documentation.
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import { cli as _ } from '@mintlify/cli';
package/package.json CHANGED
@@ -1,55 +1,37 @@
1
1
  {
2
2
  "name": "mint",
3
- "version": "0.3.5",
4
- "description": "Template abstraction framework",
5
- "homepage": "http://github.com/viatropos/mint.js",
6
- "main": "mint.js",
7
- "author": "Lance Pollard <lancejpollard@gmail.com>",
3
+ "version": "4.1.1",
4
+ "description": "The Mintlify CLI",
5
+ "engines": {
6
+ "node": ">=18.0.0"
7
+ },
8
+ "author": "Mintlify, Inc.",
9
+ "bugs": {
10
+ "url": "https://github.com/orgs/mintlify/discussions"
11
+ },
12
+ "license": "Elastic-2.0",
8
13
  "keywords": [
9
- "framework",
10
- "compression",
11
- "node"
12
- ],
13
- "licenses": [
14
- {
15
- "type": "MIT",
16
- "url": "http://mths.be/mit"
17
- }
14
+ "mintlify",
15
+ "mint",
16
+ "cli"
18
17
  ],
19
- "bugs": {
20
- "url": "https://github.com/viatropos/mint.js/issues"
18
+ "type": "module",
19
+ "publishConfig": {
20
+ "access": "public",
21
+ "registry": "https://registry.npmjs.org"
21
22
  },
22
- "repository": {
23
- "type": "git",
24
- "url": "https://github.com/viatropos/mint.js.git"
23
+ "bin": {
24
+ "mint": "index.js",
25
+ "mintlify": "index.js"
25
26
  },
26
- "engines": {
27
- "node": ">= 0.4.0"
27
+ "scripts": {
28
+ "clean:all": "rimraf node_modules"
28
29
  },
29
30
  "dependencies": {
30
-
31
+ "@mintlify/cli": "4.0.518"
31
32
  },
32
33
  "devDependencies": {
33
- "coffee-script": ">= 1.3.1",
34
- "uglify-js": ">= 1.1.1",
35
- "clean-css": ">= 0.3.2",
36
- "mocha": ">= 0.8.1",
37
- "should": ">= 0.3.x",
38
- "chai": ">= 0.3.3",
39
- "sinon": ">= 1.3.1",
40
- "stylus": ">= 0.17.0",
41
- "less": ">= 1.2.x",
42
- "ejs": ">= 0.6.1",
43
- "coffeekup": ">= 0.3.1",
44
- "jade": ">= 0.20.x",
45
- "haml": ">= 0.4.x",
46
- "hamljs": ">= 0.6.x",
47
- "haml-coffee": ">= 0.5.0",
48
- "mustache": ">= 0.4.x",
49
- "handlebars": "*",
50
- "eco": "*"
34
+ "rimraf": "^5.0.1"
51
35
  },
52
- "scripts": {
53
- "test": "node_modules/mocha/bin/mocha $(find test -name \"*Test.coffee\")"
54
- }
36
+ "gitHead": "85eaab3d2e1cd92e6db01cb1a21962f986ca1367"
55
37
  }
package/.npmignore DELETED
@@ -1,11 +0,0 @@
1
- *.coffee
2
- *.html
3
- .DS_Store
4
- .git*
5
- Cakefile
6
- wiki/
7
- examples/
8
- src/
9
- spec/
10
- favicon.ico
11
- Watchfile
package/.travis.yml DELETED
@@ -1,4 +0,0 @@
1
- language: node_js
2
- node_js:
3
- - 0.4
4
- - 0.6
package/MIT-LICENSE DELETED
@@ -1,20 +0,0 @@
1
- Copyright (c) 2011-2012 Lance Pollard <lancejpollard@gmail.com>
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.