A magical vite plugin that helps you to generate and manage documentation website.

Overview

vite-plugin-book

A magical vite plugin that helps you to generate and manage documentation website.

⚠️ This project is still WIP. It's a MVP now.

A bunch of new features and improvements will coming soon!

Feature

  • Auto generate documentation website.
  • Write and manage documentation just in browser.
  • Write document in a WYSIWYG way.

Usage

Install

npm install vite-plugin-book

Enable in Config

In vite.config.ts:

import { book } from 'vite-plugin-book/vite';

export default defineConfig({
    plugins: [book()],
});

Create Document Directory

Create a directory called doc in your vite root directory. Then create a index.md file with a first-page.md file.

See the Editor

When running vite in http://localhost:3000, you can open http://localhost:3000/__vite_plugin_book__/ to see the editor.

You can write in editor and it will write to your local disk when clicking the save button.

You can also visit http://localhost:3000/__vite_plugin_book__/?preview=1 to preview the read-only site.

Render in Production

In your code entry:

It's main.ts by default.

import { renderBook } from 'vite-plugin-book';

renderBook(import.meta.env.PROD, document.getElementById('app'));

Add following lines in your index.html's head attribute:

<!-- in head -->
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
    rel="stylesheet"
    href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap"
/>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons+Outlined" />
<link rel="stylesheet" href="https://unpkg.com/prism-themes/themes/prism-material-light.css" />

Then you can preview the result through:

npx vite build
npx vite preview

License

MIT

Comments
  • chore(deps): bump actions/setup-node from 2 to 3

    chore(deps): bump actions/setup-node from 2 to 3

    Bumps actions/setup-node from 2 to 3.

    Release notes

    Sourced from actions/setup-node's releases.

    v3.0.0

    In scope of this release we changed version of the runtime Node.js for the setup-node action and updated package-lock.json file to v2.

    Breaking Changes

    Fix logic of error handling for npm warning and uncaught exception

    In scope of this release we fix logic of error handling related to caching (actions/setup-node#358) and (actions/setup-node#359).

    In the previous behaviour we relied on stderr output to throw error. The warning messages from package managers can be written to the stderr's output. For now the action will throw an error only if exit code differs from zero. Besides, we add logic to сatch and log unhandled exceptions.

    Adding Node.js version file support

    In scope of this release we add the node-version-file input and update actions/cache dependency to the latest version.

    Adding Node.js version file support

    The new input (node-version-file) provides functionality to specify the path to the file containing Node.js's version with such behaviour:

    • If the file does not exist the action will throw an error.
    • If you specify both node-version and node-version-file inputs, the action will use value from the node-version input and throw the following warning: Both node-version and node-version-file inputs are specified, only node-version will be used.
    • For now the action does not support all of the variety of values for Node.js version files. The action can handle values according to the documentation and values with v prefix (v14)
    steps:
      - uses: actions/checkout@v2
      - name: Setup node from node version file
        uses: actions/setup-node@v2
        with:
          node-version-file: '.nvmrc'
      - run: npm install
      - run: npm test
    

    Update actions/cache dependency to 1.0.8 version.

    We updated actions/cache dependency to the latest version (1.0.8). For more information please refer to the toolkit/cache.

    Add "cache-hit" output

    This release introduces a new output: cache-hit (#327).

    The cache-hit output contains boolean value indicating that an exact match was found for the key. It shows that the action uses already existing cache or not. The output is available only if cache is enabled.

    Support caching for mono repos and repositories with complex structure

    This release introduces dependency caching support for mono repos and repositories with complex structure (#305).

    By default, the action searches for the dependency file (package-lock.json or yarn.lock) in the repository root. Use the cache-dependency-path input for cases when multiple dependency files are used, or they are located in different subdirectories. This input supports wildcards or a list of file names for caching multiple dependencies.

    Yaml example:

    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-node@v2
    </tr></table> 
    

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • chore(deps): update all dependencies to v18

    chore(deps): update all dependencies to v18

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | react (source) | ^17.0.2 -> ^18.0.0 | age | adoption | passing | confidence | | react-dom (source) | ^17.0.2 -> ^18.0.0 | age | adoption | passing | confidence |


    Release Notes

    facebook/react

    v18.0.0

    Compare Source

    Below is a list of all new features, APIs, deprecations, and breaking changes. Read React 18 release post and React 18 upgrade guide for more information.

    New Features
    React
    • useId is a new hook for generating unique IDs on both the client and server, while avoiding hydration mismatches. It is primarily useful for component libraries integrating with accessibility APIs that require unique IDs. This solves an issue that already exists in React 17 and below, but it’s even more important in React 18 because of how the new streaming server renderer delivers HTML out-of-order.
    • startTransition and useTransition let you mark some state updates as not urgent. Other state updates are considered urgent by default. React will allow urgent state updates (for example, updating a text input) to interrupt non-urgent state updates (for example, rendering a list of search results).
    • useDeferredValue lets you defer re-rendering a non-urgent part of the tree. It is similar to debouncing, but has a few advantages compared to it. There is no fixed time delay, so React will attempt the deferred render right after the first render is reflected on the screen. The deferred render is interruptible and doesn't block user input.
    • useSyncExternalStore is a new hook that allows external stores to support concurrent reads by forcing updates to the store to be synchronous. It removes the need for useEffect when implementing subscriptions to external data sources, and is recommended for any library that integrates with state external to React.
    • useInsertionEffect is a new hook that allows CSS-in-JS libraries to address performance issues of injecting styles in render. Unless you’ve already built a CSS-in-JS library we don’t expect you to ever use this. This hook will run after the DOM is mutated, but before layout effects read the new layout. This solves an issue that already exists in React 17 and below, but is even more important in React 18 because React yields to the browser during concurrent rendering, giving it a chance to recalculate layout.
    React DOM Client

    These new APIs are now exported from react-dom/client:

    • createRoot: New method to create a root to render or unmount. Use it instead of ReactDOM.render. New features in React 18 don't work without it.
    • hydrateRoot: New method to hydrate a server rendered application. Use it instead of ReactDOM.hydrate in conjunction with the new React DOM Server APIs. New features in React 18 don't work without it.

    Both createRoot and hydrateRoot accept a new option called onRecoverableError in case you want to be notified when React recovers from errors during rendering or hydration for logging. By default, React will use reportError, or console.error in the older browsers.

    React DOM Server

    These new APIs are now exported from react-dom/server and have full support for streaming Suspense on the server:

    • renderToPipeableStream: for streaming in Node environments.
    • renderToReadableStream: for modern edge runtime environments, such as Deno and Cloudflare workers.

    The existing renderToString method keeps working but is discouraged.


    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • fix(deps): update dependency birpc to ^0.2.0

    fix(deps): update dependency birpc to ^0.2.0

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | birpc | ^0.1.0 -> ^0.2.0 | age | adoption | passing | confidence |


    Release Notes

    antfu/birpc

    v0.2.2

    Compare Source

    v0.2.1

    Compare Source

    v0.2.0

    Compare Source


    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • chore(deps): update dependency @types/react to v17.0.43

    chore(deps): update dependency @types/react to v17.0.43

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @types/react | 17.0.42 -> 17.0.43 | age | adoption | passing | confidence |


    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • chore(deps): update dependency @types/react to v17.0.42

    chore(deps): update dependency @types/react to v17.0.42

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @types/react | 17.0.41 -> 17.0.42 | age | adoption | passing | confidence |


    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • chore(deps): update dependency vite-plugin-dts to v1

    chore(deps): update dependency vite-plugin-dts to v1

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | vite-plugin-dts | ^0.9.9 -> ^1.0.0 | age | adoption | passing | confidence |


    Release Notes

    qmhc/vite-plugin-dts

    v1.0.0

    Compare Source

    Features
    BREAKING CHANGES
    • The calculating output paths funtion of root option is assigned to entryRoot option, and currently will auto calculating the smallest public path as the default value for entryRoot option.

    0.9.10 (2022-03-12)

    Bug Fixes
    • make default include same as tsconfig.json (5ca7fc5), closes #​58

    0.9.9 (2022-01-11)

    Bug Fixes

    0.9.8 (2022-01-10)

    Bug Fixes

    0.9.7 (2021-12-30)

    Bug Fixes
    • inserted entry not through beforeWriteFile (e16b9b1), closes #​48

    0.9.6 (2021-11-23)

    Bug Fixes
    • aliases are not resolved when find ends with '/' (f04aab2), closes #​37
    • not equally transform dts source files (ede5146)

    0.9.5 (2021-11-21)

    Bug Fixes
    • ensure dts source files through beforeWriteFile hook (3265412), closes #​43

    0.9.4 (2021-11-10)

    Bug Fixes
    • cannot resolve types defined in dts files (666ca09), closes #​42
    • take unused error when using setup-script (c4145b7)

    0.9.3 (2021-11-03)

    Bug Fixes

    0.9.2 (2021-10-20)

    Bug Fixes

    0.9.1 (2021-10-18)


    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • chore(deps): update actions/cache action to v3

    chore(deps): update actions/cache action to v3

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | actions/cache | action | major | v2 -> v3 |


    Release Notes

    actions/cache

    v3

    Compare Source


    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • chore(deps): update dependency @types/react to v17.0.41

    chore(deps): update dependency @types/react to v17.0.41

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @types/react | 17.0.40 -> 17.0.41 | age | adoption | passing | confidence |


    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • chore(deps): update dependency @types/react to v17.0.40

    chore(deps): update dependency @types/react to v17.0.40

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @types/react | 17.0.39 -> 17.0.40 | age | adoption | passing | confidence |


    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • chore(deps): lock file maintenance

    chore(deps): lock file maintenance

    WhiteSource Renovate

    This PR contains the following updates:

    | Update | Change | |---|---| | lockFileMaintenance | All locks refreshed |

    🔧 This Pull Request updates lock files to use the latest dependency versions.


    Configuration

    📅 Schedule: "before 5am on monday" (UTC).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • fix(deps): update dependency magic-string to ^0.26.0

    fix(deps): update dependency magic-string to ^0.26.0

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | magic-string | ^0.25.7 -> ^0.26.0 | age | adoption | passing | confidence |


    Release Notes

    rich-harris/magic-string

    v0.26.0

    Compare Source

    BREAKING CHANGES

    • Support of Node.js v10 is dropped. Now magic-string requires Node.js v12 or higher. (#​204)
    • ESM bundle is now shipped with .mjs extension (#​197)
    -  "module": "dist/magic-string.es.js",
    +  "module": "dist/magic-string.es.mjs",
    +  "exports": {
    +    "./package.json": "./package.json",
    +    ".": {
    +      "import": "./dist/magic-string.es.mjs",
    +      "require": "./dist/magic-string.cjs.js"
    +    }
    +  },
    
    Features

    0.25.9 (2022-03-03)

    Bug Fixes
    • allowed overwrite across moved content preceded by split (#​192) (403fa86)
    • types: make options partial by default (2815e77)
    • use defineProperty for appending prop in storeName (#​194) (96b7cd3)

    0.25.8 (2022-03-02)

    Bug Fixes

    0.25.7

    • fix bundle mappings after remove and move in multiple sources (#​172)

    0.25.6

    • Use bitwise operators for small performance boost (#​171)

    0.25.5

    • Use a bitset to reduce memory consumption (#​167)

    0.25.4

    0.25.3

    • Fix typing of SourceMap.version.

    0.25.2

    • Remove deprecated new Buffer(...)
    • Handle characters outside Latin1 range when generating a sourcemap in browser (#​154)

    0.25.1

    • Additional types for index.d.ts (#​148)

    0.25.0

    • Add length method (#​145)
    • Fix trimming chunks with intro/outro (#​144)

    0.24.1

    • Add lastLine and lastChar methods (#​142)

    0.24.0

    • Add isEmpty methods (#​137)
    • Fix a potential race condition (#​136)
    • Fix CJS/ES bundles inlining sourcemap-codec in 0.23.2.

    0.23.2

    • Add generateDecodedMap methods (#​134)

    0.23.1

    0.23.0

    • Use sourcemap-codec for improved performance (#​133)

    0.22.5

    • Add TypeScript interfaces used by rollup (#​131)
    • Remove src directory from npm package

    0.22.4

    • contentOnly and storeName are both optional

    0.22.3

    • Add original to TS definitions

    0.22.2

    0.22.1

    • Update TypeScript definitions (#​124)

    0.22.0

    • Prevent overwrite state corruption (#​115)
    • Various bugfixes (#​126)

    0.21.3

    • Clone indentExclusionRanges correctly (#​122)
    • Fix more typings (#​122)

    0.21.2

    • Add default property referencing self in index-legacy.js, to work around TypeScript bug (#​121)

    0.21.1

    • Add typings file to package

    0.21.0

    • Add TypeScript bindings (#​119)

    0.20.0

    • The fourth argument to overwrite is a {storeName, contentOnly} options object. storeName: true is equivalent to true before. contentOnly will preserve existing appends/prepends to the chunk in question

    0.19.1

    • Prevent overwrites across a split point (i.e. following a move)
    • Implement remove separately to overwrite

    0.19.0

    • More accurate bundle sourcemaps (#​114)

    0.18.0

    • Optimisation – remove empty chunks following overwrite or remove (#​113)

    0.17.0

    • Add appendLeft, appendRight, prependLeft, prependRight methods (#​109)
    • insertLeft and insertRight are deprecated in favour of appendLeft and prependRight respectively

    0.16.0

    • Include inserts in range for overwrite and remove operations (#​89)
    • Make options optional for bundle.generateMap(...) (#​73)

    0.15.2

    • Generate correct bundle sourcemap with prepended/appended content

    0.15.1

    • Minor sourcemap fixes

    0.15.0

    • Use named export of Bundle in ES build, so ES consumers of magic-string can tree-shake it out

    0.14.0

    • Throw if overwrite of zero-length range is attempted
    • Correctly handle redundant move operations

    0.13.1

    • Fix a bevy of s.slice() issues (#​62)

    0.13.0

    • Breaking: insertAfter is now insertLeft, insertBefore is now insertRight
    • Breaking: insert is no longer available. Use insertLeft and insertRight
    • Significant performance improvements

    0.12.1

    • Fix sourcemap generation with insertAfter and insertBefore

    0.12.0

    • Add insertAfter and insertBefore methods

    0.11.4

    • Fix two regression bugs with trim()
    • More informative error message on illegal removals

    0.11.3

    • Fix trim methods to ensure correct sourcemaps with trimmed content (#​53)

    0.11.2

    • Support sourcemaps with moved content

    0.11.1

    • Use findIndex helper for 0.12 support

    0.11.0

    • Add experimental move() method
    • Refactor internals to support move()

    0.10.2

    • Do not overwrite inserts at the end of patched ranges (#​35)

    0.10.1

    • Zero-length inserts are not removed on adjacent overwrites

    0.10.0

    • Complete rewrite, resulting in ~40x speed increase (#​30)
    • Breaking – magicString.locate and locateOrigin are deprecated
    • More forgiving rules about contiguous patches, and which ranges are valid with magicString.slice(...)

    0.9.1

    • Update deps

    0.9.0

    • Update build process

    0.8.0

    • Add an ES6 build, change default UMD build to CommonJS (but keeping existing UMD build with bundled dependencies)
    • Make properties non-enumerable, for cleaner logging
    • Update dependencies

    0.7.0

    • The names array is populated when generating sourcemaps, and mappings include name indices where appropriate (#​16)
    • Replaced content is mapped correctly in sourcemaps (#​15)

    0.6.6

    • Adjust mappings correctly when removing replaced content
    • Error correctly when removed characters are used as slice anchors

    0.6.5

    • Fix jsnext:main in package.json

    0.6.4

    • Fix bug with positive integer coercion

    0.6.3

    • Intro content is correctly indented
    • Content following an intro with trailing newline is correctly indented

    0.6.2

    • Noop indents are still chainable (fixes bug introduced in 0.6.1)

    0.6.1

    • Indenting with an empty string is a noop

    0.6.0

    • Use rollup for bundling, instead of esperanto

    0.5.3

    • Correct sourcemap generation with bundles containing varied separators
    • s.clone() clones indent exclusion ranges and sourcemap locations

    0.5.2

    • s.slice() accepts negative numbers, and the second argument can be omitted (means 'original string length'), just like String.prototype.slice
    • More informative error message when trying to overwrite content illegally

    0.5.1

    • Allow bundle separator to be the empty string
    • Indenting is handled correctly with empty string separator

    0.5.0

    • s.replace() is deprecated in favour of s.overwrite() (identical signature)
    • bundle.addSource() can take a MagicString instance as its sole argument, for convenience
    • The options in new MagicString(str, options) can include filename and indentExclusionRanges options, which will be used when bundling
    • New method: s.snip( start, end )

    0.4.9

    • file option is optional when generating a bundle sourcemap

    0.4.7

    • Repeated insertions at position 0 behave the same as other positions (#​10)

    0.4.6

    • Overlapping ranges can be removed
    • Non-string content is rejected (#​9)

    0.4.5

    • Implement source.addSourcemapLocation()

    0.4.4

    • Another Windows fix, this time for file paths when bundling

    0.4.3

    • Handle Windows-style CRLF newlines when determining whether a line is empty

    0.4.2

    • Fix typo in package.json (d'oh again)
    • Use only relative paths for internal modules - makes bundling with dependents (i.e. esperanto) possible

    0.4.1

    • Includes correct files in npm package (d'oh)

    0.4.0

    0.3.1

    • Fixes a bug whereby multiple insertions at the same location would cause text to repeat (#​5)

    0.3.0

    • Breaking change - source.indentStr is null if no lines are indented. Use source.getIndentString() for the old behaviour (guess, and if no lines are indented, return \t)
    • bundle.getIndentString() ignores sources with no indented lines when guessing indentation (#​3)

    0.2.7

    • source.trimLines() removes empty lines from start/end of source, leaving other whitespace untouched
    • Indentation is not added to an empty source

    0.2.6

    • Performance improvement - adjustments are only made when necessary

    0.2.5

    • Single spaces are ignored when guessing indentation - experience shows these are more likely to be e.g. JSDoc comments than actual indentation
    • bundle.addSource() can take an indentExclusionRanges option

    0.2.4

    • Empty lines are not indented

    0.2.3

    • Fixes edge case with bundle sourcemaps

    0.2.2

    • Make sources paths in sourcemaps relative to options.file

    0.2.1

    • Minor fix for bundle.indent()

    0.2.0

    • Implement MagicString.Bundle for concatenating magic strings

    0.1.10

    • Fix sourcemap encoding

    0.1.9

    • Better performance when indenting large chunks of code

    0.1.8

    • Sourcemaps generated with s.generateMap() have a toUrl() method that generates a DataURI

    0.1.7

    • Implement s.insert( index, content ) - roughly equivalent to s.replace( index, index, content )

    0.1.6

    • Version bump for npm's benefit

    0.1.5

    • s.indent({ exclude: [ x, y ] }) prevents lines between (original) characters x and y from being indented. Multiple exclusion ranges are also supported (e.g. exclude: [[a, b], [c, d]])

    0.1.4

    • s.locate() doesn't throw out-of-bound error if index is equal to original string's length

    0.1.3

    • s.trim() returns this (i.e. is chainable)

    0.1.2

    • Implement s.slice()

    0.1.1

    • Implement s.trim()

    0.1.0

    • First release

    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • chore(deps): update all dependencies

    chore(deps): update all dependencies

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @commitlint/cli (source) | ^16.0.0 -> ^17.0.0 | age | adoption | passing | confidence | | @commitlint/config-conventional (source) | ^16.0.0 -> ^17.0.0 | age | adoption | passing | confidence | | @milkdown/core | ^5.5.0 -> ^6.0.0 | age | adoption | passing | confidence | | @milkdown/plugin-clipboard | ^5.5.0 -> ^6.0.0 | age | adoption | passing | confidence | | @milkdown/plugin-cursor | ^5.5.0 -> ^6.0.0 | age | adoption | passing | confidence | | @milkdown/plugin-emoji | ^5.5.0 -> ^6.0.0 | age | adoption | passing | confidence | | @milkdown/plugin-history | ^5.5.0 -> ^6.0.0 | age | adoption | passing | confidence | | @milkdown/plugin-indent | ^5.5.0 -> ^6.0.0 | age | adoption | passing | confidence | | @milkdown/plugin-listener | ^5.5.0 -> ^6.0.0 | age | adoption | passing | confidence | | @milkdown/plugin-prism | ^5.5.0 -> ^6.0.0 | age | adoption | passing | confidence | | @milkdown/plugin-slash | ^5.5.0 -> ^6.0.0 | age | adoption | passing | confidence | | @milkdown/plugin-tooltip | ^5.5.0 -> ^6.0.0 | age | adoption | passing | confidence | | @milkdown/preset-commonmark | ^5.5.0 -> ^6.0.0 | age | adoption | passing | confidence | | @milkdown/preset-gfm | ^5.5.0 -> ^6.0.0 | age | adoption | passing | confidence | | @milkdown/prose | ^5.5.0 -> ^6.0.0 | age | adoption | passing | confidence | | @milkdown/theme-nord | ^5.5.0 -> ^6.0.0 | age | adoption | passing | confidence | | @milkdown/utils | ^5.5.0 -> ^6.0.0 | age | adoption | passing | confidence | | @rollup/plugin-commonjs (source) | ^21.0.1 -> ^24.0.0 | age | adoption | passing | confidence | | @rollup/plugin-json (source) | ^4.1.0 -> ^6.0.0 | age | adoption | passing | confidence | | @rollup/plugin-node-resolve (source) | ^13.1.3 -> ^15.0.0 | age | adoption | passing | confidence | | @rollup/pluginutils (source) | ^4.1.2 -> ^5.0.0 | age | adoption | passing | confidence | | @types/fs-extra (source) | ^9.0.13 -> ^11.0.0 | age | adoption | passing | confidence | | @types/node (source) | ^17.0.8 -> ^18.0.0 | age | adoption | passing | confidence | | @types/react (source) | 17.0.43 -> 18.0.26 | age | adoption | passing | confidence | | @types/react-dom (source) | ^17.0.9 -> ^18.0.0 | age | adoption | passing | confidence | | @vitejs/plugin-react (source) | ^1.1.4 -> ^3.0.0 | age | adoption | passing | confidence | | eslint-plugin-simple-import-sort | ^7.0.0 -> ^8.0.0 | age | adoption | passing | confidence | | fs-extra | ^10.0.0 -> ^11.0.0 | age | adoption | passing | confidence | | husky (source) | ^7.0.4 -> ^8.0.0 | age | adoption | passing | confidence | | lint-staged | ^12.0.0 -> ^13.0.0 | age | adoption | passing | confidence | | magic-string | ^0.26.0 -> ^0.27.0 | age | adoption | passing | confidence | | pathe | ^0.2.0 -> ^1.0.0 | age | adoption | passing | confidence | | react-spinners (source) | ^0.11.0 -> ^0.13.0 | age | adoption | passing | confidence | | rollup (source) | ^2.64.0 -> ^3.0.0 | age | adoption | passing | confidence | | rollup-plugin-dts | ^4.1.0 -> ^5.0.0 | age | adoption | passing | confidence | | rollup-plugin-esbuild | ^4.8.2 -> ^5.0.0 | age | adoption | passing | confidence | | vite (source) | ^2.5.3 -> ^4.0.0 | age | adoption | passing | confidence |


    Release Notes

    conventional-changelog/commitlint (@​commitlint/cli)

    v17.4.1

    Compare Source

    Note: Version bump only for package @​commitlint/cli

    v17.4.0

    Compare Source

    Bug Fixes

    v17.3.0

    Compare Source

    Note: Version bump only for package @​commitlint/cli

    v17.2.0

    Compare Source

    Features

    17.1.2 (2022-08-29)

    Note: Version bump only for package @​commitlint/cli

    17.1.1 (2022-08-27)

    Note: Version bump only for package @​commitlint/cli

    v17.1.2

    Compare Source

    Note: Version bump only for package @​commitlint/cli

    v17.1.1

    Compare Source

    Note: Version bump only for package @​commitlint/cli

    v17.1.0

    Compare Source

    Features

    17.0.3 (2022-06-25)

    Note: Version bump only for package @​commitlint/cli

    17.0.2 (2022-06-01)

    Note: Version bump only for package @​commitlint/cli

    17.0.1 (2022-05-25)

    Bug Fixes

    v17.0.3

    Compare Source

    Note: Version bump only for package @​commitlint/cli

    v17.0.2

    Compare Source

    Note: Version bump only for package @​commitlint/cli

    v17.0.1

    Compare Source

    Bug Fixes

    v17.0.0

    Compare Source

    BREAKING CHANGES
    • drop node v12 support

    • chore: rename circleci windows job

    node version is not defned by the name anyways (i think)

    conventional-changelog/commitlint (@​commitlint/config-conventional)

    v17.4.0

    Compare Source

    Note: Version bump only for package @​commitlint/config-conventional

    v17.3.0

    Compare Source

    Note: Version bump only for package @​commitlint/config-conventional

    v17.2.0

    Compare Source

    Note: Version bump only for package @​commitlint/config-conventional

    v17.1.0

    Compare Source

    Note: Version bump only for package @​commitlint/config-conventional

    17.0.3 (2022-06-25)

    Note: Version bump only for package @​commitlint/config-conventional

    17.0.2 (2022-06-01)

    Bug Fixes
    • update dependency conventional-changelog-conventionalcommits to v5 (#​3201) (c20fd19)

    v17.0.3

    Compare Source

    Note: Version bump only for package @​commitlint/config-conventional

    v17.0.2

    Compare Source

    Bug Fixes
    • update dependency conventional-changelog-conventionalcommits to v5 (#​3201) (c20fd19)

    v17.0.0

    Compare Source

    BREAKING CHANGES
    • drop node v12 support

    • chore: rename circleci windows job

    node version is not defned by the name anyways (i think)

    16.2.4 (2022-04-28)

    Note: Version bump only for package @​commitlint/config-conventional

    16.2.1 (2022-02-13)

    Note: Version bump only for package @​commitlint/config-conventional

    Saul-Mirone/milkdown (@​milkdown/core)

    v6.5.4

    Patch Changes

    v6.5.3

    Patch Changes

    v6.5.2

    Patch Changes

    v6.5.0

    Minor Changes
    • 77ae1d3: Removable plugins, editor status, table inputrule and injectSlices factory options.
    Patch Changes

    v6.4.1

    Patch Changes

    v6.4.0

    Minor Changes
    • cd6a613: Inline sync plugin, vscode paste support, and new internal ctx.
    Patch Changes

    v6.3.2

    Patch Changes

    v6.3.1

    Patch Changes

    v6.3.0

    Minor Changes
    • d3b2bd9: https://github.com/Saul-Mirone/milkdown/milestone/4
    Patch Changes

    v6.2.0

    Minor Changes
    • 26afcda: New react and vue API, custom heading id, prosemirror upgrade, and async composable API.
    Patch Changes

    v6.1.5

    Patch Changes

    v6.1.4

    Patch Changes

    v6.1.3

    Patch Changes

    v6.1.2

    Patch Changes

    v6.1.1

    Patch Changes

    v6.1.0

    Minor Changes
    • 1daf87d: Improve support for collaborative editing.
    Patch Changes

    v6.0.2

    Patch Changes

    v6.0.1

    Patch Changes

    v6.0.0

    Major Changes
    Patch Changes
    Saul-Mirone/milkdown (@​milkdown/plugin-clipboard)

    v6.5.4

    Patch Changes
    • b4003d9: Fix bugs and make some small improvements.
    • Updated dependencies [b4003d9]
      • [@​milkdown/utils](https://togithub.com/milkdown/util

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    planned 
    opened by renovate[bot] 2
  • Dependency Dashboard

    Dependency Dashboard

    This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

    Awaiting Schedule

    These updates are awaiting their schedule. Click on a checkbox to get an update now.

    • [ ] chore(deps): lock file maintenance

    Open

    These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

    • [ ] chore(deps): update all dependencies (@commitlint/cli, @commitlint/config-conventional, @milkdown/core, @milkdown/plugin-clipboard, @milkdown/plugin-cursor, @milkdown/plugin-emoji, @milkdown/plugin-history, @milkdown/plugin-indent, @milkdown/plugin-listener, @milkdown/plugin-prism, @milkdown/plugin-slash, @milkdown/plugin-tooltip, @milkdown/preset-commonmark, @milkdown/preset-gfm, @milkdown/prose, @milkdown/theme-nord, @milkdown/utils, @rollup/plugin-commonjs, @rollup/plugin-json, @rollup/plugin-node-resolve, @rollup/pluginutils, @types/fs-extra, @types/node, @types/react, @types/react-dom, @vitejs/plugin-react, eslint-plugin-simple-import-sort, fs-extra, husky, lint-staged, magic-string, pathe, react-spinners, rollup, rollup-plugin-dts, rollup-plugin-esbuild, vite)

    Detected dependencies

    github-actions
    .github/workflows/ci.yml
    • actions/checkout v3
    • actions/setup-node v3
    • actions/cache v3
    • changesets/action v1
    • peaceiris/actions-gh-pages v3
    npm
    gh-pages/package.json
    package.json
    • @changesets/cli ^2.19.0
    • @commitlint/cli ^16.0.0
    • @commitlint/config-conventional ^16.0.0
    • @types/node ^17.0.8
    • @typescript-eslint/eslint-plugin ^5.0.0
    • @typescript-eslint/parser ^5.0.0
    • concurrently ^7.0.0
    • eslint ^8.0.0
    • eslint-config-prettier ^8.3.0
    • eslint-plugin-header ^3.1.1
    • eslint-plugin-import ^2.24.2
    • eslint-plugin-prettier ^4.0.0
    • eslint-plugin-promise ^6.0.0
    • eslint-plugin-react-hooks ^4.2.0
    • eslint-plugin-simple-import-sort ^7.0.0
    • eslint-plugin-tsdoc ^0.2.14
    • git-cz ^4.7.6
    • husky ^7.0.4
    • lint-staged ^12.0.0
    • prettier ^2.3.2
    • rimraf ^3.0.2
    • rollup ^2.64.0
    • rollup-plugin-copy ^3.4.0
    • rollup-plugin-dts ^4.1.0
    • rollup-plugin-esbuild ^4.8.2
    • rollup-plugin-visualizer ^5.5.4
    • typescript ^4.5.4
    • vite ^2.5.3
    • vite-plugin-dts ^1.0.0
    packages/vite-plugin-book/package.json
    • @rollup/plugin-json ^4.1.0
    • @rollup/pluginutils ^4.1.2
    • birpc ^0.2.0
    • flatted ^3.2.4
    • fs-extra ^10.0.0
    • magic-string ^0.26.0
    • pathe ^0.2.0
    • picocolors ^1.0.0
    • sirv ^2.0.0
    • ws ^8.4.2
    • @fontsource/roboto ^4.5.2
    • @milkdown/core ^5.5.0
    • @milkdown/plugin-clipboard ^5.5.0
    • @milkdown/plugin-cursor ^5.5.0
    • @milkdown/plugin-emoji ^5.5.0
    • @milkdown/plugin-history ^5.5.0
    • @milkdown/plugin-indent ^5.5.0
    • @milkdown/plugin-listener ^5.5.0
    • @milkdown/plugin-prism ^5.5.0
    • @milkdown/plugin-slash ^5.5.0
    • @milkdown/plugin-tooltip ^5.5.0
    • @milkdown/preset-commonmark ^5.5.0
    • @milkdown/preset-gfm ^5.5.0
    • @milkdown/prose ^5.5.0
    • @milkdown/theme-nord ^5.5.0
    • @milkdown/utils ^5.5.0
    • @rollup/plugin-commonjs ^21.0.1
    • @rollup/plugin-node-resolve ^13.1.3
    • @types/fs-extra ^9.0.13
    • @types/node ^17.0.8
    • @types/react 17.0.43
    • @types/react-dom ^17.0.9
    • @types/react-helmet ^6.1.5
    • @types/sortablejs ^1.10.7
    • @types/ws ^8.2.2
    • @vitejs/plugin-react ^1.1.4
    • immer ^9.0.12
    • material-icons ^1.10.6
    • prism-themes ^1.9.0
    • react ^18.0.0
    • react-dom ^18.0.0
    • react-helmet ^6.1.0
    • react-router-dom ^6.2.1
    • react-sortablejs ^6.1.1
    • react-spinners ^0.11.0
    • react-split-pane ^0.1.92
    • sortablejs ^1.14.0
    • vite-plugin-windicss ^1.6.3
    • windicss ^3.4.3

    • [ ] Check this box to trigger a request for Renovate to run again on this repository
    planned 
    opened by renovate[bot] 2
Owner
Mirone
Kiss the demons out of my dreams.
Mirone
A ✨light✨ and magical Svelte component for CSS media queries🐹

Svelte CSS media queries ?? Demo - Svelte REPL Lightweight, comfortable, like Svelte ?? how to install npm i svelte-media-queries What can I do? quer

Nikita Fedorov 9 Dec 26, 2022
Cindy Dorantes 12 Oct 18, 2022
null 8 Nov 11, 2022
Atlan is a CLI that helps you to manage local dockerized infrastructure without any needed knowledge on Docker and Docker Compose.

Atlan CLI Atlan is a CLI that helps you to manage local dockerized infrastructure without any needed knowledge on Docker and Docker Compose. What is A

Myastro 10 Aug 17, 2022
Documentation: PWA integrations for Vite and the ecosystem

Documentation: PWA integrations for Vite and the ecosystem ?? Features ?? Documentation & guides ?? Zero-Config: sensible built-in default configs for

Vite PWA 17 Dec 28, 2022
A tool help you generate documentation lightweight, seamless, fast and beautiful

一个 轻量、飞快、美观 的 React 组件文档生成套件 English | 简体中文 Features Vite 内核,高效极速的开发体验 使用 Markdown 写法,让你快速为项目编写说明文档的同时,自动生成预览,在调试的同时生成文档 自动分析 TypeScript 类型定义并生成 API 文

Vitdoc 73 Dec 15, 2022
App to manage maintenance calls. App to manage maintenance calls. This application was created for the purpose of studies.

App to manage maintenance calls. App to manage maintenance calls. This application was created for the purpose of studies.

Rodrigo Gonçalves 112 Dec 26, 2022
This is a website for you to write what you want to do after or done befor and manage it.

Todo List Website This is a website for you to write what you want to do after or done befor and manage it. LogIn SignUp Main Abilities Able To Run Se

Alireza 6 Dec 21, 2022
Chris Siku 13 Aug 22, 2022
Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.

Introduction Swagger UI allows anyone — be it your development team or your end consumers — to visualize and interact with the API’s resources without

Swagger 23.2k Dec 28, 2022
Generate rich documentation data for TypeScript and MDX codebases.

⚠️ Currently under development, not ready for use yet This library is currently unstable and the API is in flux. It is being worked on in the open for

Travis Arnold 16 Oct 30, 2022
Generate Stripe-like API Documentation

Generate Stripe-like API Documentation Get Started Today Table of contents Usage Inputs Contributing Licence Usage Start by creating a documentation o

Theneo 12 Sep 15, 2022
Help Ukraine - add ribbon with Ukraine flag into the website you manage, show the anti-war message to Russian users, or block them from your service.

?? Stop war on Ukraine ?? Help Ukraine - add ribbon with Ukraine flag into the website you manage, show the anti-war message to Russian users, or bloc

Pavol Hejný 46 Jan 7, 2023
A to-do list website task by (@microverseinc), you can easily manage your daily tasks

To DO list Is a website to manage daily tasks Built With HTML,CSS,JS webpack Live Demo (if available) Live Demo Link Getting Started This is an exampl

Yousef Hesham 6 Oct 22, 2022
Read without losing the plot. Well Read helps you organize your notes about books you're reading, so you're never lost when starting a new volume.

Well Read Well Read is a website for tracking your reading of long book series. I made this to track how many pages I read in a session and to better

null 3 Dec 15, 2022
Website for the Io Language. Includes documentation

TheIoLang Website Contributors ✨ Thanks goes to these wonderful people (emoji key): Dillon Barnes ?? ?? ?? ?? anime fanatic ?? This project follows th

IoLang 2 Dec 22, 2021
"To-do list" is a tool that helps to organize your day. It simply lists the things that you need to do and allows you to mark them as complete. It is created with HTML , CSS , JS and webpack and NPM.

My Todo List "To-do list" is a tool that helps to organize your day. It simply lists the things that you need to do and allows you to mark them as com

Dyary Raoof Bayz Agha 5 Mar 29, 2022