Giter Site home page Giter Site logo

rollup-plugin-lux's Introduction

Rollup Plugin Lux

CircleCI branch AppVeyor Codecov branch David npm

Lux uses Babel and Rollup to bundle applications into a single file to make module loading and resolution a bit easier. However, this method does not guarantee that the value of constructor.name will be the same in the bundled output. This plugin allow's Lux to continue to use this method to resolve dependencies of an application by appending an Object.defineProperty call below each constructor that sub classes a member of the public Lux API.

Note:

This is a module that Lux uses internally. It is not required for users of Lux to add this plugin to their package.json file.

Example

Before

import { Model } from 'lux-framework';

class User extends Model {

}

export default User;

After

import { Model } from 'lux-framework';

class User extends Model {

}

export default User;

Object.defineProperty(User, 'name', { name: 'User' });

Installation

git clone https://github.com/postlight/rollup-plugin-lux.git
cd rollup-plugin-lux
npm install

Testing

npm test

Building

npm run build

rollup-plugin-lux's People

Contributors

greenkeeperio-bot avatar zacharygolba avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.