Skip to content

Commit ef6d1e8

Browse files
Merge pull request #30 from userfrosting/feature/decoupled-file-resolution
Decoupled file resolution
2 parents 4b643be + a9853f6 commit ef6d1e8

58 files changed

Lines changed: 4672 additions & 6141 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
open_collective: userfrosting

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
platform: [ ubuntu-latest, macos-latest, windows-latest ]
14-
node-version: [ 8.x, 10.x, 12.x, 13.x ]
14+
node-version: [ 10.x, 12.x, 13.x ]
1515
runs-on: ${{ matrix.platform }}
1616
steps:
1717
- uses: actions/checkout@v1

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
**/*.test.d.ts
77
**/*.test.js
88
**/*.test.js.map
9+
**/test-util.js
910
api-extractor.json
1011
dist/index.d.ts
1112
src/

.vscode/launch.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Debug AVA test file",
11+
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/ava",
12+
"runtimeArgs": [
13+
"debug",
14+
"--break",
15+
"--serial",
16+
"dist/**/${fileBasenameNoExtension}.js"
17+
],
18+
"port": 9229,
19+
"outputCapture": "std",
20+
"skipFiles": [
21+
"<node_internals>/**/*.js"
22+
]
23+
}
24+
25+
]
26+
}

CHANGELOG.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,30 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10-
Maintenance release.
11-
- Bumped dependency versions
12-
- Applied fix for type validation in unit tests
13-
- Transferred CI onto GitHub Actions from Travis
14-
- Added API Documentation
10+
## [4.0.0-alpha.3] - 2020-02-20
11+
12+
Test coverage improvements.
13+
14+
## [4.0.0-alpha.2] - 2020-02-03
15+
16+
### Added
17+
- Custom cwd support
18+
19+
## [4.0.0-alpha.1] - 2020-01-23
20+
21+
This release focuses on improving performance and maintainability. These have been achieved by separating virtual path logic into a separate package.
22+
23+
### Added
24+
- API docs.
25+
26+
### Changed
27+
- Logging interface, now uses [`ts-log`](https://www.npmjs.com/package/ts-log).
28+
29+
### Removed
30+
- Virtual path logic in favour of [`@userfrosting/vinly-fs-vpath`](https://github.com/userfrosting/vinyl-fs-vpath).
31+
32+
### Fixed
33+
- Flaw in results API surface, results are now correctly separated according to their type (script/style).
1534

1635
## [3.0.2] - 2019-07-14
1736

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2018 - 2019 David Jordan Myles Mele
3+
Copyright (c) 2018 - 2020 David Jordan Myles Mele
44

55
Copyright (c) 2015 Dow Jones & Company
66

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,19 @@
55
| master | [![Continuous Integration](https://github.com/userfrosting/gulp-uf-bundle-assets/workflows/Continuous%20Integration/badge.svg?branch=master)](https://github.com/userfrosting/gulp-uf-bundle-assets/actions) [![codecov](https://codecov.io/gh/userfrosting/gulp-uf-bundle-assets/branch/master/graph/badge.svg)](https://codecov.io/gh/userfrosting/gulp-uf-bundle-assets/branch/master) |
66
| develop | [![Continuous Integration](https://github.com/userfrosting/gulp-uf-bundle-assets/workflows/Continuous%20Integration/badge.svg?branch=develop)](https://github.com/userfrosting/gulp-uf-bundle-assets/actions) [![codecov](https://codecov.io/gh/userfrosting/gulp-uf-bundle-assets/branch/develop/graph/badge.svg)](https://codecov.io/gh/userfrosting/gulp-uf-bundle-assets/branch/develop) |
77

8-
Orchastrates JS and CSS bundle creation in a highly efficient and configurable manner.
9-
10-
**CAUTION** The implementation currently produces a great deal backpressure. This can result in signficiant RAM usage. Projects dealing with a significant number resources are better off not using this tool until the custom stream source is implemented in v4.
8+
Orchastrates JS and CSS bundle creation in an efficient and configurable manner.
119

1210
## Install
1311

1412
```bash
15-
npm install @userfrosting/gulp-bundle-assets --save-dev
13+
npm i -D @userfrosting/gulp-bundle-assets
1614
```
1715

1816
## Usage
1917

2018
```js
2119
// gulpfile.esm.js
22-
import assetBundler from "@userfrosting/gulp-bundle-assets";
20+
import AssetBundler from "@userfrosting/gulp-bundle-assets";
2321
import { src, dest } from "gulp";
2422
import cleanCss from "gulp-clean-css";
2523
import concatCss from "gulp-concat-css";
@@ -57,7 +55,7 @@ export function bundle() {
5755
};
5856

5957
return src("src/**")
60-
.pipe(assetBundler(config, joiner))
58+
.pipe(new AssetBundler(config, joiner))
6159
.pipe(dest("public/assets/"));
6260
}
6361
```
@@ -85,6 +83,8 @@ It has since been entirely reworked to better suit the requirements of the UserF
8583

8684
This package was previously published under `gulp-uf-bundle-assets` and as of v3 is published under `@userfrosting/gulp-bundle-assets` to assist in longterm project management.
8785

86+
As of v4 virtual path logic was extracted into a separate package [@userfrosting/vinyl-fs-vpath](https://github.com/userfrosting/vinyl-fs-vpath). This change enabled a significant simplification of core logic along with a significantly faster and more efficient way to support virtual path mappings.
87+
8888
## Release process
8989

9090
Generally speaking, all releases should first traverse through `alpha`, `beta`, and `rc` (release candidate) to catch missed bugs and gather feedback as appropriate. Aside from this however, there are a few steps that **MUST** always be done.

api-extractor.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,12 @@
1010
},
1111
"docModel": {
1212
"enabled": true
13+
},
14+
"messages": {
15+
"tsdocMessageReporting": {
16+
"tsdoc-undefined-tag": {
17+
"logLevel": "none"
18+
}
19+
}
1320
}
1421
}

docs/api/gulp-bundle-assets.bundler._constructor_.md renamed to docs/api/gulp-bundle-assets.bundleorchastrator._constructor_.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

3-
[Home](./index.md) &gt; [@userfrosting/gulp-bundle-assets](./gulp-bundle-assets.md) &gt; [Bundler](./gulp-bundle-assets.bundler.md) &gt; [(constructor)](./gulp-bundle-assets.bundler._constructor_.md)
3+
[Home](./index.md) &gt; [@userfrosting/gulp-bundle-assets](./gulp-bundle-assets.md) &gt; [BundleOrchastrator](./gulp-bundle-assets.bundleorchastrator.md) &gt; [(constructor)](./gulp-bundle-assets.bundleorchastrator._constructor_.md)
44

5-
## Bundler.(constructor)
5+
## BundleOrchastrator.(constructor)
66

7-
Constructs a new instance of the `Bundler` class
7+
Constructs a new instance of the `BundleOrchastrator` class
88

99
<b>Signature:</b>
1010

1111
```typescript
12-
constructor(config: Config, joiner: Bundlers, bundleResultsCallback?: (results: Map<string, Vinyl[]>) => void);
12+
constructor(config: Config, joiner: Bundlers, resultsCallback?: ResultsCallback);
1313
```
1414

1515
## Parameters
@@ -18,5 +18,5 @@ constructor(config: Config, joiner: Bundlers, bundleResultsCallback?: (results:
1818
| --- | --- | --- |
1919
| config | <code>Config</code> | Raw (but valid) configuration file used for bundle resolution. |
2020
| joiner | <code>Bundlers</code> | Object capable of generating the Transform streams needed for generation of final bundles. |
21-
| bundleResultsCallback | <code>(results: Map&lt;string, Vinyl[]&gt;) =&gt; void</code> | |
21+
| resultsCallback | <code>ResultsCallback</code> | Callback invoked once all bundles generated. |
2222

docs/api/gulp-bundle-assets.bundler._flush.md renamed to docs/api/gulp-bundle-assets.bundleorchastrator._flush.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

3-
[Home](./index.md) &gt; [@userfrosting/gulp-bundle-assets](./gulp-bundle-assets.md) &gt; [Bundler](./gulp-bundle-assets.bundler.md) &gt; [\_flush](./gulp-bundle-assets.bundler._flush.md)
3+
[Home](./index.md) &gt; [@userfrosting/gulp-bundle-assets](./gulp-bundle-assets.md) &gt; [BundleOrchastrator](./gulp-bundle-assets.bundleorchastrator.md) &gt; [\_flush](./gulp-bundle-assets.bundleorchastrator._flush.md)
44

5-
## Bundler.\_flush() method
6-
7-
Does bundling and pushes resulting files into stream.
5+
## BundleOrchastrator.\_flush() method
86

97
<b>Signature:</b>
108

@@ -16,7 +14,7 @@ _flush(callback: TransformCallback): Promise<void>;
1614

1715
| Parameter | Type | Description |
1816
| --- | --- | --- |
19-
| callback | <code>TransformCallback</code> | Callback to indicate processing is completed. |
17+
| callback | <code>TransformCallback</code> | |
2018

2119
<b>Returns:</b>
2220

0 commit comments

Comments
 (0)