All Projects → FormidableLabs → Whackage

FormidableLabs / Whackage

Licence: mit
Multi-repo development tooling for React Native

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Whackage

Create New Cli
Create your own CLI using a series of simple commands.
Stars: ✭ 122 (-8.96%)
Mutual labels:  npm
Flagpack Core
Flagpack contains 260+ easily implementable flag icons to use in your design or code project.
Stars: ✭ 127 (-5.22%)
Mutual labels:  npm
Web Starter Kit
Web Starter Kit is an opinionated boilerplate for web development. A solid starting point for both professionals and newcomers to the industry.
Stars: ✭ 130 (-2.99%)
Mutual labels:  npm
Atbmarket
🎉 JUST FOR FUN :: npm package of ATB plastic bag
Stars: ✭ 123 (-8.21%)
Mutual labels:  npm
Npm Module Checklist
Steps to check when starting, working and publishing a module to NPM
Stars: ✭ 125 (-6.72%)
Mutual labels:  npm
Importabular
5kb spreadsheet editor for the web, let your users import their data from excel.
Stars: ✭ 129 (-3.73%)
Mutual labels:  npm
React Use Localstorage
(seeking maintainers) ⚓ React hook for using local storage
Stars: ✭ 122 (-8.96%)
Mutual labels:  npm
Tsparticles
tsParticles - Easily create highly customizable particles animations and use them as animated backgrounds for your website. Ready to use components available for React.js, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Inferno, Solid, Riot and Web Components.
Stars: ✭ 2,694 (+1910.45%)
Mutual labels:  npm
Pnpm
Fast, disk space efficient package manager -- 快速的,节省磁盘空间的包管理工具
Stars: ✭ 14,219 (+10511.19%)
Mutual labels:  npm
Npmcharts.com
Compare npm package downloads over time
Stars: ✭ 129 (-3.73%)
Mutual labels:  npm
Npm Link Shared
links a folder of local modules with inter-dependencies to the target directory
Stars: ✭ 123 (-8.21%)
Mutual labels:  npm
Npm Expansions
Send us a pull request by editing expansions.txt
Stars: ✭ 1,777 (+1226.12%)
Mutual labels:  npm
Tiny Package Manager
Learn how npm or Yarn v1 works.
Stars: ✭ 125 (-6.72%)
Mutual labels:  npm
Greenkeeper
🤖 🌴 Real-time automated dependency updates for npm and GitHub
Stars: ✭ 1,564 (+1067.16%)
Mutual labels:  npm
Nestjs Rbac
Awesome RBAC for NestJs
Stars: ✭ 129 (-3.73%)
Mutual labels:  npm
Example Rollup React Component Npm Package
Example React Component, Published to npm
Stars: ✭ 122 (-8.96%)
Mutual labels:  npm
Try
📦 Quickly try out NPM packages inside a container
Stars: ✭ 128 (-4.48%)
Mutual labels:  npm
Replem
🚴 Instantly try npm modules in REPL environment
Stars: ✭ 132 (-1.49%)
Mutual labels:  npm
Chainabstractionlayer
Blockchain abstraction layer
Stars: ✭ 131 (-2.24%)
Mutual labels:  npm
Vscode Deploy Reloaded
Recoded version of Visual Studio Code extension 'vs-deploy', which provides commands to deploy files to one or more destinations.
Stars: ✭ 129 (-3.73%)
Mutual labels:  npm

whackage

npm version Maintenance Status

Multi-repo development tooling for React Native


What is this?

whackage provides a hot-reload-friendly workflow for developing across multiple React Native packages

React Native packager, the development server that bundles your app's JavaScript sources, has a few rough edges when it comes to developing apps and libraries that span across multiple repositories. It doesn't handle symlinks reliably, and the Haste module system gets easily confused by @providesModule declarations in subdependencies.

Whackage is an npm link replacement that works with React Native. It synchronizes changes in your local workspace to your project's node_modules without using symlinks, and automatically generates a packager blacklist for linked modules to avoid Haste naming collisions.

We wrote whackage to scratch our own itch when working on Victory Native. It's a blunt instrument, but it works well. Hope you find it useful!

How-to

Quick start

# install whackage globally
npm i -g whackage

# rest of the steps happen in your project root directory
cd ~/your-project-directory

# create new whackage.json
whack init

# create a link to a package you want to make changes to
whack link ../path/to/other/package

# start react native packager and the whackage server (equivalent to npm start)
whack run start

More detailed instructions of each step below:

Prerequisites

  • node >=4
  • npm >=3
  • OSX/Linux. Windows currently not supported, but PRs welcome.
  • rsync (most likely pre-installed on your system)

Install

Install whackage globally:

npm i -g whackage

Initialize whackage in your project

You'll now have access to the whack command on your command line. To get started, generate an empty whackage.json in your project's root directory:

whack init

Link modules

You can then link local copies of React Native libraries to your project with whack link <path>, e.g.:

whack link ../victory-core-native
whack link ../victory-chart-native

You'll now have a whackage.json file that looks as follows:

{
  "include": "/**/*.js",
  "exclude": ["/node_modules/*", ".babelrc", ".git"],
  "dependencies": {
    "victory-chart-native": "../victory-chart-native",
    "victory-core-native": "../victory-core-native"
  }
}

The dependencies map specifies which modules to synchronize, and paths to directories where to look for the sources.

By default whackage watches changes to .js files, and ignores your sources' node_modules and git metadata. We also skip copying Babel configurations, because the React Native packager does not support per-module configurations, and project-specific presets often causes the Babel transpilation step to fail.

You can configure the include and exclude glob patterns as needed.

Start packager

Start the packager server with whack run <command>, where command is the npm script you normally use to start your development server.

If you usually start the server with npm start, the corresponding whackage command is:

whack run start

(Alternatively, if your start task is npm run server:dev, you'd use whack run server:dev!)

When started, the whackage server will overwrite the specified dependencies in your node_modules with the sources you linked with whack link, and start a file watcher that synchronizes changes made in the source directories into your node_modules as they happen.

It will also specify a CLI config which adds the node_modules within linked source directories to the Haste blacklist to avoid @providesModules naming collisions.

Update transitive dependencies

When you whack link a package, whackage automatically installs and flattens transitive dependencies into your project. If you change the dependencies of your linked packages, you'll need to run whack install to add them to your project:

whack install victory-chart-native

Or sync all transitive dependencies or all linked packages:

whack install

Stop whacking

When you're done making changes to your local packages, you can remove the whackage.json entry and reset the module to its original state:

whack unlink victory-chart-native

To reset your your original dependencies, but keep the whackage.json around for the next time you want to work with that package, simply nuke your node_modules:

rm -rf node_modules && npm i

API

Run whack --help for a list of all available commands and options.

Misc

Why the name?

It's wacky, it's hacky, and it rhymes with package. Also it whacks your node_modules.

Contributing

Found an issue or a missing feature? Congratulations! 🎉 That is the prize you win as an early adopter! GitHub issues and pull requests are more than welcome.

Please note

This project is in a pre-release state. The API may be considered relatively stable, but changes may still occur.

MIT licensed

Maintenance Status

Archived: This project is no longer maintained by Formidable. We are no longer responding to issues or pull requests unless they relate to security concerns. We encourage interested developers to fork this project and make it their own!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].