nordnet-release-plugin
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -47,3 +47,4 @@ 'use strict'; | ||
}).map(function (key) { | ||
return injection(path + '/' + chunks[key]); | ||
var value = _lodash2['default'].isArray(chunks[key]) ? chunks[key][0] : chunks[key]; | ||
return injection(path + '/' + value); | ||
}).join(''); | ||
@@ -50,0 +51,0 @@ |
{ | ||
"name": "nordnet-release-plugin", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Nordnet release plugin", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -32,3 +32,6 @@ import fs from 'fs-extra'; | ||
.filter(key => !contains(ignore, key)) | ||
.map(key => injection(`${path}/${chunks[key]}`)) | ||
.map(key => { | ||
const value = _.isArray(chunks[key]) ? chunks[key][0] : chunks[key]; | ||
return injection(`${path}/${value}`); | ||
}) | ||
.join(''); | ||
@@ -35,0 +38,0 @@ |
@@ -152,3 +152,74 @@ import path from 'path'; | ||
}); | ||
}); | ||
}); | ||
describe('source maps', () => { | ||
describe('hidden-source-map', () => { | ||
it('should generate base.js without links to source maps', (done) => { | ||
const webpackConfig = { | ||
output: { | ||
path: OUTPUT_DIR, | ||
sourceMapFilename: '[name].map', | ||
filename: '[name].js', | ||
}, | ||
devtool: 'hidden-source-map', | ||
entry: multipleEntryPoints, | ||
plugins: [ | ||
new NordnetReleasePlugin({ | ||
publicPath, | ||
initDir: OUTPUT_DIR, | ||
ignoreChunks: ['vendor'], | ||
}), | ||
], | ||
}; | ||
testPlugin(webpackConfig, expected(singleEntryPoint, done)); | ||
}); | ||
}); | ||
describe('source-map', () => { | ||
it('should generate base.js without links to source maps', (done) => { | ||
const webpackConfig = { | ||
output: { | ||
path: OUTPUT_DIR, | ||
sourceMapFilename: '[name].map', | ||
filename: '[name].js', | ||
}, | ||
devtool: 'source-map', | ||
entry: multipleEntryPoints, | ||
plugins: [ | ||
new NordnetReleasePlugin({ | ||
publicPath, | ||
initDir: OUTPUT_DIR, | ||
ignoreChunks: ['vendor'], | ||
}), | ||
], | ||
}; | ||
testPlugin(webpackConfig, expected(singleEntryPoint, done)); | ||
}); | ||
}); | ||
describe('inline-source-map', () => { | ||
it('should generate base.js without links to source maps', (done) => { | ||
const webpackConfig = { | ||
output: { | ||
path: OUTPUT_DIR, | ||
sourceMapFilename: '[name].map', | ||
filename: '[name].js', | ||
}, | ||
devtool: 'inline-source-map', | ||
entry: multipleEntryPoints, | ||
plugins: [ | ||
new NordnetReleasePlugin({ | ||
publicPath, | ||
initDir: OUTPUT_DIR, | ||
ignoreChunks: ['vendor'], | ||
}), | ||
], | ||
}; | ||
testPlugin(webpackConfig, expected(singleEntryPoint, done)); | ||
}); | ||
}); | ||
}); | ||
@@ -155,0 +226,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19223
361