0.0.10 • Published 2 years ago

dva-vite-ast v0.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.1

2 years ago