Skip to content
This repository was archived by the owner on Apr 1, 2019. It is now read-only.

Commit 906e74e

Browse files
author
Walker Leite
committed
add module name to poi config
1 parent cb204fb commit 906e74e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

template/poi.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ const webpack = require('webpack');
33
const glob = require('glob').sync;
44
const {name} = require('./package.json');
55

6+
// converts my-component to MyComponent
7+
function camelCase (s) {
8+
return s.replace(/([\-_\s]+[a-z])|(^[a-z])/g, $1 => $1.toUpperCase())
9+
.replace(/[\-_\s]+/g, '')
10+
}
11+
612
module.exports = {
713
entry: glob('./src/**/*.vue'),
814
filename: {
@@ -17,4 +23,5 @@ module.exports = {
1723
frameworks: ['mocha', 'chai', 'phantomjs-shim'],
1824
})
1925
],
26+
moduleName: camelCase({{ name }})
2027
};

0 commit comments

Comments
 (0)