Albin Ekblom
6602b8ac36
Replace fs-promise with fs-extra ( #559 )
8 years ago
Tony Kovanen
ea7dadeb67
Fix getting files for static deployments
8 years ago
Tony Kovanen
45e55d58e2
Support static types when deploying
8 years ago
Tony Kovanen
91de162fd5
New static deployment support
8 years ago
Nathan Rajlich
7e0f5f1a56
dynamically update the "serve" version for static deployments ( #513 )
Since we use Greenkeeper to update dependencies for `now-cli`,
we can depend on it to keep the version of `serve` that we use
for static deployments up-to-date at all times.
8 years ago
Nathan Rajlich
3902a7da62
update "serve" for static deployments to v5.1.4
8 years ago
Nathan Rajlich
49a2a645c8
refactor the `readMetaData()` function ( #508 )
* refactor the `readMetaData()` function
* add a couple new test cases
* test: restore "build" prefix
Fixes Node.js <= v6
* add default values for `npm`/`docker` get files functions
Makes the logic simpler, since we don't have to check for existence.
* throw an error when missing start/now-start or server.js
* pass in entire `readMetaData()` result to Now.create()
This avoids us reading these files from the filesystem again
8 years ago
Jarmo Isotalo
c05405e193
Read docker label correctly, fixes #368 ( #501 )
8 years ago
Nathan Rajlich
554170e3b4
check for Dockerfile when now.json is present ( #486 )
Consider a tree like:
```
.
├── Dockerfile
└── now.json
0 directories, 2 files
```
Before this patch, this deployment would be considered a "static"
deployment, which is incorrect. Now it is properly detected
as a "docker" deployment type.
8 years ago
Leo Lamprecht
b0a88b377c
Prettified everything
8 years ago
Nathan Rajlich
cc8e0b8e4a
Use implicit "start" script when `server.js` exists
Moves the verification step to the `create()` function,
instead of in `readMetaData()`.
Closes https://github.com/zeit/now-cli/issues/181 .
8 years ago
Tim Neutkens
930c2eb90a
Check if name is empty ( #451 )
8 years ago
Leo Lamprecht
99f677652b
Show proper error if `start` and `now-start` scripts are missing
8 years ago
Leo Lamprecht
1f85f6d5db
Moved back to XO for linting
cc @sindresorhus
8 years ago
Leo Lamprecht
a49a033408
Upgraded instance of `serve`
8 years ago
Leo Lamprecht
4119c17abe
Prettified everything
8 years ago
Leo Lamprecht
e5babe0c7c
Run `serve` in production mode and update it
8 years ago
Leo Lamprecht
797cdd8308
Bumped `serve` to latest version
8 years ago
Hugo
7c14fd7cb1
Fix now alias failing when now.json doesn’t define deployment type ( #321 )
8 years ago
Leo Lamprecht
ae9dd8f441
Make static deployments definable
This closes #318
8 years ago
Leo Lamprecht
0f52271757
Use static deployment type if defined in config
8 years ago
Leo Lamprecht
2f85a6a966
Split error into multiple lines
8 years ago
Leo Lamprecht
3464f34579
Make static deployments work again
8 years ago
Leo Lamprecht
f0b85bc2bf
Install latest version of `serve` (make static deployments work)
8 years ago
Leo Lamprecht
a5a3b01af9
Upgraded `serve` yet again
8 years ago
Leo Lamprecht
373e17a51d
Bumped `serve`
8 years ago
Leo Lamprecht
be1a799f18
Bumped `serve`
8 years ago
Leo Lamprecht
8027751e4b
Bumped `serve` yet again
8 years ago
Leo Lamprecht
1770486ff6
Bumped `serve` to latest version
8 years ago
Nathan Rajlich
9540863c0e
fix typo
8 years ago
Nathan Rajlich
957744e3a5
add `now.json:name` field support
8 years ago
Nathan Rajlich
73f22bb68e
use G's wording for error message
8 years ago
Nathan Rajlich
1151830af6
a couple more test cases and fixes for them
8 years ago
Nathan Rajlich
7daf1e4c49
Only throw when both `pkg.now` and `now.json` are present
Fixes failing test case.
8 years ago
Nathan Rajlich
38fe08ad97
rename getMetadata() to readMetaData()
Matches what it's called elsewhere in the codebase
8 years ago
Nathan Rajlich
d9b5c4d4fa
fix lint
8 years ago
Nathan Rajlich
f6c0e65b7f
fail hard when both a `now.json` and `package.json` file with "now" are present
As discussed in the GH issue.
8 years ago
Nathan Rajlich
c11131310c
fix lint
8 years ago
Nathan Rajlich
76e4ab5037
support `now.files` in now.json
Needs a test case still...
8 years ago
Nathan Rajlich
cee788d3e1
add a `strict` mode to readMetadata()
Test cases will set this to `false`, because they're
missing `scripts.start` and other required properties in this function
8 years ago
Nathan Rajlich
4c9caa420b
initial `now.json` support
8 years ago
Jarmo Isotalo
3732bfb16c
Don't require for CMD and EXPOSE to be defined in Dockerfile used for ( #237 )
deploying but allow those to be defined in upstream Dockerfiles
8 years ago
Leo Lamprecht
c45eeed38f
No `version` property required
8 years ago
Leo Lamprecht
d8e4e41b8d
Pinned `serve` but allowing patches
8 years ago
Jarmo Isotalo
059918e7ee
Remove babel as dependecy ( #209 )
* Remove babel as a dependency
* Migrate from import foo from foo to const foo = require('foo')
* Update module.exports
* Update commander syntax
* Update pkg config and fix stuff
* Make XO happy
* Fix path in tests
* Fix typo
* Fix cleanup
* Debug pkg
* Fix pkg
* Fix process.argv for subcommands
* Run with --harmony-async-await when supported thx igor for help with this trick :D
* Use bash
* Set engines.node in package.json
8 years ago
Leo Lamprecht
f997a8fa61
List got renamed
8 years ago
Leo Lamprecht
25fef39f1a
Ability to set name
This closes #150
8 years ago
Matheus Fernandes
53f1ffab40
Fix code style 💅 ( #107 )
8 years ago
Olli Vanhoja
f31d1f0804
Fixes to Dockerfile metadata parsing ( #103 )
- No need to check if pkg.name is null
- Properly default to basename if labels.name isn't set
8 years ago
Leo Lamprecht
c5626178ed
Move files into content dir if static
8 years ago