Skip to content

Latest commit

 

History

History
152 lines (47 loc) · 1.25 KB

README.md

File metadata and controls

152 lines (47 loc) · 1.25 KB

miniprogram-analyze-cli

 NPM

For the analysis and construction of imitated minprogram structure.

Install

Install using npm.

npm i -s miniprogram-analyze-cli

Usage

First, the project structure requirements are as follows:

|-- myapp
|-- -- pages
|-- -- -- home
|-- -- -- -- index.html
|-- -- -- -- index.css
|-- -- -- -- index.js
|-- -- app.js
|-- -- app.json
|-- -- app.css

You can write normal templates in html file:

<p>HelloWord</p>

And imitate the mini program syntax in js file:

const app = getApp()
Page({
  name: "Home",
  data() {
    return {};
  },
  created () {
    app.globalData.name = 'Jenny'
    console.log(app);
  },
  methods: {}
});

Ok, you just need to execute the following commands in the required project structure directory:

miniprogram-analyze-cli build

Then you will get the same structure as vue-cli packaged.

License

The ISC License (ISC). Please see License File.