Socket
Socket
Sign inDemoInstall

b13-rocket

Package Overview
Dependencies
38
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    b13-rocket

FE CLI build tool


Version published
Maintainers
1
Created

Readme

Source

Rocket FE build setup

Requirements

  • node = 16.13.0 (https://nodejs.org/en/download/)
  • npm = 6.4.1 (https://www.npmjs.com/get-npm)
  • yarn = 1.12.3 (https://yarnpkg.com/en/docs/install)

Init

yarn install

Build JS and CSS

yarn rocket build

CLI Options

yarn rocket help


Caches

webpack and babel-loader build caches are stored in node_modules/.cache/


TYPO3 Setup

Site Extension JS include setup:

constants.typoscript

# enable hot module replacement (hmr)
enableHMR = 0
enableHMR := getEnv(TYPO3_TS_ENABLE_HMR)

setup.typoscript

page.includeJSFooter {
    vendor = EXT:YOUR_EXT_NAME/Resources/Public/JavaScript/common-vendor.js
    vendor.if.isFalse = {$enableHMR}
    vendor.type = module
    main = EXT:YOUR_EXT_NAME/Resources/Public/JavaScript/main.js
    main.if.isFalse = {$enableHMR}
    main.type = module

    # if hot module replacement is enabled
    vendor-hmr = https://DOMAIN:8088/typo3conf/ext/YOUR_EXT_NAME/Resources/Public/JavaScript/common-vendor-hmr.js
    vendor-hmr.if.isTrue = {$enableHMR}
    main-hmr = https://DOMAIN:8088/typo3conf/ext/YOUR_EXT_NAME/Resources/Public/JavaScript/main-hmr.js
    main-hmr.if.isTrue = {$enableHMR}
}

Update to Yarn v3

// switch to latest yarn version
yarn set version berry

// update node dependencies 
yarn install
yarn remove b13-build-cli
yarn add "b13-build-cli@ssh://git@code.b13.com/infrastructure/rocket-cli.git#^0.3.0"

Update .gitignore

.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

Update package.json script call: (use 'yarn node' instead of 'node')

....
"scripts": {
    "rocket": "yarn node ./node_modules/b13-build-cli/index.js",
}
...

Use hmr inside ddev container

  1. Copy files from files directory to your .ddev directory.
  2. Restart ddev (ddev restart)
  3. Start rocket via ddev command: ddev rocket, ddev rocket hmr --site=.... etc.

FAQs

Last updated on 07 Dec 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc