Browse Source

Build inside a single directory

master
Leo Lamprecht 8 years ago
parent
commit
f92e556b7c
  1. 2
      .gitignore
  2. 3
      download/placeholder.js
  3. 0
      download/postinstall.js
  4. 0
      download/src/chmod.js
  5. 0
      download/src/index.js
  6. 0
      download/src/log.js
  7. 4
      download/webpack.js
  8. 10
      package.json

2
.gitignore

@ -1,6 +1,6 @@
# build output
dist
packed
download/dist
# dependencies
node_modules

3
placeholder.js → download/placeholder.js

@ -4,8 +4,7 @@
var path = require('path')
var fs = require('fs')
var dist = path.join(__dirname, 'dist')
var now = path.join(dist, 'now')
var now = path.join(__dirname, 'dist', 'now')
fs.writeFileSync(
now,

0
postinstall.js → download/postinstall.js

0
download/chmod.js → download/src/chmod.js

0
download/index.js → download/src/index.js

0
download/log.js → download/src/log.js

4
download/webpack.js

@ -8,10 +8,10 @@ module.exports = {
__filename: false
},
entry: [
'./index.js'
'./src/index.js'
],
output: {
path: path.join(__dirname, '../dist'),
path: path.join(__dirname, 'dist'),
filename: 'download.js'
},
module: {

10
package.json

@ -3,9 +3,9 @@
"version": "6.0.0",
"private": true,
"scripts": {
"postinstall": "node postinstall.js",
"postinstall": "node download/postinstall.js",
"precommit": "xo --quiet && lint-staged",
"prepublish": "in-install || (npm run webpack && node placeholder.js)",
"prepublish": "in-install || (npm run webpack && node download/placeholder.js)",
"lint": "xo --quiet",
"test": "npm run lint && ava",
"pack": "pkg bin/now.js -c package.json -o packed/now",
@ -24,11 +24,10 @@
]
},
"bin": {
"now": "dist/now"
"now": "download/dist/now"
},
"files": [
"dist",
"postinstall.js"
"download"
],
"ava": {
"failFast": true,
@ -49,7 +48,6 @@
"git add"
]
},
"dependencies": {},
"devDependencies": {
"@google/maps": "0.3.1",
"alpha-sort": "2.0.1",

Loading…
Cancel
Save