美文网首页
webstorm wechat-mini-program dee

webstorm wechat-mini-program dee

作者: xingkong_s | 来源:发表于2020-07-17 09:30 被阅读0次

    webstorm 插件

    1. Wxapp Support
    2. Wechat mini program support (newer 不需要配置 file types)

    file types 配置

    HTML *.wxml
    style sheet *.wxss

    wecharCodejar

    wecharCodejarwebstorm setting import

    vue-cli

    yarn global add @vue/cli
    

    uni-app 模板建立项目

    vue create -p dcloudio/uni-preset-vue my-project
    

    开发

    npm run dev:%PLATFORM%
    

    打包

    npm run build:%PLATFORM%
    
    %PLATFORM% 取值
    app-plus app平台生成打包资源(仅支持npm run build:app-plus,也就是App平台运行调试不支持cli方式,需在HBuilderX中运行调试)
    h5 H5
    mp-alipay 支付宝小程序
    mp-baidu 百度小程序
    mp-weixin 微信小程序
    mp-toutiao 字节跳动小程序
    mp-qq qq 小程序
    mp-360 360 小程序
    quickapp-webview 快应用通用
    quickapp-webview-union 快应用联盟
    quickapp-webview-huawei 快应用华为

    安装scss loader报错

    Sass Loader has been initialized using an options object that does not match the API schema.
    不使用高于8.0版本的 scss loader

    sudo yarn add node-sass
    yarn add sass-loader@7.3.1
    

    yarn 安装 node-sass 报错

    error /.../node_modules/node-sass: Command failed.
    Exit code: 1
    Command: node scripts/build.js
    make: *** [Release/obj.target/libsass/src/libsass/src/ast.o] Error 127
    gyp ERR! build error 
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack     at ChildProcess.onExit (/media/.../node_modules/node-gyp/lib/build.js:262:23)
    gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
    gyp ERR! System Linux 4.15.0-30deepin-generic
    gyp ERR! command "/home/.../.nvm/versions/node/v12.18.2/bin/node" "/media/.../node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
    gyp ERR! cwd /.../node_modules/node-sass
    gyp ERR! node -v v12.18.2
    gyp ERR! node-gyp -v v3.8.0
    gyp ERR! not ok 
    Build failed with error code: 1
    info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
    

    需要配置 yarn config

    yarn config set registry https://registry.npm.taobao.org
    yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g
    

    deepin 重新安装wine

    由于deepin 集成的 wine 对[wechat_web_devtools(https://github.com/cytle/wechat_web_devtools)支持的不好需要重新安装wine

    sudo apt-get install wine-binfmt
    sudo update-binfmts --import /usr/share/binfmts/wine:
    

    然后 更新 wechat_web_devtools

    ./bin/wxdt install
    

    启动

    ./bin/wxdt
    

    相关文章

      网友评论

          本文标题:webstorm wechat-mini-program dee

          本文链接:https://www.haomeiwen.com/subject/pjmwhktx.html