1
0
Fork 0

fix shebang for node invocation

This commit is contained in:
Travis Fischer 2018-03-23 21:39:08 -04:00 committed by Joost De Cock
parent 4413251233
commit b2da4923d6
2 changed files with 28 additions and 12 deletions

View file

@ -1,6 +1,8 @@
#!/usr/bin/env node
'use strict'
require('util.promisify/shim')()
const meow = require('meow')
const getLibraryDefaults = require('./lib/get-library-defaults')

View file

@ -10,6 +10,7 @@
const nodeExternals = require('webpack-node-externals')
const path = require('path')
const webpack = require('webpack')
module.exports = {
target: 'node',
@ -28,12 +29,23 @@ module.exports = {
externals: [
nodeExternals()
],
plugins: [
new webpack.BannerPlugin({
banner: '#!/usr/bin/env node',
raw: true
})
],
module: {
loaders: [
{
loader: 'babel-loader',
test: /.js$/,
exclude: /node_modules/,
loaders: [
{
loader: 'shebang-loader'
},
{
loader: 'babel-loader',
query: {
babelrc: false,
plugins: [
@ -48,4 +60,6 @@ module.exports = {
}
]
}
]
}
}