Small program development framework: MPVUE (1) the first small program development framework: MPVUE (2) project code analysis

In the last chapter, we analyzed the code of the project, understood the code logic of the initial project, how to create a new page and so on. With this as the basis, we can happily write our own project;

First, we tailored the original project to remove unnecessary code and keep some important configuration

1) Modify the app. vue file as follows, which is mainly used for logging and is not needed for the time being

<script>
export default {
}
</script>

<style>
</style>

Copy the code

2) Modify the app.json configuration file, which is mainly used to configure the page of wechat applet. Now only the home page can be retained

{
  "pages": [
    "pages/index/main"]."window": {
    "backgroundTextStyle": "light"."navigationBarBackgroundColor": "#fff"."navigationBarTitleText": "Mpvue application Experience"."navigationBarTextStyle": "black"}}Copy the code

3) Delete files in the components directory, files in the pages/counter directory and files in the pages/logs directory

<template>
  <div class="container"</div> </template> <script>export default {
  data () {
    return {
    }
  },

  methods: {
  }
}
</script>

<style scoped>
</style>

Copy the code

After running, you should have a clean MPVue project as follows

An active and clean MPVUE project