Skip to content

Commit

Permalink
Add NPM scripts that can be run via nps (#32481)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsimha committed Feb 8, 2021
1 parent 343652e commit 8da9698
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ module.exports = {
},
},
{
'files': ['babel.config.js', '**/.eslintrc.js'],
'files': ['babel.config.js', '**/.eslintrc.js', 'package-scripts.js'],
'globals': {
'module': false,
'process': false,
Expand Down
2 changes: 1 addition & 1 deletion OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
owners: [{name: 'ampproject/wg-infra'}],
},
{
pattern: '{babel.config.js,package.json,package-lock.json}',
pattern: '{babel.config.js,package.json,package-lock.json,package-scripts.js}',
owners: [
{name: 'ampproject/wg-infra'},
{name: 'ampproject/wg-performance'},
Expand Down
33 changes: 33 additions & 0 deletions package-scripts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* Copyright 2021 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';

/**
* @fileoverview
*
* - Use this file to store NPM scripts that aid in development but
* are not available via AMP's gulp tasks in build-system/tasks/.
* - To use these scripts, first install npm-package-scripts by running
* "npm install --global nps" (or for short, "npm i -g nps").
* - Once installed, run any script by calling "nps <scriptname>".
* - For more info, see https://www.npmjs.com/package/nps#scripts-1
*/

module.exports = {
scripts: {
filesize: 'filesize -c=build-system/tasks/bundle-size/filesize.json',
},
};

0 comments on commit 8da9698

Please sign in to comment.