Skip to content

Commit

Permalink
build (#43)
Browse files Browse the repository at this point in the history
* build

* HEROKU – add a script to merge dependencies

* HEROKU – fix merge dependencies script
  • Loading branch information
Hiswe committed Sep 15, 2017
1 parent f50ce8d commit 3b892f3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions bin/merge-dependencies.js
@@ -0,0 +1,15 @@
'use strict'

const fs = require( 'fs' )
const path = require( 'path' )

const basePackage = require( '../package.json' )
const {
dependencies,
devDependencies,
} = basePackage
basePackage.dependencies = Object.assign( {}, dependencies, devDependencies )
delete basePackage.devDependencies
const filepath = path.join( __dirname, '../package.json' )

fs.writeFileSync( filepath , JSON.stringify(basePackage, null, 2) )
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -196,7 +196,7 @@
"tape": "tape './tests/functional/*.js' | faucet",
"test-back": "npm run tape",
"toc": "gulp toc",
"heroku-prebuild": "export NODE_ENV=development; export NPM_CONFIG_PRODUCTION=false;",
"heroku-prebuild": "node ./bin/merge-dependencies.js",
"heroku-postbuild": "npm run build"
},
"engines": {
Expand Down

0 comments on commit 3b892f3

Please sign in to comment.