Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Sync docs/ and packages/ and other docs fixes #528

Merged
merged 4 commits into from
Dec 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/packages/clean/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ neutrino.use(clean);
neutrino.use(clean, {
paths: [],
root: neutrino.options.root,
// Override pluginId to add an additional banner plugin instance
// Override pluginId to add an additional clean plugin instance
pluginId: 'clean'
});
```
Expand Down
6 changes: 3 additions & 3 deletions docs/packages/compile-loader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

`@neutrinojs/compile-loader` is Neutrino middleware for compiling source code with Babel.

[![NPM version][npm-image]]
[npm-url][![NPM downloads][npm-downloads]]
[npm-url][![Join the Neutrino community on Spectrum][spectrum-image]][spectrum-url]
[![NPM version][npm-image]][npm-url]
[![NPM downloads][npm-downloads]][npm-url]
[![Join the Neutrino community on Spectrum][spectrum-image]][spectrum-url]

## Requirements

Expand Down
2 changes: 1 addition & 1 deletion docs/packages/eslint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ neutrino.use(eslint, {
cwd: neutrino.options.root,
useEslintrc: false,
root: true,
extensions: ['js', 'jsx'],
extensions: neutrino.options.extensions,
plugins: ['babel'],
baseConfig: {},
envs: ['es6'],
Expand Down
4 changes: 2 additions & 2 deletions docs/packages/font-loader/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Neutrino Font Loader Middleware

`@neutrinojs/font-loader` is Neutrino middleware for loading and importing font files from modules.

[![NPM version][npm-image]][npm-url]
[![NPM downloads][npm-downloads]][npm-url]
[![Join the Neutrino community on Spectrum][spectrum-image]][spectrum-url]

`@neutrinojs/font-loader` is Neutrino middleware for loading and importing font files from modules.

## Requirements

- Node.js v6.10+
Expand Down
4 changes: 2 additions & 2 deletions docs/packages/image-loader/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Neutrino Image Loader Middleware

`@neutrinojs/image-loader` is Neutrino middleware for loading and importing image files from modules.

[![NPM version][npm-image]][npm-url]
[![NPM downloads][npm-downloads]][npm-url]
[![Join the Neutrino community on Spectrum][spectrum-image]][spectrum-url]

`@neutrinojs/image-loader` is Neutrino middleware for loading and importing image files from modules.

## Requirements

- Node.js v6.10+
Expand Down
1 change: 0 additions & 1 deletion docs/packages/jest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ global.requestAnimationFrame = (callback) => {

</details>


## Customizing

To override the test configuration, start with the documentation on [customization](../../customization/README.md).
Expand Down
16 changes: 14 additions & 2 deletions docs/packages/library/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ module.exports = {
// Configure how the library will be exposed. Keeping this set
// to 'umd' ensures compatibility with a large number of module
// systems, but you can override if you want to produce a smaller
// bundle targeted to specific module systems like "commonjs2" (CJS).
// bundle targeted to specific module systems like 'commonjs2' (CJS).
libraryTarget: 'umd',

// Override options passed to webpack-node-externals,
Expand Down Expand Up @@ -264,7 +264,19 @@ module.exports = {
};
```

## External dependencies
## Customizing

To override the build configuration, start with the documentation on [customization](https://neutrino.js.org/customization).
`@neutrinojs/library` creates some conventions to make overriding the configuration easier once you are ready to make
changes.

By default Neutrino, and therefore this preset, creates a single **main** `index` entry point to your library, and this
maps to the `index.*` file in the `src` directory. This means that this preset is optimized toward a single main entry
to your library. Code not imported in the hierarchy of the `index` entry will not be output to the bundle. To overcome
this you must either define more mains via [`options.mains`](https://neutrino.js.org/customization#optionsmains), import
the code path somewhere along the `index` hierarchy, or define multiple configurations in your `.neutrinorc.js`.

### External dependencies

This preset automatically marks all dependencies as external to your library, meaning that
any dependencies you import **will not be bundled** with your library. This helps prevent
Expand Down
21 changes: 10 additions & 11 deletions docs/packages/preact/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,16 @@
- Automatic import of `Preact.h`, no need to import `h` or `createElement` yourself
- Compatibility and pre-configured aliasing for React-based modules and packages
- Extends from [@neutrinojs/web](../web)
- Zero upfront configuration necessary to start developing and building a web app
- Modern Babel compilation supporting ES modules, last 2 major browser versions, async functions, and dynamic imports
- webpack loaders for importing HTML, CSS, images, icons, fonts, and web workers
- webpack Dev Server during development
- Automatic creation of HTML pages, no templating necessary
- Automatic stylesheet extraction; importing stylesheets into modules creates bundled external stylesheets
- Pre-configured to support CSS Modules via `*.module.css` file extensions
- Hot Module Replacement support including CSS
- Tree-shaking to create smaller bundles
- Production-optimized bundles with Babel minification, easy chunking, and scope-hoisted modules for faster execution
- Easily extensible to customize your project as needed
- Modern Babel compilation supporting ES modules, last 2 major browser versions, async functions, and dynamic imports
- webpack loaders for importing HTML, CSS, images, icons, fonts, and web workers
- webpack Dev Server during development
- Automatic creation of HTML pages, no templating necessary
- Automatic stylesheet extraction; importing stylesheets into modules creates bundled external stylesheets
- Pre-configured to support CSS Modules via `*.module.css` file extensions
- Hot Module Replacement support including CSS
- Tree-shaking to create smaller bundles
- Production-optimized bundles with Babel minification, easy chunking, and scope-hoisted modules for faster execution
- Easily extensible to customize your project as needed

## Requirements

Expand Down
21 changes: 12 additions & 9 deletions docs/packages/react-components/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
# Neutrino React Components Preset

`@neutrinojs/react-components` is a Neutrino preset for building sets of React components.
`@neutrinojs/react-components` is a Neutrino preset that supports creating generic React components and previewing
them without the need to embed in an application. Plays nicely with other Neutrino middleware, so you can build, test,
preview, and publish multiple React components from a single repository.

[![NPM version][npm-image]][npm-url]
[![NPM downloads][npm-downloads]][npm-url]
[![Join the Neutrino community on Spectrum][spectrum-image]][spectrum-url]

`@neutrinojs/react-components` is a Neutrino preset that supports creating generic React components and previewing
them without the need to embed in an application. Plays nicely with other Neutrino middleware, so you can build, test,
preview, and publish multiple React components from a single repository.

## Features

- Extends partially from [@neutrinojs/react](../react)
- Zero upfront configuration necessary to start developing, building, and visually previewing a React component.
Minimal code is needed to generate stories previewer.
- Modern Babel compilation adding JSX and object rest spread syntax.
- Modern Babel compilation adding JSX, object rest spread syntax, and class properties.
- Support for React Hot Loader
- Write JSX in .js or .jsx files
- Support for importing web workers with `.worker.js` file extensions
- Extends from [@neutrinojs/web](../web)
- Modern Babel compilation supporting ES modules, **latest** major browser versions, async functions, and dynamic imports
- Modern Babel compilation supporting ES modules, last 2 major browser versions, async functions, and dynamic imports
- webpack loaders for importing HTML, CSS, images, icons, fonts, and web workers
- webpack Dev Server during development
- Hot module replacement support
- Automatic creation of HTML pages, no templating necessary
- Automatic stylesheet extraction; importing stylesheets into modules creates bundled external stylesheets
- Pre-configured to support CSS Modules via `*.module.css` file extensions
- Hot Module Replacement support including CSS
- Tree-shaking to create smaller bundles
- Production-optimized bundles with Babel minification, easy chunking, and scope-hoisted modules for faster execution
- Easily extensible to customize your project as needed

**Important! This preset does not include babel-polyfill for size reasons. If you need
Expand Down Expand Up @@ -299,7 +302,7 @@ _Note: Some plugins are only available in certain environments. To override them

| Name | Description | Environments |
| ---- | ----------- | ------------ |
| `banner` | Injects source-map-support into the entry point of your application if detected in `dependencies` or `devDependencies` of your package.json. | all but `development` |
| `banner` | Injects source-map-support into the mains (entry points) of your application if detected in `dependencies` or `devDependencies` of your package.json. | all but `development` |

By following the [customization guide](../../customization) and knowing the rule, loader, and plugin IDs above,
you can override and augment the build by by providing a function to your `.neutrinorc.js` use array. You can also
Expand Down
1 change: 0 additions & 1 deletion docs/packages/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
- Write JSX in .js or .jsx files
- Automatic import of `React.createElement`, no need to import `react` or `React.createElement` yourself
- Extends from [@neutrinojs/web](../@neutrinojs/web/README.md)
- Zero upfront configuration necessary to start developing and building a web app
- Modern Babel compilation supporting ES modules, last 2 major browser versions, async functions, and dynamic imports
- webpack loaders for importing HTML, CSS, images, icons, fonts, and web workers
- webpack Dev Server during development
Expand Down
8 changes: 5 additions & 3 deletions docs/packages/vue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
- Modern Babel compilation.
- Extends from [@neutrinojs/web](../web)
- Modern Babel compilation supporting ES modules, last 2 major browser versions, async functions, and dynamic imports
- Webpack loaders for importing HTML, CSS, images, icons, fonts, and web workers
- Webpack Dev Server during development
- webpack loaders for importing HTML, CSS, images, icons, fonts, and web workers
- webpack Dev Server during development
- Automatic creation of HTML pages, no templating necessary
- Hot Module Replacement support
- Automatic stylesheet extraction; importing stylesheets into modules creates bundled external stylesheets
- Pre-configured to support CSS Modules via `*.module.css` file extensions
- Hot Module Replacement support including CSS
- Tree-shaking to create smaller bundles
- Production-optimized bundles with Babel minification, easy chunking, and scope-hoisted modules for faster execution
- Easily extensible to customize your project as needed
Expand Down
8 changes: 5 additions & 3 deletions docs/packages/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
- webpack loaders for importing HTML, CSS, images, icons, fonts, and web workers
- webpack Dev Server during development
- Automatic creation of HTML pages, no templating necessary
- Hot Module Replacement support
- Automatic stylesheet extraction; importing stylesheets into modules creates bundled external stylesheets
- Pre-configured to support CSS Modules via `*.module.css` file extensions
- Hot Module Replacement support including CSS
- Tree-shaking to create smaller bundles
- Production-optimized bundles with Babel minification, easy chunking, and scope-hoisted modules for faster execution
- Easily extensible to customize your project as needed
Expand Down Expand Up @@ -119,7 +121,6 @@ Version: webpack 3.5.6
Time: 4145ms
Asset Size Chunks Chunk Names
index.523b6da56c6363aaf056.js 10.1 kB index [emitted] index
polyfill.57dabda41992eba7552f.js 69.2 kB polyfill [emitted] polyfill
runtime.ce4090a4e87f82940ff0.js 1.51 kB runtime [emitted] runtime
index.html 846 bytes [emitted]
```
Expand Down Expand Up @@ -340,7 +341,7 @@ _Note: Some plugins are only available in certain environments. To override them
| `env` | Inject environment variables into source code at `process.env`, defaults to only inject `NODE_ENV`. From `@neutrinojs/env`. | all |
| `extract` | Extracts CSS from JS bundle into a separate stylesheet file. From `@neutrinojs/style-loader`. | all |
| `extract-modules` | Extracts CSS from JS bundle into a separate stylesheet file. From `@neutrinojs/style-loader`. | all |
| `html` | Automatically generates HTML files for configured main entry points. From `@neutrinojs/html-template` | all |
| `html-{MAIN_NAME}` | Automatically generates HTML files for configured entry points. `{MAIN_NAME}` corresponds to the entry point of each page. By default, there is only a single `index` main, so this would generate a plugin named `html-index`. From `@neutrinojs/html-template` | all |
| `named-modules` | Enables named modules for improved debugging and console output. From `@neutrinojs/chunk` and `@neutrinojs/hot`. | `NODE_ENV production`, `start` command |
| `named-chunks` | Enables named chunks for improved debugging and console output. From `@neutrinojs/chunk`. | `NODE_ENV production` |
| `vendor-chunk` | Creates a separate file/chunk consisting of common modules shared between multiple entry points. From `@neutrinojs/chunk`. | `NODE_ENV production` |
Expand All @@ -351,6 +352,7 @@ _Note: Some plugins are only available in certain environments. To override them
| `clean` | Removes the `build` directory prior to building. From `@neutrinojs/clean`. | `build` command |
| `minify` | Minifies source code using `BabelMinifyWebpackPlugin`. From `@neutrinojs/minify`. | `NODE_ENV production` |
| `module-concat` | Concatenate the scope of all your modules into one closure and allow for your code to have a faster execution time in the browser. | `NODE_ENV production` |
| `manifest` | Create a manifest file, via webpack-manifest-plugin. | `build` command |

### Override configuration

Expand Down
2 changes: 1 addition & 1 deletion packages/copy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ See their docs for details on valid values to specify.

- `patterns`: An array of patterns specifying copy operations.
- `options`: An object specifying copy options.
- `pluginId`: The plugin identifier. Override this to add an additional copy plugin instance.
- `pluginId`: The plugin identifier. Override this to add an additional copy plugin instance.

## Customization

Expand Down
Loading