flipfind

2019-05-26

flipfind是什么

什么是flipfind,auto-find & resolve a file or path that is somewhere nearby in an optimized manner

flipfind使用教程帮助文档

🏗</g-emoji><g-emoji class="g-emoji" alias="diamond_shape_with_a_dot_inside" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4a0.png">💠</g-emoji> fliphub"><g-emoji class="g-emoji" alias="building_construction" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f3d7.png">🏗</g-emoji><g-emoji class="g-emoji" alias="diamond_shape_with_a_dot_inside" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4a0.png">💠</g-emoji> fliphub

Build StatusNPM versionfliphubflipfamDependenciesMIT LicenseStandard JS StyleNSP Statusexamples-badgePRs Welcome

the builder, of builders.

👾</g-emoji> all you need"><g-emoji class="g-emoji" alias="space_invader" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f47e.png">👾</g-emoji> all you need

see the example">see the example

enables configs that would take hundreds or thousands of lines, with just a few properties.

const FlipHub = require('fliphub')
new FlipHub({entry: './src/index.js'}).build()

📦</g-emoji> installation"><g-emoji class="g-emoji" alias="package" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4e6.png">📦</g-emoji> installation

yarn add fliphub
npm i fliphub --save

🗝️</g-emoji> legend"><g-emoji class="g-emoji" alias="old_key" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f5dd.png">🗝️</g-emoji> legend

  • introduction
  • all the apps
  • flipfam
  • fliphub-core
    • presets
    • hubs
  • examples
  • apps
  • cli
  • terminology

📅</g-emoji>❗ changelog"><g-emoji class="g-emoji" alias="date" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4c5.png">📅</g-emoji>❗ changelog

keep up to date! updated frequently.

all the apps

one app? two apps? 100 apps? fusebox, rollup, andwebpack? nodejs server, inferno, and react? existing configs? happy and no happy pack? at the same time? no sweat.

const FlipHub = require('fliphub')

// take an existing config, flip it to fusebox or rollup or webpack
const config = require('./webpack.config.js')
config.flips = {to: 'fusebox'}

const apps = [
  config,

  {
    name: 'infernod',
    entry: './src/index.js',
    presets: ['inferno', 'neutrino-preset-happypack', 'web'],
  },
  {
    name: 'backend',
    entry: './backend/src',
    presets: ['node'],
  },
]

FlipHub.init({apps}).build()

♻️</g-emoji> reusability?"><g-emoji class="g-emoji" alias="recycle" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/267b.png">♻️</g-emoji> reusability?

const { FlipHub } = require('fliphub')
const apps = [
  {
    name: 'reacted',
    presets: ['react'],
  },
  {
    name: 'infernod',
    presets: ['inferno'],
  },
]

FlipHub.init({
  presets: {
    reusable: {
      entry: './src/index.js',
      flips: {to: 'fusebox'},
    },
  },
  apps,
}).build()

they are configured for each environment by defaultand can be customized for any config you want

⚠️</g-emoji> the problem"><g-emoji class="g-emoji" alias="warning" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/26a0.png">⚠️</g-emoji> the problem

  • build systems are notorious for their difficulty.
  • finding and setting up the right
    • scripts
    • plugins
    • loaders
    • configs
    • requiring the dependencies
    • bloating your config files
    • making configs for
      • development bundling
      • production bundling
      • production dev bundling
      • test environments
      • development servers
      • production servers
  • tedious, with a high barrier of entry
  • time intensive; switching build systems for 1 app is grueling
  • ... all of the above for every application

✔️</g-emoji> the solution"><g-emoji class="g-emoji" alias="heavy_check_mark" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2714.png">✔️</g-emoji> the solution

  • with the flip of a flag, you can go from webpack, to fusebox, to rollupor any other supported build system.
  • existing configs can be used and enhanced with ease.
  • easily create presets & hubsto start converting your build system to another, flip the switch to keep compatibility without breaking everything,

📘</g-emoji> examples"><g-emoji class="g-emoji" alias="blue_book" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4d8.png">📘</g-emoji> examples

📚</g-emoji> documentation"><g-emoji class="g-emoji" alias="books" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4da.png">📚</g-emoji> documentation

💠</g-emoji> hubs (middleware +)"><g-emoji class="g-emoji" alias="diamond_shape_with_a_dot_inside" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4a0.png">💠</g-emoji> hubs (middleware +)

docs hubs

🚩</g-emoji> flags"><g-emoji class="g-emoji" alias="triangular_flag_on_post" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f6a9.png">🚩</g-emoji> flags

🏳️</g-emoji> filters">☕<g-emoji class="g-emoji" alias="white_flag" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f3f3.png">🏳️</g-emoji> filters

white-list flags are used to filter which apps are run for different operations

🏹</g-emoji> aliasing"><g-emoji class="g-emoji" alias="bow_and_arrow" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f3f9.png">🏹</g-emoji> aliasing

see the alias docs

🍰</g-emoji> presets"><g-emoji class="g-emoji" alias="cake" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f370.png">🍰</g-emoji> presets

see the preset documentation

const apps = [{
  presets: ['alias-resolve', 'neutrino-preset-web', 'eslint'],
}]

const appsWithArgs = [{
  presets: {
    aliasResolve: __dirname,
    presetWeb: null,
    eslint: require('./.eslintrc.js')
  },
}]

v0

v0 is still available as flipboxbut is unmaintained.


上一篇:如何理解_proto_和prototype
下一篇:json-chain
相关教程
关注微信

扫码加入 JavaScript 社区

相关文章
暂无相关文章

首次访问,需要验证
微信扫码,关注即可
(仅需验证一次)

欢迎加入 JavaScript 社区

号内回复关键字:

回到顶部