1.0.2 • Published 4 years ago

miniprogram-analyze-cli v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

miniprogram-analyze-cli

npm.io 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.