Giter Site home page Giter Site logo

clone's Introduction

web component logo

THIS PROJECT IS DEPRECATED

Component is not maintained anymore. See here #639 for more information.

You can still use the component registry on component.github.io to search for components. All the components are not affected, because most of them also provide a package.json file. The component.json files in these components are still kept to provide backwards compatibility for component and duo.

What now?

Consider to use another tool, which rely on the npm and the package.json standard:


Component is a vertically integrated frontend solution, handling everything from package management to the build process, handling everything including HTML, JS, CSS, images, and fonts. Think of it as an opinionated npm + browserify + rework-npm + grunt/gulp/broccoli all wrapped into component build.

Want to know more about Component? Visit the guide or view the comparison with other solutions.

If you're confused about component, components, componentjs, please read disambiguation

Component 1.0.0: Several major new features have been added, some have been removed, and the project has been greatly reorganized. You may need to upgrade your version of node and/or npm to avoid breakage. Please see the detailed changelog. Component 0.x will not be maintained anymore.

Installation

First, you need node v0.10+ installed. If you do not have it installed, visit node's download page.

With node installed, run the following command:

 $ npm install -g component

Getting Started

Read this Getting Started guide to get a basic static site running very quickly with Component.

Note: the Component repo (this repo) has only documentation for Component 0.19. All of the documentation related to 1.0.0 will be handled in the guide repo.

Team

The team and organization have undergone massive changes. In summary, jonathanong stopped developing Component and started with normalize.io and the guys from segmentio switched to using duo. Component will still be maintained and updated while it is in use. You can read more about Duo.js and Component here.

The long story of Component and the changes that occurred in component can be found in Jonathan Ong's blog post "the future of component".

Development for component (maintenance and features) will be continued at the latest when latest browsers will support the ES6 modules and Web Components natively.

Contributors

clone's People

Contributors

defunctzombie avatar dominicbarnes avatar forbeslindesay avatar jonathanong avatar rauchg avatar yields avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

clone's Issues

consider removing hasOwnProperty when cloning objects

This check causes issues when you try to clone class instances:

Example:

function Datepicker(cls) {
  if(!(this instanceof Datepicker)) return new Datepicker(cls);
  this.className = cls;
}

Datepicker.prototype.toString = function() {
  return this.className;
};

var datepicker = Datepicker('date')
datepicker.toString() // date
datepicker = clone(datepicker); // { className: "date" };
datepicker.toString() // [object Object]

basically, the toString method on the prototype isn't getting copied over. I also noticed underscore doesn't have this check when run _.clone, so it works as expected.

Support shallow clones

Would be nice if this lib had the option to do a shallow clone instead. (better performance when you know that's what you need)

// normal (deep)
var cloned = clone(obj);

// shallow
var cloned = clone(obj, true);

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.