• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env bash
2
3# Shell script to update babel-eslint in the source tree to the latest release.
4
5# Depends on npm, npx, and node being in $PATH.
6
7# This script must be be in the tools directory when it runs because it uses
8# $BASH_SOURCE[0] to determine directories to work in.
9
10cd "$( dirname "${BASH_SOURCE[0]}" )"
11rm -rf node_modules/babel-eslint
12mkdir babel-eslint-tmp
13cd babel-eslint-tmp
14npm init --yes
15
16npm install --global-style --no-bin-links --production --no-package-lock babel-eslint@latest
17
18# Use dmn to remove some unneeded files.
19npx dmn@2.2.2 -f clean
20# Use removeNPMAbsolutePaths to remove unused data in package.json.
21# This avoids churn as absolute paths can change from one dev to another.
22npx removeNPMAbsolutePaths@1.0.4 .
23
24cd ..
25mv babel-eslint-tmp/node_modules/babel-eslint node_modules/babel-eslint
26rm -rf babel-eslint-tmp/
27