Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/yarn #67

Closed
wants to merge 6 commits into from
Closed
Changes from all commits
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

@@ -0,0 +1 @@
lts/carbon
@@ -1,15 +1,15 @@
language: node_js
node_js:
- "9"
- "lts/carbon"
sudo: false

before_install:
- npm i -g npm
cache:
yarn: true

install:
- npm ci --silent
- yarn install --frozen-lockfile

script:
- node ./tools/licenses/fetchLicenses.js
- npm run lint
- npm run test.unit
- yarn run lint
- yarn run test.unit
@@ -3,12 +3,15 @@ FROM node:8
RUN curl https://s3.amazonaws.com/cdncliqz/update/ghostery/moab/moab_8319dab > /bin/moab && \
chmod +x /bin/moab

RUN curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.6.0
export PATH=$HOME/.yarn/bin:$PATH

ARG UID
ARG GID
RUN groupadd jenkins -g $GID \
&& useradd -ms /bin/bash jenkins -u $UID -g $GID

USER jenkins
COPY package.json /home/jenkins/
COPY package-lock.json /home/jenkins/
RUN cd /home/jenkins/ && npm install
COPY yarn.lock /home/jenkins/
RUN cd /home/jenkins/ && yarn install
@@ -17,25 +17,36 @@ Ghostery helps you browse smarter by giving you control over ads and tracking te
**Edge** – [Download](https://www.microsoft.com/en-us/store/p/ghostery/9nblggh52ngz)

## Installation

#### Install yarn
**https://yarnpkg.com/en/docs/install**

#### Install local npm packages
```sh
# Install local npm packages
$ npm install
$ yarn install --frozen-lockfile
```

#### Upgrade packages
```sh
# Upgrade packages according to package.json version range
# https://yarnpkg.com/en/docs/cli/upgrade/
yarn upgrade
```

## Building
```sh
# Build all sources
$ npm run build.dev
$ yarn run build.dev
```

```sh
# Build for production
$ npm run build.prod
$ yarn run build.prod
```

```sh
# Build and watch for changes
$ npm run build.watch
$ yarn run build.watch
```

## Enable Debugging / Logging
@@ -48,30 +59,28 @@ $ npm run build.watch
## Testing and Linting
```sh
# Run unit tests
$ npm run test.unit
$ yarn run test.unit
```

```sh
# Run linter over the ./app and ./src folders
$ npm run lint
$ yarn run lint
```

```sh
# Lint a specific file
$ npm run lint.raw -- src/utils/matcher.js
$ yarn run lint.raw -- src/utils/matcher.js
```

```sh
# Disable lint
$ NO_LINT=true npm run build.dev
# or
$ npm run build.dev -- --env.nolint
$ NO_LINT=true yarn run build.dev
```

## Build Docs
```sh
# Build JSDoc files to ./docs
$ npm run docs
$ yarn run docs
```

## Cliqz Source Code
ProTip! Use n and p to navigate between commits in a pull request.