Giter VIP home page Giter VIP logo

dva-ast's Introduction

dva-ast

NPM version Build Status

dva static analysis based on javascript ast.

Development Workflow

After cloning this repo.

$ npm install
$ npm run debug

API

runner

  • runner(sourcePath, options)

transform

  • transform({ source, path }, { jscodeshift })

api

models

All apis of models contains sourcePath and filePath.

  • create({ namespace, entry?, modelPath? })
  • remove({ namespace })
  • updateNamespace({ namespace, newNamespace })
  • updateState({ namespace, source })
  • addReducer({ namespace, name, [source] })
  • updateReducer({ namespace, name, source })
  • removeReducer({ namespace, name })
  • addEffect({ namespace, name, [source] })
  • updateEffect({ namespace, name, source })
  • removeEffect({ namespace, name })
  • addSubscription({ namespace, name, [source] })
  • updateSubscription({ namespace, name, source })
  • removeSubscription({ namespace, name })

routeComponents

All apis of routeComponents contains sourcePath and filePath.

  • create({ componentName })
  • remove()
  • update()
  • addDispatch({ actionType })

project

  • loadAll({ sourcePath })
  • loadAll({ sourcePath, filePath })

router

  • createRoute({ path, component, [parentId] })
    • component <object>
    • componentName
    • filePath, if file is not exist, dva-ast will create a new component for you
  • createIndexRoute({ component, [parentId] })
  • createRedirect({ from, to, [parentId] })
  • createIndexRedirect({ to, [parentId] })
  • remove({ id })
  • moveTo({ id, parentId })

entry

  • addModel({ entry, modelPath })

LICENSE

MIT

dva-ast's People

Contributors

sorrycc avatar chrisfan avatar jaredleechn avatar

Watchers

James Cloos avatar kerryChen95 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.