Giter Club home page Giter Club logo

fbjs-env's Introduction

fbjs-env is a set of scripts used to manage a node module and keep it up-to-date with the latest features of babel, eslint, flow and to provide some facilities for javascript development.

Usage

To create a package:

fbjs-env create some-package

This will create a scaffolding with the following elements:

  • A package.json with the supported versions of babel, eslint, flow, mocha, chai.
  • A .eslintrc and .flowconfig to configure eslint and flow respectively
  • A src directory where you place your uncompiled ES6 code.
  • Scripts:
    • mocha-bootload.js: This does runtime compilation of ES6 to ES5 so that tests are run without a build step
    • watch.js: This is used by npm run watch
  • An .npmignore that ignores the target directory for compiled code (dist) as well as other things
  • A .gitignore with appropriate exclusions.

Package.json has the following commands:

  • npm run watch: Run this in its own terminal. It monitors the file system and runs lint, flow checks, and test on every file save.
  • npm run lint: Run lint
  • npm run testonly: Run only test without lint checks. This is useful for TDD-style development where you might not be lint-compliant all the time.
  • npm run check: Do a flow check

fbjs-env update some-package

This command updates an existing package that conforms to the fbenv standards.

It rewrites package.json while preserving the entries in package.json which fbenv does not control. It also only adds to .gitignore and .npmignore. Existing entries are not deleted. It completely overwrites any scripts in the file system.

  • It overwrites entries in package.json that fbenv controls
    • Modules:
      • babel
      • babel-core
      • babel-runtime
      • babel-eslint
      • chai
      • eslint
      • eslint-plugin-babel
      • flow-bin
      • mocha
      • sane
    • package.json Scripts:
      • test
      • testonly
      • lint
      • check
      • watch
    • scripts:
      • scripts/mocha-bootload.js
      • scripts/watch.js

fbjs-env's People

Contributors

schrockn-zz avatar swolchok avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.