Fueling your scaffolding.


16121.0.34 years ago4 years agoMinified + gzip package size for alphax in KB


Fueling your scaffolding.

NPM version NPM downloads Build Status donate

What is alphaX?

alphaX provides very simple JSON-like and chained APIs that allow you to manipulate files freely. Now it supports glob, task control, middleware, rename, filter and transform file as well.

BTW, alphaX was named from the Greek initials ฮฑ and spaceX I admire.


  • ๐Ÿš€ Fast, based on stream.
  • ๐Ÿ“ฆ Chained API.
  • ๐Ÿ’… Using middlewares to process each file.
  • ๐Ÿšจ Asynchronous task control.
  • ๐ŸŒˆ Filter or Rename files with a pure function or configuration.
  • ๐Ÿ’Ž Support Condiitonal Manipulation


npm i alphax --save 
# Pay attention to the case, NPM does not support capitals. ๐Ÿ˜…
# Or yarn add alphax


import alphax from 'alphax'
// Or cjs: const app = require('alphax')
const app = alphax()
  • Chained Style
  .use(file => file.content +=
  .rename(filepath => filepath.replace('{name}', name))
  .rename(filepath => filepath.replace('{age}', age))
  .transform(content => content.replace('{name}', name))
  .filter(filepath => filepath.endWith('.js'))
  .filter(filepath => !filepath.startWith('test'))
  .then(files => console.log(files))
  .catch(error => console.log(error))
  • Config Style
const config = {
  tasks: [task1, task3, task3],
  use: file => file.content +=,
  rename: {
    '{name}': name,
    '{age}': age
  filter: {
    'app.js': true,
    'test.js': false
  transform(content) {
    return content.replace('{name}', name)

  .src('**', config)
  .then(files => console.log(files))
  .catch(error => console.log(error))

For detailed usage please head to

Projects Using alphaX

  • poz: Programmable scaffolding generator. ๐Ÿน
  • Feel free to add yours here :)

Prior art

alphaX wouldn't exist if it wasn't for excellent prior art, alphaX is inspired by these projects:


  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D


alphaX ยฉ ulivz, Released under the MIT License.
Authored and maintained by ulivz with help from contributors (list). ยท GitHub @ulivz

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from