init:
  - name: pkginfo

dev:
  - name: clean
    target:
      - debug
      - types
  - name: typescript
  - name: webpack
    output: ./debug/
    common:
      disabled: true
    entry: ./src/examples/*.tsx
    template: ./assets/*.html
    watch: true
  - name: server
    port: 7007
    public: ./debug
  - name: browser-sync

build:
  - name: clean
    target:
      - debug
      - dist
      - types
  - name: typescript
  - name: webpack
    common:
      disabled: true
    entry: ./src/index.ts
    output: ./dist/
    folders:
      js: ./
      css: ./
    library: true
    umd:
      library: 'MotaForm'
      libraryTarget: 'umd'
      umdNamedDefine: true
    compress: false
    externals:
      react: 
        commonjs: react
        commonjs2: react
        root: React
      react-dom: 
        commonjs: react-dom
        commonjs2: react-dom
        root: ReactDOM
      mota: 
        commonjs: mota
        commonjs2: mota
        root: mota  
      mota-validation: 
        commonjs: mota-validation
        commonjs2: mota-validation
        root: MotaValidation       
  - name: doc

# build:
#   - name: clean
#   - name: shell
#     script:
#       - tsc --locale zh-cn -d --esModuleInterop

add:
  - name: react-component-creator

test:
  - name: clean
    target:
      - debug
      - dist
      - types
  - name: tslint
  - name: unit

publish:
  - name: version
  - name: shell
    script:
      - dn test
      - dn build
      - npm pu --registry=http://registry.npmjs.org
  - name: submitter