codedbychavez / configcat-vue

Vue.js SDK for ConfigCat Feature Flags (community maintained)
https://configcat.com/docs/sdk-reference/community/vue/
3 stars 1 forks source link

Migrated code to TypeScript #13

Closed codedbychavez closed 11 months ago

codedbychavez commented 1 year ago

Migration Changes

How to test and evaluate

This repo

  1. Clone this repo and checkout the typescript-migration branch.

Testing with the sample app

  1. Clone the sample app: https://github.com/codedbychavez/configcat-vue-sample
  2. Checkout the composition-api-and-ts-version branch
  3. Run the npm install command to install the dependencies

I have linked to this repo with the typescript-migration branch for the configcat-vue dependency. So the npm install command will install the package from this PR branch for easy testing (This is the reason why the /dist folder is included in this PR, we can remove it after testing).

  "dependencies": {
    "configcat-vue": "github:codedbychavez/configcat-vue#typescript-migration", 
    "vue": "^3.3.4"
  },
  1. Don't forget to add your SDK Key to src/main.ts
app.use(ConfigCatPlugin, {
    sdkKey: "YOUR-CONFIGCAT-SDKKEY", // sdkKey is required
    pollingMode: PollingMode.AutoPoll, // Optional. Default is AutoPoll
    clientOptions: {
        logger: createConsoleLogger(LogLevel.Info),
        pollIntervalSeconds: 5
    }
});

Issues?

Feel free to slack me and I'll have a look 🤔