Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-js2php

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-js2php

```bash npm install --save-dev gulp-js2php ```

  • 1.0.2-1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

使用方式

npm install --save-dev gulp-js2php

gulpfile.js 配置:

const js2php = require('gulp-js2php').js2php;
const getUnescapePhp = require('gulp-js2php').getUnescapePhp;

gulp.src(['./test/test.js'])
  .pipe(js2php())
  .pipe(gulp.dest('./test/dist'))
  .pipe(getUnescapePhp({path: './test/dist'}))

ps: 由于是把js文件转换成php文件,是经过一定的编码,如果再php文件中想要使用转义后的js的内容,需要通过getUnescapePhp生成unescape.php的解码文件,进行解码; getUnescapePhp中的需要传入产生unescape.php的目录

FAQs

Package last updated on 14 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc