Skip to content

Commit eabe2ea

Browse files
authored
Add serverless template (#70)
Adds support for the serverless template with some minor updates to dev-toolkit itself and the used templates. Fixes a vulnerability with yargs.
1 parent f2897f7 commit eabe2ea

File tree

17 files changed

+1118
-2165
lines changed

17 files changed

+1118
-2165
lines changed

Readme.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ $ dev-toolkit init [project_name] [--template template_name] [--skip-comments]
3232
- [`standard`](https://github.com/stoikerty/dev-toolkit/blob/master/docs/templates.md#standard)* [![Vulnerabilities for standard template](https://snyk.io/test/github/stoikerty/dev-toolkit/badge.svg?targetFile=src%2Ftemplates%2Fstandard%2Fpackage.json)](https://snyk.io/test/github/stoikerty/dev-toolkit?targetFile=src%2Ftemplates%2Fstandard%2Fpackage.json)
3333
- [`with-eslint`](https://github.com/stoikerty/dev-toolkit/blob/master/docs/templates.md#with-eslint) [![Vulnerabilities for with-eslint template](https://snyk.io/test/github/stoikerty/dev-toolkit/badge.svg?targetFile=src%2Ftemplates%2Fwith-eslint%2Fpackage.json)](https://snyk.io/test/github/stoikerty/dev-toolkit?targetFile=src%2Ftemplates%2Fwith-eslint%2Fpackage.json)
3434
- [`with-sass`](https://github.com/stoikerty/dev-toolkit/blob/master/docs/templates.md#with-sass) [![Vulnerabilities for with-sass template](https://snyk.io/test/github/stoikerty/dev-toolkit/badge.svg?targetFile=src%2Ftemplates%2Fwith-sass%2Fpackage.json)](https://snyk.io/test/github/stoikerty/dev-toolkit?targetFile=src%2Ftemplates%2Fwith-sass%2Fpackage.json)
35+
- [`serverless`](https://github.com/stoikerty/dev-toolkit/blob/master/docs/templates.md#serverless) [![Vulnerabilities for serverless template](https://snyk.io/test/github/stoikerty/dev-toolkit/badge.svg?targetFile=src%2Ftemplates%2Fserverless%2Fpackage.json)](https://snyk.io/test/github/stoikerty/dev-toolkit?targetFile=src%2Ftemplates%2Fserverless%2Fpackage.json)
3536

3637
<small>* used by default when initialising a new project</small>
3738

@@ -67,13 +68,5 @@ The aim of dev-toolkit is to be unopinionated so that it can be useful in many d
6768

6869
With CSS-in-JS solutions on the rise, it would be unwise to include dependencies for `css-modules`, `sass` or `less` in every project that has `dev-toolkit` as a dependency, it would introduce additional installation time and bloat.
6970

70-
### Roadmap
71-
72-
* More docs on extending with config, how dev-toolkit works, choices
73-
* serverless template
74-
* Using your own (external) template - under consideration
75-
* Eject feature - under consideration
76-
* list differences between dev-toolkit, next.js & create-react-app
77-
7871
## Contributing
7972
See [`Contributing.md`](https://github.com/stoikerty/dev-toolkit/blob/master/Contributing.md)

docs/templates.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ This template contains no routing or css, it will give you out of the box:
155155
### with-sass
156156
Example using sass/scss with custom webpack configuration and node-hooks.
157157

158+
### serverless
159+
Example using a `handler.js`-file that simulates a serverless scenario. You can test the file with `npm run render`. This file uses the dev-toolkit `preRender` command in programmatic mode which allows to avoid using express for the preRender while still being able to use express for local development with hot-reload using `npm run dev`.
160+
158161
### with-eslint
159162
Example using eslint-configuration.
160163

src/packages/dev-toolkit/Readme.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ $ dev-toolkit init [project_name] [--template template_name] [--skip-comments]
3232
- [`standard`](https://github.com/stoikerty/dev-toolkit/blob/master/docs/templates.md#standard)* [![Vulnerabilities for standard template](https://snyk.io/test/github/stoikerty/dev-toolkit/badge.svg?targetFile=src%2Ftemplates%2Fstandard%2Fpackage.json)](https://snyk.io/test/github/stoikerty/dev-toolkit?targetFile=src%2Ftemplates%2Fstandard%2Fpackage.json)
3333
- [`with-eslint`](https://github.com/stoikerty/dev-toolkit/blob/master/docs/templates.md#with-eslint) [![Vulnerabilities for with-eslint template](https://snyk.io/test/github/stoikerty/dev-toolkit/badge.svg?targetFile=src%2Ftemplates%2Fwith-eslint%2Fpackage.json)](https://snyk.io/test/github/stoikerty/dev-toolkit?targetFile=src%2Ftemplates%2Fwith-eslint%2Fpackage.json)
3434
- [`with-sass`](https://github.com/stoikerty/dev-toolkit/blob/master/docs/templates.md#with-sass) [![Vulnerabilities for with-sass template](https://snyk.io/test/github/stoikerty/dev-toolkit/badge.svg?targetFile=src%2Ftemplates%2Fwith-sass%2Fpackage.json)](https://snyk.io/test/github/stoikerty/dev-toolkit?targetFile=src%2Ftemplates%2Fwith-sass%2Fpackage.json)
35+
- [`serverless`](https://github.com/stoikerty/dev-toolkit/blob/master/docs/templates.md#serverless) [![Vulnerabilities for serverless template](https://snyk.io/test/github/stoikerty/dev-toolkit/badge.svg?targetFile=src%2Ftemplates%2Fserverless%2Fpackage.json)](https://snyk.io/test/github/stoikerty/dev-toolkit?targetFile=src%2Ftemplates%2Fserverless%2Fpackage.json)
3536

3637
<small>* used by default when initialising a new project</small>
3738

@@ -67,13 +68,5 @@ The aim of dev-toolkit is to be unopinionated so that it can be useful in many d
6768

6869
With CSS-in-JS solutions on the rise, it would be unwise to include dependencies for `css-modules`, `sass` or `less` in every project that has `dev-toolkit` as a dependency, it would introduce additional installation time and bloat.
6970

70-
### Roadmap
71-
72-
* More docs on extending with config, how dev-toolkit works, choices
73-
* serverless template
74-
* Using your own (external) template - under consideration
75-
* Eject feature - under consideration
76-
* list differences between dev-toolkit, next.js & create-react-app
77-
7871
## Contributing
7972
See [`Contributing.md`](https://github.com/stoikerty/dev-toolkit/blob/master/Contributing.md)

0 commit comments

Comments
 (0)