Skip to content

Commit

Permalink
🏗 Migrate amphtml package management from yarn to npm (#30694)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsimha authored Oct 19, 2020
1 parent 9fdf231 commit b3f7798
Show file tree
Hide file tree
Showing 49 changed files with 52,837 additions and 26,193 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Output directories
node_modules
build/**
dist/**
dist.3p/**
Expand Down
20 changes: 5 additions & 15 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,12 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Get yarn Cache Path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache Dependencies
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ matrix.platform }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ matrix.platform }}-yarn-
- name: Install Gulp CLI
run: yarn global add gulp-cli
- name: Install Dependencies
run: yarn
- name: Set Up Environment
if: ${{ matrix.platform == 'macos-latest' }}
if: ${{ matrix.platform == 'macos-latest' || matrix.platform == 'ubuntu-latest'}}
run: sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
- name: Install Gulp CLI
run: npm install --global --force gulp-cli
- name: Install Dependencies
run: npm install
- name: Build and Test
run: node build-system/pr-check/cross-browser-tests.js
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ typings.json
/test/manual/amp-ad.adtech.html
test/coverage
test/coverage-e2e
./package-lock.json
*.swp
*.swo
yarn-error.log
deps.txt
firebase
.firebaserc
Expand Down
27 changes: 12 additions & 15 deletions .lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,53 +28,50 @@ services:
appserver:
type: node
install_dependencies_as_root:
- curl --compressed -o- -L https://yarnpkg.com/install.sh | bash
- apt-get update && apt-get install -y openjdk-8-jdk && apt-get install -y ant && apt-get clean
- apt-get install -y openjdk-7-jre protobuf-compiler python2.7 python-protobuf
build:
- yarn global add gulp-cli
- yarn
- npm install --global gulp-cli
- npm install
run_as_root:
- echo "127.0.0.1 amphtml.lndo.site" >> /etc/hosts
command: cd /app && yarn gulp serve --port=80 --host=0.0.0.0
command: cd /app && gulp serve --port=80 --host=0.0.0.0

tooling:
yarn:
service: appserver
gulp:
service: appserver
cmd: 'yarn gulp'
cmd: 'gulp'
watch:
service: appserver
cmd: 'yarn gulp build --watch'
cmd: 'gulp build --watch'
description: 'Builds unminified code, watches for changes in files, re-builds when detected'
watch-minified:
service: appserver
cmd: 'yarn gulp dist --watch'
cmd: 'gulp dist --watch'
description: 'Builds minified code, watches for changes in files, re-builds when detected'
lint:
service: appserver
cmd: 'yarn gulp lint'
cmd: 'gulp lint'
description: 'Validates against Google Closure Linter'
check-types:
service: appserver
cmd: 'yarn gulp check-types'
cmd: 'gulp check-types'
description: 'Check source code for JS type errors'
dist:
service: appserver
cmd: 'yarn gulp dist'
cmd: 'gulp dist'
description: 'Build production binaries'
unit:
service: appserver
cmd: 'yarn gulp unit'
cmd: 'gulp unit'
description: 'Run unit tests'
integration:
service: appserver
cmd: 'yarn gulp integration'
cmd: 'gulp integration'
description: 'Run integration tests'
e2e:
service: appserver
cmd: 'yarn gulp e2e'
cmd: 'gulp e2e'
description: 'Runs e2e tests'

proxy:
Expand Down
6 changes: 6 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# NPM configuration for amphtml

audit=false # Speed up install by not running a full audit
fund=false # Don't print the trailing funding message
loglevel=error # Suppress verbose logging during installation
save-exact=true # Use exact semver numbers
1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

2 changes: 1 addition & 1 deletion OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
owners: [{name: 'ampproject/wg-infra'}],
},
{
pattern: '{babel.config.js,package.json,yarn.lock}',
pattern: '{babel.config.js,package.json,package-lock.json}',
owners: [
{name: 'ampproject/wg-infra'},
{name: 'ampproject/wg-performance'},
Expand Down
Loading

0 comments on commit b3f7798

Please sign in to comment.