Skip to content

Leo-lin214/miniprogram-analyze-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

👝 一个微型小程序结构分析和构建工具

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published