Skip to content

Commit 9d0d3a0

Browse files
author
sw-yx
committed
2 parents 53e2c13 + fd3d026 commit 9d0d3a0

File tree

4 files changed

+32
-4
lines changed

4 files changed

+32
-4
lines changed

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2019 Netlify <team@netlify.com>
2+
3+
MIT License
4+
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
"Software"), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
12+
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ If this sounds confusing, support is available through [our regular channels](ht
2121

2222
<details>
2323
<summary><b>Netlify Dev vs. Netlify-Lambda</b></summary>
24+
25+
### You can see how to convert a Netlify-Lambda project to Netlify Dev as well as why and how they work together in [this 48 min video here](https://www.youtube.com/watch?v=sakKOT6nkkE)
2426

2527
[`Netlify Dev`](https://github.com/netlify/netlify-dev-plugin#what-is-netlify-dev) is incrementally adoptable. **`netlify-lambda` is still recommended if you need a build step for your functions**, as explained here:
2628

bin/cmd.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,18 @@ program
2727
.action(function(cmd, options) {
2828
console.log("netlify-lambda: Starting server");
2929
var static = Boolean(program.static);
30-
var server = serve.listen(program.port || 9000, static, Number(program.timeout) || 10);
3130
if (static) return; // early terminate, don't build
3231
build.watch(cmd, program.config, function(err, stats) {
3332
if (err) {
3433
console.error(err);
3534
return;
3635
}
37-
36+
37+
console.log(stats.toString({ color: true }));
38+
var server = serve.listen(program.port || 9000, static, Number(program.timeout) || 10);
3839
stats.compilation.chunks.forEach(function(chunk) {
3940
server.clearCache(chunk.name);
4041
});
41-
42-
console.log(stats.toString({ color: true }));
4342
});
4443
});
4544

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
"scripts": {
1111
"test": "jest"
1212
},
13+
"files": [
14+
"lib/*.js",
15+
"!lib/*.spec.js",
16+
"bin/*.js"
17+
],
1318
"author": "Mathias Biilmann Christensen",
1419
"license": "MIT",
1520
"repository": {

0 commit comments

Comments
 (0)