Git Product home page Git Product logo

textr's Introduction

A's github stats

Top Langs

textr's People

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

textr's Issues

locale dependent plugins should not assume default locale

the case that plugins’ authors cannot imagine all possible usage cases, so its pretty dangerous to make these assumption. So the best trade off, is just to do nothing with input if passed locale is not defined, the same goes with locales not supported by plugin. What do you think?

In-browser use

Hi,

I was just wondering what are your opinions or ideas on running textr in-browser through something like require.js.

Are there any caveats? Could it work?

I guess it depends a lot on which plugins are loaded. But I am wondering about your opinion on this in general.

Cheers

release 0.3.0 with new options API

With 0.3.0 you can set textr(defaults) and tf.exec(text, options). That will be useful for recursive usage textr bundles. For example, you can set {locale: 'ru'} on the top level of your bundles (with defaults or with exec(t, opts)).

The other one change is that options in the plugins can be used as context-object to pass data between the plugins. That achieved by cloning defaults and options to new object each times when you execute your trasformation stack. But I don't know use-cases for it. I know only one, but IMHO, it's antipattern:

var tf = textr()
  // set locale dynamically
  .use(function (text, ctx) {
    ctx.locale = navigator.locale;
  })
  .use(quotes)
;

improving tests

current tests are testing concrete plugins, which is redundant plugins are full tested by it’s own, thats why I suggest that textr need more generic way of testing workflow itself and not implementations in terms of concrete plugins

guidelines for plugin creators

File structure:

  • index.js
  • test.js
  • README.md
  • package.json
  • .travis.yml
  • mocha as tests runner

README structure:

  • title
  • desc
  • installation instruction
  • usage section with spec from tests
  • and license note

just as sketch proposal. What do you think?

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.