GithubHelp home page GithubHelp logo

eternalsky / nanachi-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from roland-reed/nanachi-cli

0.0 2.0 0.0 196 KB

CLI for nanachi - transform React to WeChat mini program

License: Apache License 2.0

JavaScript 64.35% TypeScript 35.65%

nanachi-cli's Introduction

nanchi 脚手架

nanachi 是一个可以将 React 代码转译成微信小程序的一个转译器。

使用

执行 npm i -g nanachi 以全局安装 nanachi

执行 nanachi init 初始化一个项目。

在项目根目录执行 nanachi start 开发应用程序。

在项目根目录执行 nanachi build 编译项目。

开发

在项目目录依次执行以下命令:

npm i
npm link

# or if you use yarn
yarn
yarn link

npm run dev:ts

# open another terminal
npm run dev:js

项目代码由 typescript 编写,先用 tsc 命令编译至 javascript 文件,再用 rollup 打包至 lib/index.js 文件中。

这些命令会在本地启动一个自动的 typescript 编译器以及一个自动的 rollup 编译器,src/ 目录下的任何文件变动都会触发编译和打包,编译打包完成之后,在任何目录下执行 nanachi 即可使用最新编译的代码。

Credit

此项目中的转译代码来自 anujs

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.