Giter VIP home page Giter VIP logo

tm-mini-vue's Introduction

tm-mini-vue

练习minivue

    1. 没有run 按钮 https://www.jetbrains.com/help/webstorm/run-debug-configuration-jest.html#ws_js_test_jest_specific_config_settings    

1创建步骤 vue3 pinia ts node v16.20.0

    1. yarn init -y 

    2. yarn add typescript --dev

    3. npx tsc --init

    4. yarn add jest @types/jest --dev

    5. index.spec.ts 文件,types字段添加jest,  "types": ["jest"],  

    6. package.json 文件,添加scripts字段 {"test":"jest"}

    7. yarn test 测试运行      

    8. yarn add --dev babel-jest @babel/core @babel/preset-env

    9. yarn add --dev @babel/preset-typescript 

    10. 
    babel.config.js文件内容
    module.exports = {
        presets: [
            ['@babel/preset-env', { targets: { node: 'current' } }],
            '@babel/preset-typescript',
        ],
    };

    11. yarn test 

    12. 查看目录结构
    tree -aI ".git*|.vscode|node_modules" -C -L 4
    .
    ├── LICENSE
    ├── README.md
    ├── babel.config.js
    ├── package.json
    ├── src
       └── reactivity
           ├── index.ts
           └── tests
               └── index.spec.ts
    ├── tsconfig.json
    └── yarn.lock

    3 directories, 8 files

ps: 模块关系图

                     +---------------------+    +----------------------+
                      |                     |    |                      |
        +------------>|  @vue/compiler-dom  +--->|  @vue/compiler-core  |
        |             |                     |    |                      |
   +----+----+        +---------------------+    +----------------------+
   |         |
   |   vue   |
   |         |
   +----+----+        +---------------------+    +----------------------+    +-------------------+
        |             |                     |    |                      |    |                   |
        +------------>|  @vue/runtime-dom   +--->|  @vue/runtime-core   +--->|  @vue/reactivity  |
                      |                     |    |                      |    |                   |
                      +---------------------+    +----------------------+    +-------------------+

tm-mini-vue's People

Contributors

tomlongjoy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.