Consistent naming of Mithril.js
This commit is contained in:
parent
7b1fda5b66
commit
885b3f9442
48 changed files with 269 additions and 269 deletions
|
|
@ -7,14 +7,14 @@ Contribution guide for Mithril.js
|
|||
- [How should I report bugs?](#how-should-i-report-bugs?)
|
||||
- [How do I send a pull request?](#how-do-i-send-a-pull-request?)
|
||||
- [I'm submitting a PR. How do I run tests?](#i'm-submitting-a-pr-how-do-i-run-tests?)
|
||||
- [How do I build Mithril?](#how-do-i-build-mithril?)
|
||||
- [How do I build Mithril.js?](#how-do-i-build-mithril?)
|
||||
- [Is there a style guide?](#is-there-a-style-guide?)
|
||||
- [How do I embed live previews in docs?](#how-do-I-embed-live-previews-in-docs?)
|
||||
- [Why do tests mock the browser APIs?](#why-do-tests-mock-the-browser-apis?)
|
||||
- [Why does Mithril use its own testing framework and not Mocha/Jasmine/Tape?](#why-does-mithril-use-its-own-testing-framework-and-not-mochajasminetape?)
|
||||
- [Why doesn't the Mithril codebase use ES6 via Babel or Bublé? Would a PR to upgrade be welcome?](#why-doesn't-the-mithril-codebase-use-es6-via-babel-or-bublé?-would-a-pr-to-upgrade-be-welcome?)
|
||||
- [Why doesn't the Mithril codebase use trailing semi-colons? Would a PR to add them be welcome?](#why-doesn't-the-mithril-codebase-use-trailing-semi-colons?-would-a-pr-to-add-them-be-welcome?)
|
||||
- [Why does the Mithril codebase use a mix of `instanceof` and `typeof` checks instead of `Object.prototype.toString.call`, `Array.isArray`, etc? Would a PR to refactor those checks be welcome?](#why-does-the-mithril-codebase-use-a-mix-of-instanceof-and-typeof-checks-instead-of-objectprototypetostringcall,-arrayisarray,-etc?-would-a-pr-to-refactor-those-checks-be-welcome?)
|
||||
- [Why does Mithril.js use its own testing framework and not Mocha/Jasmine/Tape?](#why-does-mithril-use-its-own-testing-framework-and-not-mochajasminetape?)
|
||||
- [Why doesn't the Mithril.js codebase use ES6 via Babel or Bublé? Would a PR to upgrade be welcome?](#why-doesn't-the-mithril-codebase-use-es6-via-babel-or-bublé?-would-a-pr-to-upgrade-be-welcome?)
|
||||
- [Why doesn't the Mithril.js codebase use trailing semi-colons? Would a PR to add them be welcome?](#why-doesn't-the-mithril-codebase-use-trailing-semi-colons?-would-a-pr-to-add-them-be-welcome?)
|
||||
- [Why does the Mithril.js codebase use a mix of `instanceof` and `typeof` checks instead of `Object.prototype.toString.call`, `Array.isArray`, etc? Would a PR to refactor those checks be welcome?](#why-does-the-mithril-codebase-use-a-mix-of-instanceof-and-typeof-checks-instead-of-objectprototypetostringcall,-arrayisarray,-etc?-would-a-pr-to-refactor-those-checks-be-welcome?)
|
||||
- [What should I know in advance when attempting a performance related contribution?](#What-should-I-know-in-advance-when-attempting-a-performance-related-contribution?)
|
||||
- [Do you all accept donations?](#do-you-all-accept-donations?)
|
||||
|
||||
|
|
@ -57,9 +57,9 @@ There is no need to `npm install` anything in order to run the test suite, howev
|
|||
|
||||
|
||||
|
||||
## How do I build Mithril?
|
||||
## How do I build Mithril.js?
|
||||
|
||||
If all you're trying to do is run examples in the codebase, you don't need to build Mithril, you can just open the various html files and things should just work.
|
||||
If all you're trying to do is run examples in the codebase, you don't need to build Mithril.js, you can just open the various html files and things should just work.
|
||||
|
||||
To generate the bundled file for testing, run `npm run dev` from the command line. To generate the minified file, run `npm run build`. There is no need to `npm install` anything, but NodeJS is required to run the build scripts.
|
||||
|
||||
|
|
@ -87,27 +87,27 @@ Another important reason is that it allows us to document browser API quirks via
|
|||
|
||||
|
||||
|
||||
## Why does Mithril use its own testing framework and not Mocha/Jasmine/Tape?
|
||||
## Why does Mithril.js use its own testing framework and not Mocha/Jasmine/Tape?
|
||||
|
||||
Mainly to avoid requiring dependencies. `ospec` is customized to provide only essential information for common testing workflows (namely, no spamming ok's on pass, and accurate noiseless errors on failure)
|
||||
|
||||
|
||||
|
||||
## Why doesn't the Mithril codebase use ES6 via Babel or Bublé? Would a PR to upgrade be welcome?
|
||||
## Why doesn't the Mithril.js codebase use ES6 via Babel or Bublé? Would a PR to upgrade be welcome?
|
||||
|
||||
Being able to run Mithril's raw source code in all supported browsers is a requirement for all browser-related modules in this repo. In addition, transpiled code is generally much bulkier.
|
||||
Being able to run Mithril.js' raw source code in all supported browsers is a requirement for all browser-related modules in this repo. In addition, transpiled code is generally much bulkier.
|
||||
|
||||
|
||||
|
||||
## Why doesn't the Mithril codebase use trailing semi-colons? Would a PR to add them be welcome?
|
||||
## Why doesn't the Mithril.js codebase use trailing semi-colons? Would a PR to add them be welcome?
|
||||
|
||||
I don't use them. Adding them means the semi-colon usage in the codebase will eventually become inconsistent. Besides, [we aren't the only one who've decided to drop the semicolon](https://standardjs.com/#who-uses-javascript-standard-style). (We don't use Standard, though.)
|
||||
|
||||
|
||||
|
||||
## Why does the Mithril codebase use a mix of `instanceof` and `typeof` checks instead of `Object.prototype.toString.call`, `Array.isArray`, etc? Would a PR to refactor those checks be welcome?
|
||||
## Why does the Mithril.js codebase use a mix of `instanceof` and `typeof` checks instead of `Object.prototype.toString.call`, `Array.isArray`, etc? Would a PR to refactor those checks be welcome?
|
||||
|
||||
Mithril avoids peeking at objects' [[class]] string for performance considerations. Many type checks are seemingly inconsistent, weird or convoluted because those specific constructs demonstrated the best performance profile in benchmarks compared to alternatives.
|
||||
Mithril.js avoids peeking at objects' [[class]] string for performance considerations. Many type checks are seemingly inconsistent, weird or convoluted because those specific constructs demonstrated the best performance profile in benchmarks compared to alternatives.
|
||||
|
||||
Type checks are generally already irreducible expressions and having micro-modules for type checking subroutines would add maintenance overhead.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue