Pre-transpile babel for npm packaging
This commit is contained in:
parent
0740210ac7
commit
bdabed94c8
|
@ -1,2 +1,3 @@
|
|||
node_modules
|
||||
.env
|
||||
dist
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
node_modules
|
||||
.env
|
||||
src
|
||||
start.sh
|
|
@ -3,9 +3,11 @@
|
|||
"version": "0.1.1",
|
||||
"description": "",
|
||||
"scripts": {
|
||||
"start": "./start.sh"
|
||||
"start": "./start.sh",
|
||||
"dist": "babel -d dist src",
|
||||
"prepublishOnly": "npm run dist"
|
||||
},
|
||||
"bin": "cli.js",
|
||||
"bin": "dist/cli.js",
|
||||
"author": "Nadav Ivgi",
|
||||
"license": "MIT",
|
||||
"keywords": [ "bitcoin", "lightning", "lightning-charge", "micropayments" ],
|
||||
|
|
|
@ -25,7 +25,7 @@ Object.assign(app.locals, {
|
|||
, prettybytes: require('pretty-bytes')
|
||||
, markdown: require('markdown-it')()
|
||||
, qruri: require('qruri')
|
||||
, version: require('./package').version
|
||||
, version: require('../package').version
|
||||
, pretty: (conf.env === 'development')
|
||||
})
|
||||
|
|
@ -4,9 +4,8 @@ const path = require('path')
|
|||
, fs = require('fs')
|
||||
|
||||
require('babel-polyfill')
|
||||
require('babel-register')
|
||||
|
||||
const templatePath = path.join(__dirname, '_filebazaar.yaml.example')
|
||||
const templatePath = path.join(__dirname, '..', '_filebazaar.yaml.example')
|
||||
|
||||
if (process.argv[2] === 'init') {
|
||||
const directory = process.argv[3] || process.cwd()
|
|
@ -25,8 +25,8 @@ module.exports = basePath => {
|
|||
config.invoice_ttl = config.invoice_ttl || +process.env.INVOICE_TTL || 3600 // 1 hour
|
||||
config.download_ttl = config.download_ttl || +process.env.DOWNLOAD_TTL || 172800 // 2 days
|
||||
|
||||
config.views_dir = config.views_dir || process.env.VIEWS_DIR || path.join(__dirname, '..', 'views')
|
||||
config.static_dir = config.static_dir || process.env.STATIC_DIR || path.join(__dirname, '..', 'static')
|
||||
config.views_dir = config.views_dir || process.env.VIEWS_DIR || path.join(__dirname, '..', '..', 'views')
|
||||
config.static_dir = config.static_dir || process.env.STATIC_DIR || path.join(__dirname, '..', '..', 'static')
|
||||
config.theme = config.theme || process.env.THEME || 'yeti'
|
||||
config.css = config.css || process.env.CSS
|
||||
|
Loading…
Reference in New Issue