文件名称:Chrome扩展fb-flo.zip
文件大小:29KB
文件格式:ZIP
更新时间:2022-08-08 01:12:04
开源项目
fb-flo 是一个 Chrome 扩展,它可以让你不需要重载就能改变运行中的 APP。它很容易就能整合你建立的系统、dev 环境,并且能用于你最喜欢的编辑器上。示例代码:var flo = require('fb-flo'), path = require('path'), fs = require('fs');var server = flo( sourceDirToWatch, { port: 8888, host: 'localhost', verbose: false, glob: [ // All JS files in `sourceDirToWatch` and subdirectories '**/*.js', // All CSS files in `sourceDirToWatch` and subdirectories '**/*.css' ] }, function resolver(filepath, callback) { // 1. Call into your compiler / bundler. // 2. Assuming that `bundle.js` is your output file, update `bundle.js` // and `bundle.css` when a JS or CSS file changes. callback({ resourceURL: 'bundle' path.extname(filepath), // any string-ish value is acceptable. i.e. strings, Buffers etc. contents: fs.readFileSync(filepath), update: function(_window, _resourceURL) { // this function is executed in the browser, immediately after the resource has been updated with new content // perform additional steps here to reinitialize your application so it would take advantage of the new resource console.log("Resource " _resourceURL " has just been updated with new content"); } }); } ); 标签:fbflo
【文件预览】:
fb-flo-master
----client()
--------manifest.json(314B)
--------logger.js(1004B)
--------session.js(8KB)
--------background.js(289B)
--------configure()
--------logo.png(2KB)
--------devtools.html(243B)
--------index.js(9KB)
--------connection.js(5KB)
----PATENTS(2KB)
----lib()
--------server.js(2KB)
--------flo.js(5KB)
----LICENSE(1KB)
----test()
--------client()
--------server()
----README.md(6KB)
----.gitignore(23B)
----index.js(346B)
----bin()
--------flo(409B)
----package.json(475B)