Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

Commit

Permalink
update checkpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
FredKSchott committed Aug 5, 2019
1 parent 19e06f6 commit 7554b89
Show file tree
Hide file tree
Showing 29 changed files with 51 additions and 24 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/plugin-build-deno/pkg/dist-node/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/plugin-build-node/pkg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ For more information about @pika/pack & help getting started, [check out the mai

## Options

- `"sourcemap"` (Default: `"true"`): Adds a [source map](https://www.html5rocks.com/en/tutorials/developertools/sourcemaps/) for this build.
- `"minNodeVersion"` (Default: `"8"`): This plugin will build your package for the current minimum [Node.js LTS](https://github.com/nodejs/Release) major version. This option allows you to target later versions of Node.js only.


Expand Down
3 changes: 2 additions & 1 deletion packages/plugin-build-node/pkg/dist-node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ async function build({
await result.write({
file: writeToNode,
format: 'cjs',
exports: 'named'
exports: 'named',
sourcemap: options.sourcemap === undefined ? true : options.sourcemap
});
reporter.created(writeToNode, 'main');
}
Expand Down
1 change: 1 addition & 0 deletions packages/plugin-build-node/pkg/dist-src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export async function build({ out, reporter, options }) {
file: writeToNode,
format: 'cjs',
exports: 'named',
sourcemap: options.sourcemap === undefined ? true : options.sourcemap,
});
reporter.created(writeToNode, 'main');
}
1 change: 1 addition & 0 deletions packages/plugin-build-types/pkg/dist-node/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions packages/plugin-build-umd/pkg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ yarn add @pika/plugin-build-umd --dev
For more information about @pika/pack & help getting started, [check out the main project repo](https://github.com/pikapkg/pack).


## Options

- `"sourcemap"` (Default: `"true"`): Adds a [source map](https://www.html5rocks.com/en/tutorials/developertools/sourcemaps/) for this build.
- `"name"` (Defaults: your package name): Sets the name that your package is attached to on the `window` object.


## Result

1. Adds a UMD distribution to your built package: `dist-umd/index.js`
Expand Down
13 changes: 4 additions & 9 deletions packages/plugin-build-umd/pkg/dist-node/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions packages/plugin-build-umd/pkg/dist-src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ import fs from 'fs';
import rollupBabel from 'rollup-plugin-babel';
import { MessageError } from '@pika/types';
import { rollup } from 'rollup';
export async function beforeBuild({ options }) {
if (!options.name) {
throw new MessageError('A "name" option is required for UMD builds.');
}
}
export async function beforeJob({ out }) {
const srcDirectory = path.join(out, 'dist-src/');
if (!fs.existsSync(srcDirectory)) {
Expand All @@ -25,6 +20,7 @@ export function manifest(manifest) {
manifest['umd:main'] = 'dist-umd/index.js';
}
export async function build({ out, reporter, options }) {
const umdExportName = options.name || manifest.name;
const writeToUmd = path.join(out, 'dist-umd', 'index.js');
const result = await rollup({
input: path.join(out, 'dist-src/index.js'),
Expand Down Expand Up @@ -61,7 +57,8 @@ export async function build({ out, reporter, options }) {
file: writeToUmd,
format: 'umd',
exports: 'named',
name: options.name,
name: umdExportName,
sourcemap: options.sourcemap === undefined ? true : options.sourcemap,
});
reporter.created(writeToUmd, 'umd:main');
}
1 change: 0 additions & 1 deletion packages/plugin-build-umd/pkg/dist-types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { BuilderOptions } from '@pika/types';
export declare function beforeBuild({ options }: BuilderOptions): Promise<void>;
export declare function beforeJob({ out }: BuilderOptions): Promise<void>;
export declare function manifest(manifest: any): void;
export declare function build({ out, reporter, options }: BuilderOptions): Promise<void>;
4 changes: 4 additions & 0 deletions packages/plugin-build-web/pkg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ yarn add @pika/plugin-build-web --dev

For more information about @pika/pack & help getting started, [check out the main project repo](https://github.com/pikapkg/pack).

## Options

- `"sourcemap"` (Default: `"true"`): Adds a [source map](https://www.html5rocks.com/en/tutorials/developertools/sourcemaps/) for this build.


## Result

Expand Down
5 changes: 4 additions & 1 deletion packages/plugin-build-web/pkg/dist-node/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/plugin-build-web/pkg/dist-src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export async function beforeJob({ out }) {
export function manifest(manifest) {
manifest.module = manifest.module || 'dist-web/index.js';
}
export async function build({ out, reporter }) {
export async function build({ out, options, reporter }) {
const writeToWeb = path.join(out, 'dist-web', 'index.js');
const result = await rollup({
input: path.join(out, 'dist-src/index.js'),
Expand All @@ -33,6 +33,7 @@ export async function build({ out, reporter }) {
file: writeToWeb,
format: 'esm',
exports: 'named',
sourcemap: options.sourcemap === undefined ? true : options.sourcemap,
});
reporter.created(writeToWeb, 'module');
}
2 changes: 1 addition & 1 deletion packages/plugin-build-web/pkg/dist-types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BuilderOptions } from '@pika/types';
export declare function beforeJob({ out }: BuilderOptions): Promise<void>;
export declare function manifest(manifest: any): void;
export declare function build({ out, reporter }: BuilderOptions): Promise<void>;
export declare function build({ out, options, reporter }: BuilderOptions): Promise<void>;
1 change: 1 addition & 0 deletions packages/plugin-bundle-node/pkg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ For more information about @pika/pack & help getting started, [check out the mai

## Options

- `"sourcemap"` (Default: `"true"`): Adds a [source map](https://www.html5rocks.com/en/tutorials/developertools/sourcemaps/) for this build.
- `"minNodeVersion"` (Default: `"8"`): This plugin will bundle your package for the current minimum [Node.js LTS](https://github.com/nodejs/Release) major version. This option allows you to target later versions of Node.js only.


Expand Down
4 changes: 3 additions & 1 deletion packages/plugin-bundle-node/pkg/dist-node/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/plugin-bundle-node/pkg/dist-src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export async function build({ out, reporter, options }) {
chunkFileNames: '[name]-[hash].bundled.js',
format: 'cjs',
exports: 'named',
sourcemap: options.sourcemap === undefined ? true : options.sourcemap,
});
reporter.created(writeToNodeBundled);
}
1 change: 1 addition & 0 deletions packages/plugin-bundle-types/pkg/dist-node/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/plugin-bundle-web/pkg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ For more information about @pika/pack & help getting started, [check out the mai

## Options

- `"sourcemap"` (Default: `"true"`): Adds a [source map](https://www.html5rocks.com/en/tutorials/developertools/sourcemaps/) for this build.
- `"browser"` (Default: `false`): If true, this plugin will respect the "browser" field in bundled dependencies over the usual "main" Node-specific entrypoint. This may be required for some dependencies, but may cause problems with others. YMMV.
- `"namedExports"` (Default: `undefined`): Ecplicitly specify unresolvable named exports (See [`rollup-plugin-commonjs`](https://github.com/rollup/rollup-plugin-commonjs/tree/v9.2.0#custom-named-exports) for more information).
- `"minify"` (Default: `true`): Specify if bundle should be minifed using [`terser`](https://github.com/terser-js/terser) or not. Can also be [`terser` options object](https://github.com/terser-js/terser#minify-options) to further tweak minification.
Expand Down
4 changes: 3 additions & 1 deletion packages/plugin-bundle-web/pkg/dist-node/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/plugin-bundle-web/pkg/dist-src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export async function build({ out, options, reporter }) {
chunkFileNames: '[name]-[hash].bundled.js',
format: 'esm',
exports: 'named',
sourcemap: options.sourcemap === undefined ? true : options.sourcemap,
});
reporter.created(writeToWebBundled);
}
1 change: 1 addition & 0 deletions packages/plugin-copy-assets/pkg/dist-node/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/plugin-simple-bin/pkg/dist-node/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/plugin-source-bucklescript/pkg/dist-node/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/plugin-standard-pkg/pkg/dist-node/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/plugin-standard-pkg/pkg/dist-node/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/plugin-standard-pkg/pkg/dist-src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export async function beforeJob({ cwd }) {
}
export async function afterJob({ out, reporter }) {
reporter.info('Linting with standard-pkg...');
const linter = new Lint(out);
const linter = new Lint(path.join(out, 'dist-src'));
await linter.init();
linter.summary();
}
Expand Down
1 change: 1 addition & 0 deletions packages/plugin-wasm-assemblyscript/pkg/dist-node/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/plugin-wasm-bindings/pkg/dist-node/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7554b89

Please sign in to comment.