yanhaijing / Console.js
Licence: mit
console.js is a small javascript library, fix console is undefined
Stars: ✭ 75
Programming Languages
javascript
184084 projects - #8 most used programming language
console.js
console.js is a small javascript library, fix console is undefined, like html5shim and reset.css.
In ie6 ie7,console is undefined. In ie8 ie9, first open the developer tools before, console is undefined.
https://github.com/jsmini/console
Migration toGuides
Download and install through the npm
$ npm install --save @yanhaijing/console_js
If you are use webpack
import { polyfill } from '@yanhaijing/console_js';
polyfill(); // polyfill console undefined
If you are use requirejs
requirejs(['node_modules/@yanhaijing/console_js/dist/index.aio.js'], function (console_js) {
var polyfill = console_js.polyfill;
polyfill(); // polyfill console undefined
})
If you are use browser
<script src="node_modules/@yanhaijing/console_js/dist/index.aio.js"></script>
<script>
var polyfill = console_js.polyfill;
polyfill(); // polyfill console undefined
</script>
Document
Principle & Blog
Contribution
The first run requires installation of dependencies
$ npm install
Build code
$ npm run build
Run unit test, the browser environment requires manual test, in test/browser
$ npm test
Update package.json version,update README.md version,update CHANGELOG.md,then release
$ npm run release
Push to npm
$ npm publish --access=public
You may need to modify it as follows:
- README.md
- package.json
- config/rollup.js
- test/browser/index.html
CHANGELOG
TODO
Who use
Refrence
Related projects
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].