Giter VIP home page Giter VIP logo

octoberts's Introduction

OctoberTS

TypeScript implementation of the October CMS Frontend Framework

THIS IS A WORK IN PROGRESS

Do not use this in production. The code is still a mess so don't bother creating larger PRs since most of the code base will be refactored. Please open an issue detailing your implementation before you write code.

# install deps
yarn
# run tests
yarn test

API

// Optional, adds IE11 support
import './src/polyfills'

// Import requried features.
import {Build, withAttachLoading, withRequest, withValidation} from './src'

// Attach Framework features to the DOM globally.
const framework = Build(
    withRequest(),       // data-request
    withValidation(),    // data-request-validate
    withAttachLoading(), // data-attach-loading
)

// Use on demand without global event listeners.
const framework = Build()
const response = framework.request('onUpdate')

Implementation status

  • global DOM events api
  • on demand api

Framework extras

  • data-request-validate
  • data-attach-loading
  • Loading indicator
  • Flash messages
  • data-request-flash
    • Error handling
    • Flash handling

Framework

  • data-request
  • data-track-input

Incompatibilities

  • eval attributes are not supported (data-eval-*) by design and probably won't be in the future
  • There are some limitations to the data-request-update syntax: The value has to be wrapped in ' and functions or variables are not supported (no dynamic evaluation is done!). See tests for examples
  • All event listeners need to get their data off of the e.details event property, instead of the multiple function attributes

octoberts's People

Contributors

dependabot[bot] avatar tobias-kuendig 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.