@funya._./gulp-wxapp-npm
TypeScript icon, indicating that this package has built-in type declarations

0.1.7 • Public • Published

gulp-wxapp-npm

gulp插件,解决微信小程序的npm包和babel-runtime的处理,修改于pandola

Install

$ npm install @funya._./gulp-wxapp-npm

Usage

const npm = require('@funya._./gulp-wxapp-npm')

gulp.src('src/**/*.js')
    .pipe(npm())

src

import moment from 'moment';
import { request } from '../../utils';

Page({
  async onLoad () {
    const str = await Promise.resolve(request());
    const time = moment().format();
    wx.showToast({
      title,
      time,
    })
  }
})

dist

import regeneratorRuntime from '../../npm/regenerator-runtime/runtime-module.js'
import moment from '../../npm/moment/moment.js';
import { request } from '../../utils';

Page({
  async onLoad () {
    const str = await Promise.resolve(sayHello());
    const time = moment().format()
    wx.showToast({
      title,
      time,
    })
  }
})

Readme

Keywords

Package Sidebar

Install

npm i @funya._./gulp-wxapp-npm

Weekly Downloads

0

Version

0.1.7

License

ISC

Unpacked Size

9.9 kB

Total Files

7

Last publish

Collaborators

  • funya._.