flipfind

2019-05-26 admin

flipfind是什么

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

flipfind使用教程帮助文档

<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 Status NPM version fliphub flipfam Dependencies MIT License Standard JS Style NSP Status examples-badge PRs Welcome

the builder, of builders.

<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

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 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 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 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, and webpack? 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 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 default and can be customized for any config you want

<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 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 rollup or any other supported build system.
  • existing configs can be used and enhanced with ease.
  • easily create presets & hubs to start converting your build system to another, flip the switch to keep compatibility without breaking everything,

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

  • examples-minimal
  • examples-canadas
  • examples-monorepo
  • examples-react
  • examples-react-and-alias
  • examples-typescript
  • examples-node
  • examples-lint
  • examples-compat <g-emoji class=“g-emoji” alias=“construction” fallback-src=“https://github.githubassets.com/images/icons/emoji/unicode/1f6a7.png”>🚧</g-emoji>
  • examples-tests <g-emoji class=“g-emoji” alias=“construction” fallback-src=“https://github.githubassets.com/images/icons/emoji/unicode/1f6a7.png”>🚧</g-emoji>
  • examples-webworker <g-emoji class=“g-emoji” alias=“construction” fallback-src=“https://github.githubassets.com/images/icons/emoji/unicode/1f6a7.png”>🚧</g-emoji>
  • examples-code-splitting <g-emoji class=“g-emoji” alias=“construction” fallback-src=“https://github.githubassets.com/images/icons/emoji/unicode/1f6a7.png”>🚧</g-emoji>
  • examples-es6-ts-config <g-emoji class=“g-emoji” alias=“construction” fallback-src=“https://github.githubassets.com/images/icons/emoji/unicode/1f6a7.png”>🚧</g-emoji>
  • examples-flags <g-emoji class=“g-emoji” alias=“construction” fallback-src=“https://github.githubassets.com/images/icons/emoji/unicode/1f6a7.png”>🚧</g-emoji>

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

<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 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 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 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 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 flipbox but is unmaintained.

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-65766.html

文章标题:flipfind

回到顶部