GithubHelp home page GithubHelp logo

2857 / ractive Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ractivejs/ractive

1.0 2.0 0.0 117.56 MB

Next-generation DOM manipulation

Home Page: http://ractivejs.org

License: MIT License

JavaScript 98.59% HTML 0.55% CSS 0.34% Shell 0.52%

ractive's Introduction

Ractive.js - Next-generation DOM manipulation

npm version devDependency Status Build Status Coverage Status npm downloads Twitter Follow

What is Ractive.js?

It's a JavaScript library for building reactive user interfaces in a way that doesn't force you into a particular framework's way of thinking. It takes a radically different approach to DOM manipulation - one that saves both you and the browser unnecessary work.

Features include...

  • Data-binding, with a beautiful declarative syntax.
  • Event handling that doesn't make you tear your hair out.
  • Flexible and performant animations and transitions.
  • And much more!

To get a feel for how it will make your life as a web developer easier, visit ractivejs.org, follow the interactive tutorials, or try the 60 second setup.

Documentation and Help

If you don't find what you're looking for in the docs, here are other channels you can ask:

If you'd like to include an example in your issue, this fiddle has a convenient minimal setup that has easily switchable Ractive versions.

Contributing

Pull requests and issues are always welcome! Please read CONTRIBUTING.md to learn how to contribute.

Development

If you want to hack on Ractive, the first step is to fork the repo. Then do the following commands.

# Clone your fork of the repo
git clone https://github.com/YOUR_USERNAME/ractive

# Move into the repo directory
cd ractive

# Install the dependencies
npm install

# Run a server for development
npm start

Navigate to localhost:4567. You'll see:

  • ractive.js - A build of Ractive.

  • sandbox - Contains some template files to help with debugging.

  • test - The test suite.

To start development, copy the sandbox/sample, following the instructions therein. After the initial build, any subsequent changes will result in fast incremental rebuilds. If you're using Chrome, you can use the LiveReload plugin.

The development server is served by gobble and is still in development. Please report any Gobble-related bugs to Gobble's issue tracker. Thanks!

Build

To build, the following must be met:

  • A real shell. Linux and OS X should be good. Windows needs MSYS or something similar at least on the path.

  • On Windows, if you get an EINVAL when running the tests, you may need to update the phantomjs script in the node_modules/.bin to use { stdio: 'inherit' } when spawning the child process instead of manually piping afterwards.

To run a complete build including linting, testing and minification:

npm run build

Browser support

Tested successfully in all modern browsers. If your experience differs please let us know!

Ractive will require the following APIs:

  • Array.isArray
  • Array.prototype.every
  • Array.prototype.filter
  • Array.prototype.find
  • Array.prototype.forEach
  • Array.prototype.indexOf
  • Array.prototype.map
  • Array.prototype.reduce
  • Function.prototype.bind
  • Node.prototype.contains (only used in testing)
  • Object.assign
  • Object.create
  • Object.defineProperty
  • Object.defineProperties
  • Object.freeze
  • Object.keys
  • performance.now
  • Promise
  • requestAnimationFrame
  • String.prototype.trim
  • window.addEventListener
  • window.getComputedStyle

Should your target environment lack the mentioned APIs, please shim/polyfill accordingly. Ractive ships with a separate, minimal polyfill file containing only the above APIs for older browsers. Simply load it before Ractive.

Published versions

All builds are published to the default npm registry and can thus be accessed from the lovely unpkg CDN:

  • https://unpkg.com/ractive is the latest stable unminified version of Ractive.
  • https://unpkg.com/ractive/ractive.min.js is the latest stable minified version of Ractive.
  • The rest of the builds play out as you would expect too: ractive.runtime.js, ractive.runtime.min.js
  • https://unpkg.com/[email protected] is the unminified build of Ractive v0.7.3
  • You can also pull specific builds for specific versions e.g. https://unpkg.com/[email protected]/ractive.min.js
  • The latest pre-release build in a series is tagged e.g. v0.8-dev or v0.9-dev, starting with v0.8. This dev tag will point to the latest released version in a series if there is no dev build e.g. immediately after a release.
  • dev builds are periodically published to npm with a pre-release version like 0.8.1-build-1, and the latest dev build is tagged edge.

License

Copyright (c) 2012-16 Rich Harris and contributors. Released under an MIT license.

ractive's People

Contributors

amitaber avatar anton-ryzhov avatar aphitiel avatar benbeaumont avatar codler avatar dgreensp avatar evs-chris avatar frk2 avatar fskreuz avatar heavyk avatar imyelo avatar isnit0 avatar jonvuri avatar lluchs avatar madgvox avatar marcello3d avatar martinkolarik avatar martypdx avatar monoblaine avatar monsanto avatar paulie4 avatar ralphtheninja avatar rich-harris avatar rstacruz avatar sabob avatar tehshrike avatar thomsbg avatar tombyrer avatar writhe avatar zlamma avatar

Stargazers

 avatar

Watchers

 avatar  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.