Skip to content

stellarwp/tyson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tyson (WIP!)

This is a work in progress! It should not be used in production.

Create and manage custom configurations to build projects with @wordpress/scripts.

This is not a wrapper of @wordpres/scripts

Tyson does not wrap @wordpress/scripts or its commands. Instead, tt provides a utility to create and maintain customized configuration files for your project to allow you to use @wordpress/scripts to build and package it.

Tyson comes with a number of configuration presets used by StellarWP teams.

Each configuration preset is composed of configuration schemas and tweaks.

Configuration sets, schemas and tweaks might fit your use case or not. You are free to use them or ignore them.

Installation

To install @stellarwp/tyson, you can use npm or yarn.

Navigate to your project directory and run one of the following commands:

Using npm:

npm install @stellarwp/tyson --save-dev

Using yarn:

yarn add @stellarwp/tyson --dev

While installing Tyson, and with it the @wordpress/scripts package, you might run into issues with incompatible dependencies, especially if your project is using old versions of libraries used by @wordpress/scripts. Dealing with these incompatibilities is not something Tyson can do for you: each project is different and has its own quirks.

Take courage in knowing that, once you've solved the issues, the hardest part is likely done.

Usage

This package provides a tyson binary that will be placed under your project's bin/ folder when you install it.

Whenever you need help with how to use it, you can run:

node_modules/.bin/tyson --help

Initializing a new project

Initialize your custom webpack.config.js file using the default configuration:

node_modules/.bin/tyson init

The default configuration will scaffold a webpack.config.js file that will allow you to customize the behaviour of the @wordpress/scripts library. By default, tyson will not use any configuration preset and will scaffold a webpack.config.js file that will not customize the behaviour in any meaningful way, but it will provide commented examples of how you could do it using the facilities provided by Tyson.

By default @wordpress/scripts will build from the /src directory to the /build one.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published