helinjiang / babel-d Goto Github PK
View Code? Open in Web Editor NEWbabel -d 的node场景调用
License: MIT License
babel -d 的node场景调用
License: MIT License
以下代码调用时, babelCompile
并不是方法
var babelCompile = require('babel-d');
需要修改为
var babelCompile = require('babel-d').default;
// 或者
// import babelCompile from 'babel-d';
这样并不方便
原因是获取图片时,使用 utf8
来读取了文件内容,然后再保存时图片就会被损坏
let content = fs.readFileSync(srcFullPath, 'utf8');
官方已经建议使用 https://github.com/babel/babel/tree/master/packages/babel-preset-env 了,因此需要升级下
由于我们在代码中使用到了 babel-core
等组件,但是却把这些组件放在了 devDependencies
中了,导致报错
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.