0.10.0 • Published 8 months ago

taro-define-config v0.10.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

taro-define-config

Provide a defineConfig function for tarojs config

CI NPM VERSION NPM DOWNLOADS LICENSE

!IMPORTANT For TaroJS v3 support, please use taro-define-config < v0.7.0.

Install

npm i taro-define-config -D
yarn add taro-define-config -D
pnpm add taro-define-config -D

Usage

// config/index.js

// @ts-check
const { defineConfig } = require('taro-define-config')

module.exports = defineConfig({
  projectName: 'hello-world',
  designWidth: 750,
})
// config/index.ts

import { defineConfig } from 'taro-define-config'

export default defineConfig({
  projectName: 'hello-world',
  designWidth: 750,
})

Why this package

!NOTE
Taro introduced a builtin defineConfig function since v3.6.9. Maybe you don't need this package.

Improve your TaroJS project configuration experience with:

  • 🍭 more fine-grained type support than built-in defineConfig
  • 🤖 auto-suggestions
  • ✅ type checking (Use // @ts-check at the first line in your config file)
  • 📖 documentation
  • ⚠️ deprecation warnings

Extend plugin types

declare module 'taro-define-config' {
  export interface CustomPluginOptionsMap {
    'taro-plugin-custom': {
      enable?: boolean
    }
  }
}

Prior Art

Related link

License

MIT License © 2022 to PRESENT ntnyq

0.10.0

8 months ago

0.9.0

8 months ago

0.8.1

8 months ago

0.8.0

9 months ago

0.7.0

9 months ago

0.6.2

10 months ago

0.6.1

10 months ago

0.6.0

1 year ago

0.5.2

1 year ago

0.5.1

1 year ago

0.5.0

2 years ago

0.4.3

2 years ago

0.3.0

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.8

2 years ago

0.4.1

2 years ago

0.3.2

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.4.2

2 years ago

0.3.3

2 years ago

0.2.1

2 years ago

0.1.2

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.1.0

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago