### Installing @barba/prefetch with npm Source: https://github.com/barbajs/barba/blob/main/packages/prefetch/README.md This snippet demonstrates how to install the @barba/prefetch package using npm, saving it as a development dependency. This is a common method for adding project-specific tools. ```shell npm install --save-dev @barba/prefetch ``` -------------------------------- ### Installing @barba/core with npm (Shell) Source: https://github.com/barbajs/barba/blob/main/packages/core/README.md This command installs the `@barba/core` package using npm, saving it as a development dependency. It's essential for setting up Barba.js in a project. ```sh npm install --save-dev @barba/core ``` -------------------------------- ### Installing @barba/prefetch with Yarn Source: https://github.com/barbajs/barba/blob/main/packages/prefetch/README.md This snippet shows how to install the @barba/prefetch package using Yarn, saving it as a development dependency. Yarn is an alternative package manager to npm, offering similar functionality. ```shell yarn add @barba/prefetch --dev ``` -------------------------------- ### Installing @barba/core with Yarn (Shell) Source: https://github.com/barbajs/barba/blob/main/packages/core/README.md This command installs the `@barba/core` package using Yarn, adding it as a development dependency. It provides an alternative installation method to npm for Barba.js projects. ```sh yarn add @barba/core --dev ``` -------------------------------- ### Installing @barba/router with yarn Source: https://github.com/barbajs/barba/blob/main/packages/router/README.md This command installs the `@barba/router` package as a development dependency using yarn. It provides an alternative to npm for managing project dependencies. ```sh yarn add @barba/router --dev ``` -------------------------------- ### Installing @barba/router with npm Source: https://github.com/barbajs/barba/blob/main/packages/router/README.md This command installs the `@barba/router` package as a development dependency using npm. It's essential for integrating routing capabilities into a Barba.js project. ```sh npm install --save-dev @barba/router ``` -------------------------------- ### Installing @barba/css using npm Source: https://github.com/barbajs/barba/blob/main/packages/css/README.md This command installs the `@barba/css` package as a development dependency using npm. It adds the package to your project's `devDependencies` in `package.json`, making it available for build processes or local development. ```sh npm install --save-dev @barba/css ``` -------------------------------- ### Installing @barba/css using Yarn Source: https://github.com/barbajs/barba/blob/main/packages/css/README.md This command installs the `@barba/css` package as a development dependency using Yarn. It serves as an alternative to npm, adding the package to your project's `devDependencies` for development and build environments. ```sh yarn add @barba/css --dev ``` -------------------------------- ### Publishing Beta and Production Releases with Lerna Source: https://github.com/barbajs/barba/blob/main/NOTES.md This snippet demonstrates a sequence of commands for publishing Barba.js packages. It includes running tests, publishing a canary release tagged 'next', and then publishing a full release with GitHub release integration, optionally forcing publication for all packages. ```sh yarn test lerna publish --canary --preid next --dist-tag next lerna publish --github-release --force-publish=* lerna publish --github-release ``` -------------------------------- ### Semantic Release Configuration in package.json for sassy-beam (JSON) Source: https://github.com/barbajs/barba/blob/main/CI.md This `package.json` snippet defines the `release` configuration for sassy-beam, specifying `npm`, `exec` (for `npm run doc`), and `git` plugins for semantic release. It configures the `git` plugin to include `docs` in the release commit and customize the commit message. ```json "release": { "prepare": [ "@semantic-release/npm", { "path": "@semantic-release/exec", "cmd": "npm run doc" }, { "path": "@semantic-release/git", "assets": [ "docs" ], "message": "docs(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" } ] } ``` -------------------------------- ### Testing Lerna Publish with Verdaccio Local Registry Source: https://github.com/barbajs/barba/blob/main/NOTES.md This snippet shows how to test Lerna package publishing against a local npm registry like Verdaccio. It involves adding a user to the local registry and then publishing a canary release to that registry. ```sh npm adduser --registry http://localhost:4873 lerna publish --registry http://localhost:4873 --canary --preid next ``` -------------------------------- ### Travis CI Configuration for sassy-beam Module (Node.js) Source: https://github.com/barbajs/barba/blob/main/CI.md This Travis CI configuration for sassy-beam sets up Node.js versions 8, 9, and 10, caches npm dependencies, disables email notifications, and uses `semantic-release` for automated deployment after successful builds. ```yml language: node_js cache: directories: - ~/.npm notifications: email: false node_js: - '10' - '9' - '8' after_success: - npm run travis-deploy-once "npm run semantic-release" branches: except: - /^v\d+\.\d+\.\d+$/ ``` -------------------------------- ### Travis CI Configuration for @snitch Module (Node.js) Source: https://github.com/barbajs/barba/blob/main/CI.md This Travis CI configuration specifies Node.js version 8 for the @snitch module and runs `npm run coverage` after successful builds to generate code coverage reports. ```yml language: node_js node_js: - "8" after_success: 'npm run coverage' ``` -------------------------------- ### Jest Babel Configuration Syntax Error in Barba.js Source: https://github.com/barbajs/barba/blob/main/TODO.md This snippet displays a `SyntaxError: Unexpected identifier` encountered when Jest attempts to process JavaScript files within the `@barba/core` package. The error points to an `import` statement, indicating a problem with Babel's configuration not correctly transpiling ES module syntax for Jest's test environment, likely due to misconfigured `babel.config.js` or `.babelrc.js` files. ```JavaScript @barba/core: import barba from '../src'; @barba/core: ^^^^^ @barba/core: SyntaxError: Unexpected identifier @barba/core: at ScriptTransformer._transformAndBuildScript (../../node_modules/jest-runtime/build/script_transformer.js:403:17) @barba/core: babel.config.js:root @barba/core: .babelrc.js:core ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.