Js Toolbox Save Abandoned

CLI tool to simplify the development of JavaScript apps/libraries with little to no configuration. (WORK IN PROGRESS/PACKAGE NOT PUBLISHED).

Project README

borela-js-toolbox

GitHub watchers GitHub stars GitHub issues GitHub pulls GitHub forks

Build Travis Build Appveyor NodeJS version David Platforms License All Contributors

Develop JavaScript apps/libraries with little to no configuration and still be allowed to use all bleeding edge features available through Babel and Webpack.

This tool can be installed globally and be used to compile any project that follows the expected directory structure.

Table of contents

  1. What’s included
  2. Installation
  3. Creating a simple JS library
  4. Creating an Express server
  5. Creating a Single Page React Application
  6. More information

What’s included

  • Commands to scaffold, build, lint, test and run the app;
  • All Babel’s experimental plugins are enabled by default;
  • Polyfills are included based on the browsers and minimum NodeJS version supported by your project;

Some features must be enabled explicitly either through command flags, configuration or project type:

Installation

npm install @borela-tech/js-toolbox -g

The toolbox uses ´“bb” as its command alias, to see the available options type:

bb --help

Creating a simple JS library

  1. Navigate to the directory you want to create the project;
  2. Run the command bb scaffold lib;

Run the tests:

bb test

# Or in watch mode.
bb test --watch

Lint the sources and tests:

bb lint

# ESLint will try to fix linting errors but be aware that not all of them can
# be fixed automatically.
bb lint --fix

And finally, to build:

bb build

# The previous command includes a lot of stuff that’s only needed during
# development and some of them require the toolbox to be installed. You
# need to set NODE_ENV to production to remove them:
bb build --production

Creating an Express server

  1. Navigate to the directory you want to create the project;
  2. Run the command bb scaffold-project express;

The commands to test, lint and build are the same but this time, you can also:

bb start

This command will start the server using nodemon and any changes to the files will restart the server.

Creating a Single Page React Application

  1. Navigate to the directory you want to create the project;
  2. Run the command bb scaffold-project react/spa;

The commands to test, lint and build are the same but this time, you can also:

bb serve

This command will spin up Webpack’s Development Server to serve your application on localhost:9000. Features included:

  • React Hot Loader to enable hot reload of react components without losing state;
  • Pretty error messages;

More information

To see the available commands/flags you can find more information on our wiki or type --help next to the command in question:

bb --help
bb build --help
bb test --help
# Etc...

Contributors

Thanks goes to these wonderful people (emoji legend):


Alexandre Borela

💻 🎨 📖 👀 ⚠️

Batarian711

🎨

This project follows the all-contributors specification. Contributions of any kind welcome!

If you are not included but created bug reports, sent ideas or patches please send a pull request to the .all-contributorsrc file.

Open Source Agenda is not affiliated with "Js Toolbox" Project. README Source: borela-tech/js-toolbox
Stars
52
Open Issues
0
Last Commit
5 years ago
License

Open Source Agenda Badge

Open Source Agenda Rating