# lodgify-scripts

> Front-end code for Lodgify templates

Latest version **1.0.1** (published 2018-01-04) · © 2012 - 2017 lodgify.com license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install lodgify-scripts
pnpm add lodgify-scripts
yarn add lodgify-scripts
bun add lodgify-scripts
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-01-04 |
| First published | 2018-01-04 |
| Weekly downloads | 0 |
| License | © 2012 - 2017 lodgify.com |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Lodgify |
| Maintainers | david.pelayo |

## Links

- npm: https://www.npmjs.com/package/lodgify-scripts
- Repository: git@github:lodgify/lodgify-scripts
- npm.io page: https://npm.io/package/lodgify-scripts

## Dependencies (5)

- [react-images](https://npm.io/package/react-images.md) ^0.5.13
- [jquery.tooltips](https://npm.io/package/jquery.tooltips.md) ^1.0.0
- [react-google-map](https://npm.io/package/react-google-map.md) ^3.1.0
- [bootstrap-only-css](https://npm.io/package/bootstrap-only-css.md) ^1.0.0
- [react-photo-gallery](https://npm.io/package/react-photo-gallery.md) ^6.0.22

## Recent versions

- 1.0.1 (latest) — 2018-01-04

## README

[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/)

# Lodgify scripts

Front-end code for Lodgify Templates & Website Renderer

## Getting Started

### 1. Install dependencies

Let's start by installing Lerna globally.

```sh
$ npm i --global lerna
// or
$ yarn global add lerna
```

Then install all the packages of the project (this also installs subpackage's dependencies)

```sh
# Using npm client
lerna bootstrap --hoist --npm-client=npm
# Using yarn client
lerna bootstrap --hoist
```

`lerna boostrap` will:

1. Install all external dependencies of each package (either using `npm i` or `yarn install` depending on the client chosen - `yarn` by default in `lerna.json`).
2. Symlink together all Lerna `packages` that are dependencies of each other.
3. `npm run prepublish` in all bootstrapped packages.
4. `npm run prepare` in all bootstrapped packages.

If you instead want to install dependencies manually, consider not to use lock files.

```sh
# In order not to commit and merge lock files, we've added a .npmrc specifying not to use them
# set the package-lock to false in your NPM global config if you consider so
# To do it, run: npm config set package-lock false
#
# To use the flag when installing, add the following (NPM)
npm i --package-lock=false
# To use the flag when installing, add the following (yarn)
yarn install --no-lockfile
```

### 2. Start

**General** commands which open the Interactive Command Line UI :
```sh
$ npm start
```

**Website Renderer** commands:
```sh
$ npm start renderer
$ npm run build renderer
$ npm run lint renderer
$ npm test renderer
```

**Templates** command
```sh
$ npm start template TEMPLATE_NAME
// Example
$ npm start template livingstone
$ npm run build template TEMPLATE_NAME
$ npm run lint template TEMPLATE_NAME
$ npm test template TEMPLATE_NAME
```


## Most important Lerna options


For all the available options, please check [Lerna's repo](https://github.com/lerna/lerna).
### Publishing new package version
```sh
lerna publish
```

Publish packages in the current Lerna project. When run, this command does the following:

Creates a new release of the packages that have been updated.
Prompts for a new version.
Creates a new git commit/tag in the process of publishing to npm.

#### --skip-git

```sh
$ lerna publish --skip-git
```

When run with this flag, `publish` will publish to npm without running any of the git commands.

#### --skip-npm

```sh
$ lerna publish --skip-npm
```

### Clean

```sh
$ lerna clean
```

Remove the `node_modules` directory from all packages.

`lerna clean` respects the `--ignore`, `--scope`, and `--yes` flags.

### Run

```sh
$ lerna run <script> -- [..args] # runs npm run my-script in all packages that have it
$ lerna run test
$ lerna run build

# watch all packages and transpile on change, streaming prefixed output
$ lerna run --parallel watch
```

Run an in each package that contains that script. A double-dash (`--`) is necessary to pass dashed arguments to the script execution.

`lerna run` respects the `--concurrency`, `--scope`, `--ignore`, `--stream`, and `--parallel` flags).

```sh
$ lerna run --scope my-component test
```

### exec

```sh
$ lerna exec -- <command> [..args] # runs the command in all packages
$ lerna exec -- rm -rf ./node_modules
$ lerna exec -- protractor conf.js
```

Run an arbitrary command in each package.
A double-dash (`--`) is necessary to pass dashed flags to the spawned command, but is not necessary when all the arguments are positional.

`lerna exec` respects the `--concurrency`, `--scope`, `--ignore`, and `--parallel` flags).

```sh
$ lerna exec --scope my-component -- ls -la
```

To spawn long-running processes, pass the `--parallel` flag:
```sh
# transpile all modules as they change in every package
$ lerna exec --parallel -- babel src -d lib -w
```

You may also get the name of the current package through the environment variable `LERNA_PACKAGE_NAME`:

```sh
$ lerna exec -- npm view \$LERNA_PACKAGE_NAME
```

You may also run a script located in the root dir, in a complicated dir structure through the environment variable `LERNA_ROOT_PATH`:

```sh
$ lerna exec -- node \$LERNA_ROOT_PATH/scripts/some-script.js
```

```sh
$ lerna exec --concurrency 1 -- ls -la
```

---
_Source: https://npm.io/package/lodgify-scripts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
