Skip to content

Modify exports for use with commonjs/es6 modules #107

@tracker1

Description

@tracker1

It would be nice if you exported (test for module/module.exports as well as self) then exports against $, $$ so that they can be imported directly...

(function (context){
  context.$ = $;
  context.$$ = $.$;
}(
  typeof module !== 'undefined' && module.exports 
  || typeof self !== 'undefined' && self || this)
);

This way it can be used via cjs modules built via browserify/webpack or via es6 imports via babel as such.

import {$,$$} from 'blissfuljs';

Alternatively, if module.exports exists, module.exports = Bliss and assume "shy" mode.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions