GithubHelp home page GithubHelp logo

mocanew / babel-changed Goto Github PK

View Code? Open in Web Editor NEW

This project forked from smartprix/babel-changed

0.0 0.0 0.0 64 KB

Only compile changed files with babel

Home Page: https://www.npmjs.com/package/@smpx/babel-changed

License: MIT License

JavaScript 100.00%

babel-changed's Introduction

babel-changed

Version Downloads License Dependencies Dev Dependencies

A command line tool that only compiles changed files with babel.

Install

Globally:

npm install -g @smpx/babel-changed
# OR
yarn global add @smpx/babel-changed

Or locally:

npm install @smpx/babel-changed --save-dev
# OR
yarn add @smpx/babel-changed --dev

Use

Default source directory is src and default out directory is dist

babel-changed
# Output
[babel] compiling 1 files
babel-changed: 1413.925ms

See Options & Help

bebel-changed -h

Usage: babel-changed [options]

Options:
  -V, --version                output the version number
  -s, --src [dir]              Specify Source Directory (default: "src")
  -d, --dest [dir]             Specify Destination Directory (default: "dist")
  -f, --file-glob [pattern]    Glob pattern to match files in source directory
                               (default: "**/*.*" (all files))
  -i, --ignore-glob [pattern]  Glob pattern to match files to ignore
                               (default: "**/node_modules/**" (ignore all files inside node_modules))
  -e, --extensions <exts>      Extensions to compile (comma separated) (default: ".js")
  -m, --source-maps [boolean]  Enable source maps (default: true)
  -c, --copy [boolean]         Copy files other than .js files (default: true)
  -h, --help                   output usage information

Using with options

If your source directory is source destination directory is out then use

babel-changed -s source -d out

Extensions/Typescript support

For compiling TS/JSX files with babel, change the extensions to compile like below:

babel-changed -e ".js,.ts"

NOTE: Extension of compiled file will always be .js.

babel-changed's People

Contributors

hit12369 avatar rohit-gohri 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.