Skip to content

Commit f43bcbc

Browse files
author
benholloway
committed
fix publicPath for release, take latest omit-tilde plugin, bump minor version
1 parent ce2a3db commit f43bcbc

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

config/add/composition.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ var IndexHTMLPlugin = require('indexhtml-webpack-plugin'),
77
* Add an application for compilation.
88
* @this {Config} A webpack-configurator instance
99
* @param {{namespace:Array.<string>, directory:string, htmlFiles:Array, indexFiles:Array}} item A composition item
10+
* @param {string} [publicPath] Optional prefix for assets
1011
* @returns {Config} The given webpack-configurator instance
1112
*/
12-
function composition(item) {
13+
function composition(item, publicPath) {
1314
/* jshint validthis:true */
1415
return this
1516
.merge({
@@ -26,7 +27,10 @@ function composition(item) {
2627
.plugin('gulp-inject', GulpInjectPlugin, [
2728
'index-html',
2829
['manifest.json', 'vendor', /^vendor\./, 'index'],
29-
{relative: true}
30+
{
31+
relative : true,
32+
addPrefix: publicPath && publicPath.replace(/[\\\/]$/, '') || undefined
33+
}
3034
]);
3135
}
3236

config/release.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function release(configuratorFactory, options) {
1818
return configuratorFactory()
1919
.addBrowserSync(options.releaseDir, options.port)
2020
.addClean(options.releaseDir)
21-
.addComposition(composition)
21+
.addComposition(composition, options.publicPath)
2222
.addCommon(path.resolve(__dirname, '..', 'node_modules'), options)
2323
.addConditionals({
2424
TEST : false,

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "webpack-angularity-solution",
3-
"version": "0.15.0",
3+
"version": "0.16.0",
44
"description": "Requisite configuration and modules to build Angularity projects with Webpack",
55
"main": "index.js",
66
"repository": {
@@ -48,7 +48,7 @@
4848
"nginject-loader": "^2.1.0",
4949
"node-sass": "^3.4.2",
5050
"object-path": "^0.9.2",
51-
"omit-tilde-webpack-plugin": "^0.0.8",
51+
"omit-tilde-webpack-plugin": "^0.1.1",
5252
"resolve-url-loader": "^1.4.3",
5353
"sass-loader": "^3.1.2",
5454
"url-loader": "^0.5.7",

0 commit comments

Comments
 (0)