Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 6.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. ### Made by [@kilianvalkhof](https://twitter.com/kilianvalkhof)
  2. #### Other projects:
  3. - 💻 [Polypane](https://polypane.app) - Develop responsive websites and apps twice as fast on multiple screens at once
  4. - 🖌️ [Superposition](https://superposition.design) - Kickstart your design system by extracting design tokens from your website
  5. - 🗒️ [FromScratch](https://fromscratch.rocks) - A smart but simple autosaving scratchpad
  6. ---
  7. # Electron-to-Chromium [![npm](https://img.shields.io/npm/v/electron-to-chromium.svg)](https://www.npmjs.com/package/electron-to-chromium) [![travis](https://img.shields.io/travis/Kilian/electron-to-chromium/master.svg)](https://travis-ci.org/Kilian/electron-to-chromium) [![npm-downloads](https://img.shields.io/npm/dm/electron-to-chromium.svg)](https://www.npmjs.com/package/electron-to-chromium) [![codecov](https://codecov.io/gh/Kilian/electron-to-chromium/branch/master/graph/badge.svg)](https://codecov.io/gh/Kilian/electron-to-chromium)[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FKilian%2Felectron-to-chromium.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FKilian%2Felectron-to-chromium?ref=badge_shield)
  8. This repository provides a mapping of Electron versions to the Chromium version that it uses.
  9. This package is used in [Browserslist](https://github.com/ai/browserslist), so you can use e.g. `electron >= 1.4` in [Autoprefixer](https://github.com/postcss/autoprefixer), [Stylelint](https://github.com/stylelint/stylelint), [babel-preset-env](https://github.com/babel/babel-preset-env) and [eslint-plugin-compat](https://github.com/amilajack/eslint-plugin-compat).
  10. **Supported by:**
  11. <a href="https://m.do.co/c/bb22ea58e765">
  12. <img src="https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/SVG/DO_Logo_horizontal_blue.svg" width="201px">
  13. </a>
  14. ## Install
  15. Install using `npm install electron-to-chromium`.
  16. ## Usage
  17. To include Electron-to-Chromium, require it:
  18. ```js
  19. var e2c = require('electron-to-chromium');
  20. ```
  21. ### Properties
  22. The Electron-to-Chromium object has 4 properties to use:
  23. #### `versions`
  24. An object of key-value pairs with a _major_ Electron version as the key, and the corresponding major Chromium version as the value.
  25. ```js
  26. var versions = e2c.versions;
  27. console.log(versions['1.4']);
  28. // returns "53"
  29. ```
  30. #### `fullVersions`
  31. An object of key-value pairs with a Electron version as the key, and the corresponding full Chromium version as the value.
  32. ```js
  33. var versions = e2c.fullVersions;
  34. console.log(versions['1.4.11']);
  35. // returns "53.0.2785.143"
  36. ```
  37. #### `chromiumVersions`
  38. An object of key-value pairs with a _major_ Chromium version as the key, and the corresponding major Electron version as the value.
  39. ```js
  40. var versions = e2c.chromiumVersions;
  41. console.log(versions['54']);
  42. // returns "1.4"
  43. ```
  44. #### `fullChromiumVersions`
  45. An object of key-value pairs with a Chromium version as the key, and an array of the corresponding major Electron versions as the value.
  46. ```js
  47. var versions = e2c.fullChromiumVersions;
  48. console.log(versions['54.0.2840.101']);
  49. // returns ["1.5.1", "1.5.0"]
  50. ```
  51. ### Functions
  52. #### `electronToChromium(query)`
  53. Arguments:
  54. * Query: string or number, required. A major or full Electron version.
  55. A function that returns the corresponding Chromium version for a given Electron function. Returns a string.
  56. If you provide it with a major Electron version, it will return a major Chromium version:
  57. ```js
  58. var chromeVersion = e2c.electronToChromium('1.4');
  59. // chromeVersion is "53"
  60. ```
  61. If you provide it with a full Electron version, it will return the full Chromium version.
  62. ```js
  63. var chromeVersion = e2c.electronToChromium('1.4.11');
  64. // chromeVersion is "53.0.2785.143"
  65. ```
  66. If a query does not match a Chromium version, it will return `undefined`.
  67. ```js
  68. var chromeVersion = e2c.electronToChromium('9000');
  69. // chromeVersion is undefined
  70. ```
  71. #### `chromiumToElectron(query)`
  72. Arguments:
  73. * Query: string or number, required. A major or full Chromium version.
  74. Returns a string with the corresponding Electron version for a given Chromium query.
  75. If you provide it with a major Chromium version, it will return a major Electron version:
  76. ```js
  77. var electronVersion = e2c.chromiumToElectron('54');
  78. // electronVersion is "1.4"
  79. ```
  80. If you provide it with a full Chrome version, it will return an array of full Electron versions.
  81. ```js
  82. var electronVersions = e2c.chromiumToElectron('56.0.2924.87');
  83. // electronVersions is ["1.6.3", "1.6.2", "1.6.1", "1.6.0"]
  84. ```
  85. If a query does not match an Electron version, it will return `undefined`.
  86. ```js
  87. var electronVersion = e2c.chromiumToElectron('10');
  88. // chromeVersion is undefined
  89. ```
  90. #### `electronToBrowserList(query)` **DEPRECATED**
  91. Arguments:
  92. * Query: string or number, required. A major Electron version.
  93. _**Deprecated**: Browserlist already includes electron-to-chromium._
  94. A function that returns a [Browserslist](https://github.com/ai/browserslist) query that matches the given major Electron version. Returns a string.
  95. If you provide it with a major Electron version, it will return a Browserlist query string that matches the Chromium capabilities:
  96. ```js
  97. var query = e2c.electronToBrowserList('1.4');
  98. // query is "Chrome >= 53"
  99. ```
  100. If a query does not match a Chromium version, it will return `undefined`.
  101. ```js
  102. var query = e2c.electronToBrowserList('9000');
  103. // query is undefined
  104. ```
  105. ### Importing just versions, fullVersions, chromiumVersions and fullChromiumVersions
  106. All lists can be imported on their own, if file size is a concern.
  107. #### `versions`
  108. ```js
  109. var versions = require('electron-to-chromium/versions');
  110. ```
  111. #### `fullVersions`
  112. ```js
  113. var fullVersions = require('electron-to-chromium/full-versions');
  114. ```
  115. #### `chromiumVersions`
  116. ```js
  117. var chromiumVersions = require('electron-to-chromium/chromium-versions');
  118. ```
  119. #### `fullChromiumVersions`
  120. ```js
  121. var fullChromiumVersions = require('electron-to-chromium/full-chromium-versions');
  122. ```
  123. ## Updating
  124. This package will be updated with each new Electron release.
  125. To update the list, run `npm run build.js`. Requires internet access as it downloads from the canonical list of Electron versions.
  126. To verify correct behaviour, run `npm test`.
  127. ## License
  128. [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FKilian%2Felectron-to-chromium.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FKilian%2Felectron-to-chromium?ref=badge_large)