@mage-catfish/react-scripts
Configuration and scripts for Create React App.
Last updated 5 months ago by deloreyj .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @mage-catfish/react-scripts 
SYNC missed versions from official npm registry.

react-scripts This package includes scripts and configuration used by Create React App. Please refer to its documentation:

Getting Started – How to create a new app. User Guide – How to develop apps bootstrapped with Create React App. Usage run npx create-react-app [app name] --scripts-version @mage-catfish/react-scripts

Purpose The purpose of this project is to provide a dev-ready starting point for modern react development at Magento.

It includes support for Hot Module Replacement with the webpack dev server from within a Magento instance

It also includes certain development best practices such as,

Style guide enforcement with eslint and prettier Git hooks to lint, test, and format staged changes pre-commit and pre-push A number of helpful npm scripts to make development smooth Redux support with Redux starter kit, React redux, and Redux thunk Test helpers with React-Testing-Library To use the dev server, simply run npm start and add loader.js to your template file in Magento like so

<script src="http://localhost:3000/loader.js"></script>

This setup attempts to be unopinionated and as such does not include

A css pre-processor React Spectrum What if I just want the dev server in my existing project? Once your CRA project is bootstrapped, you can still get the dev server to help in your day-to-day Magento development.

Here's the process:

run npm uninstall react-scripts from your project directory run npm install @mage-catfish/react-scripts add a file called public-path.js to your source with this in it. Import this file on line 1 of index.js like so. This is necessary for webpack to load static assets from the correct location in the dev server. add or update your public/loader.js file similar to this file. The important parts are the currentBaseUrl assignment, the 3 files being loaded, and the window global assignment. Add loader.js to your template file in Magento like so <script src="http://localhost:3000/loader.js"></script> Navigate to the page in your Magento instance, make a change in your dev code, and the page should update or refresh on save.

Current Tags

  • 3.3.3                                ...           latest (5 months ago)

22 Versions

  • 3.3.3                                ...           5 months ago
  • 3.3.2                                ...           5 months ago
  • 3.3.1                                ...           5 months ago
  • 3.3.0                                ...           5 months ago
  • 0.4.2                                ...           6 months ago
  • 0.4.1                                ...           6 months ago
  • 0.4.0                                ...           6 months ago
  • 0.3.0                                ...           6 months ago
  • 0.2.0                                ...           7 months ago
  • 0.1.12                                ...           9 months ago
  • 0.1.11                                ...           10 months ago
  • 0.1.10                                ...           10 months ago
  • 0.1.9                                ...           10 months ago
  • 0.1.8                                ...           10 months ago
  • 0.1.7                                ...           10 months ago
  • 0.1.6                                ...           10 months ago
  • 0.1.5                                ...           10 months ago
  • 0.1.4                                ...           10 months ago
  • 0.1.3                                ...           10 months ago
  • 0.1.2                                ...           10 months ago
  • 0.1.1                                ...           10 months ago
  • 0.1.0                                ...           10 months ago

Copyright 2014 - 2016 © taobao.org |