Skip to content

Commit

Permalink
feat: webpack support for all APIs (#1554)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-fenster authored and JustinBeckwith committed Jan 20, 2019
1 parent d8ba2ac commit 2ad63f6
Show file tree
Hide file tree
Showing 808 changed files with 19,223 additions and 5,492 deletions.
26 changes: 23 additions & 3 deletions src/apis/abusiveexperiencereport/README.md
Expand Up @@ -11,17 +11,37 @@ $ npm install @google/abusiveexperiencereport
```

## Usage
All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client).
All documentation and usage information can be found on [GitHub](https://github.com/googleapis/google-api-nodejs-client).

## Building a browser bundle

This library can be used in a browser. To prepare a single file bundle, clone the
[repository](https://github.com/googleapis/google-api-nodejs-client) and run

```sh
$ cd src/apis/abusiveexperiencereport
$ npm install
$ npm run webpack
```

The generated bundle will be written to `dist/abusiveexperiencereport.min.js`. Use it from your HTML file:

```html
<script src="/path/to/abusiveexperiencereport.min.js"></script>
<script>
const { abusiveexperiencereport, auth } = Abusiveexperiencereport;
</script>
```

## License
This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/google/google-api-nodejs-client/blob/master/LICENSE).
This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/googleapis/google-api-nodejs-client/blob/master/LICENSE).

## Contributing
We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md).

## Questions/problems?
* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client).
* If you've found an bug/issue, please [file it on GitHub](https://github.com/google/google-api-nodejs-client/issues).
* If you've found an bug/issue, please [file it on GitHub](https://github.com/googleapis/google-api-nodejs-client/issues).


*Crafted with ❤️ by the Google Node.js team*
7 changes: 5 additions & 2 deletions src/apis/abusiveexperiencereport/index.ts
@@ -1,4 +1,4 @@
// Copyright 2018, Google, LLC.
// Copyright 2019 Google LLC
// 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
Expand All @@ -13,7 +13,7 @@

/*! THIS FILE IS AUTO-GENERATED */

import {getAPI, GoogleConfigurable} from 'googleapis-common';
import {AuthPlus, getAPI, GoogleConfigurable} from 'googleapis-common';
import {abusiveexperiencereport_v1} from './v1';

export const VERSIONS = {
Expand All @@ -31,3 +31,6 @@ abusiveexperiencereport<T = abusiveexperiencereport_v1.Abusiveexperiencereport>(
versionOrOptions: 'v1'|abusiveexperiencereport_v1.Options) {
return getAPI<T>('abusiveexperiencereport', versionOrOptions, VERSIONS, this);
}

const auth = new AuthPlus();
export {auth};
19 changes: 13 additions & 6 deletions src/apis/abusiveexperiencereport/package.json
Expand Up @@ -4,16 +4,18 @@
"description": "abusiveexperiencereport",
"main": "build/index.js",
"types": "build/index.d.ts",
"keywords": ["google"],
"keywords": [
"google"
],
"author": "Google LLC",
"license": "Apache-2.0",
"homepage": "https://github.com/google/google-api-nodejs-client",
"homepage": "https://github.com/googleapis/google-api-nodejs-client",
"bugs": {
"url" : "https://github.com/google/google-api-nodejs-client/issues"
"url": "https://github.com/googleapis/google-api-nodejs-client/issues"
},
"repository": {
"type": "git",
"url" : "https://github.com/google/google-api-nodejs-client.git"
"url": "https://github.com/googleapis/google-api-nodejs-client.git"
},
"engines": {
"node": ">=6.0.0"
Expand All @@ -23,14 +25,19 @@
"lint": "gts check",
"compile": "tsc -p .",
"prepare": "npm run compile",
"docs": "typedoc --out docs/"
"docs": "typedoc --out docs/",
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^0.6.0"
},
"devDependencies": {
"gts": "^0.9.0",
"null-loader": "^0.1.1",
"ts-loader": "^5.3.3",
"typedoc": "^0.14.0",
"typescript": "~3.2.0",
"typedoc": "^0.14.0"
"webpack": "^4.28.4",
"webpack-cli": "^3.2.1"
}
}
2 changes: 1 addition & 1 deletion src/apis/abusiveexperiencereport/v1.ts
@@ -1,5 +1,5 @@
/**
* Copyright 2015 Google Inc. All Rights Reserved.
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
71 changes: 71 additions & 0 deletions src/apis/abusiveexperiencereport/webpack.config.js
@@ -0,0 +1,71 @@
/**
* Copyright 2019 Google LLC
*
* 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 `npm run webpack` to produce Webpack bundle for this library.

const path = require('path');

module.exports = {
entry: './index.ts',
resolve: {
extensions: ['.ts', '.js', '.json'],
},
output: {
library: 'Abusiveexperiencereport',
filename: 'abusiveexperiencereport.min.js',
path: path.resolve(__dirname, 'dist'),
},
node: {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
},
module: {
rules: [
{
test: /node_modules\/google-auth-library\/src\/crypto\/node\/crypto/,
use: 'null-loader',
},
{
test: /node_modules\/https-proxy-agent\//,
use: 'null-loader',
},
{
test: /node_modules\/gcp-metadata\//,
use: 'null-loader',
},
{
test: /node_modules\/gtoken\//,
use: 'null-loader',
},
{
test: /node_modules\/pkginfo\//,
use: 'null-loader',
},
{
test: /node_modules\/semver\//,
use: 'null-loader',
},
{
test: /\.ts$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
mode: 'production',
plugins: [],
};
26 changes: 23 additions & 3 deletions src/apis/acceleratedmobilepageurl/README.md
Expand Up @@ -11,17 +11,37 @@ $ npm install @google/acceleratedmobilepageurl
```

## Usage
All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client).
All documentation and usage information can be found on [GitHub](https://github.com/googleapis/google-api-nodejs-client).

## Building a browser bundle

This library can be used in a browser. To prepare a single file bundle, clone the
[repository](https://github.com/googleapis/google-api-nodejs-client) and run

```sh
$ cd src/apis/acceleratedmobilepageurl
$ npm install
$ npm run webpack
```

The generated bundle will be written to `dist/acceleratedmobilepageurl.min.js`. Use it from your HTML file:

```html
<script src="/path/to/acceleratedmobilepageurl.min.js"></script>
<script>
const { acceleratedmobilepageurl, auth } = Acceleratedmobilepageurl;
</script>
```

## License
This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/google/google-api-nodejs-client/blob/master/LICENSE).
This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/googleapis/google-api-nodejs-client/blob/master/LICENSE).

## Contributing
We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md).

## Questions/problems?
* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client).
* If you've found an bug/issue, please [file it on GitHub](https://github.com/google/google-api-nodejs-client/issues).
* If you've found an bug/issue, please [file it on GitHub](https://github.com/googleapis/google-api-nodejs-client/issues).


*Crafted with ❤️ by the Google Node.js team*
7 changes: 5 additions & 2 deletions src/apis/acceleratedmobilepageurl/index.ts
@@ -1,4 +1,4 @@
// Copyright 2018, Google, LLC.
// Copyright 2019 Google LLC
// 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
Expand All @@ -13,7 +13,7 @@

/*! THIS FILE IS AUTO-GENERATED */

import {getAPI, GoogleConfigurable} from 'googleapis-common';
import {AuthPlus, getAPI, GoogleConfigurable} from 'googleapis-common';
import {acceleratedmobilepageurl_v1} from './v1';

export const VERSIONS = {
Expand All @@ -32,3 +32,6 @@ export function acceleratedmobilepageurl<
return getAPI<T>(
'acceleratedmobilepageurl', versionOrOptions, VERSIONS, this);
}

const auth = new AuthPlus();
export {auth};
19 changes: 13 additions & 6 deletions src/apis/acceleratedmobilepageurl/package.json
Expand Up @@ -4,16 +4,18 @@
"description": "acceleratedmobilepageurl",
"main": "build/index.js",
"types": "build/index.d.ts",
"keywords": ["google"],
"keywords": [
"google"
],
"author": "Google LLC",
"license": "Apache-2.0",
"homepage": "https://github.com/google/google-api-nodejs-client",
"homepage": "https://github.com/googleapis/google-api-nodejs-client",
"bugs": {
"url" : "https://github.com/google/google-api-nodejs-client/issues"
"url": "https://github.com/googleapis/google-api-nodejs-client/issues"
},
"repository": {
"type": "git",
"url" : "https://github.com/google/google-api-nodejs-client.git"
"url": "https://github.com/googleapis/google-api-nodejs-client.git"
},
"engines": {
"node": ">=6.0.0"
Expand All @@ -23,14 +25,19 @@
"lint": "gts check",
"compile": "tsc -p .",
"prepare": "npm run compile",
"docs": "typedoc --out docs/"
"docs": "typedoc --out docs/",
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^0.6.0"
},
"devDependencies": {
"gts": "^0.9.0",
"null-loader": "^0.1.1",
"ts-loader": "^5.3.3",
"typedoc": "^0.14.0",
"typescript": "~3.2.0",
"typedoc": "^0.14.0"
"webpack": "^4.28.4",
"webpack-cli": "^3.2.1"
}
}
2 changes: 1 addition & 1 deletion src/apis/acceleratedmobilepageurl/v1.ts
@@ -1,5 +1,5 @@
/**
* Copyright 2015 Google Inc. All Rights Reserved.
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
71 changes: 71 additions & 0 deletions src/apis/acceleratedmobilepageurl/webpack.config.js
@@ -0,0 +1,71 @@
/**
* Copyright 2019 Google LLC
*
* 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 `npm run webpack` to produce Webpack bundle for this library.

const path = require('path');

module.exports = {
entry: './index.ts',
resolve: {
extensions: ['.ts', '.js', '.json'],
},
output: {
library: 'Acceleratedmobilepageurl',
filename: 'acceleratedmobilepageurl.min.js',
path: path.resolve(__dirname, 'dist'),
},
node: {
child_process: 'empty',
fs: 'empty',
crypto: 'empty',
},
module: {
rules: [
{
test: /node_modules\/google-auth-library\/src\/crypto\/node\/crypto/,
use: 'null-loader',
},
{
test: /node_modules\/https-proxy-agent\//,
use: 'null-loader',
},
{
test: /node_modules\/gcp-metadata\//,
use: 'null-loader',
},
{
test: /node_modules\/gtoken\//,
use: 'null-loader',
},
{
test: /node_modules\/pkginfo\//,
use: 'null-loader',
},
{
test: /node_modules\/semver\//,
use: 'null-loader',
},
{
test: /\.ts$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
mode: 'production',
plugins: [],
};

0 comments on commit 2ad63f6

Please sign in to comment.