@architect/create
Advanced tools
Comparing version 1.0.7 to 1.0.8-RC.0
@@ -5,2 +5,8 @@ # Architect Create changelog | ||
## [1.0.8] 2019-12-17 | ||
### Added | ||
- Added custom runtime `deno` | ||
## [1.0.7] 2019-12-15 | ||
@@ -7,0 +13,0 @@ |
@@ -14,3 +14,3 @@ #!/usr/bin/env node | ||
* opts | ||
* -r|--runtime|runtime ......... set up with one of node, python, or ruby | ||
* -r|--runtime|runtime ......... set up with one of node, deno, python, or ruby | ||
* -v|--verbose|verbose ......... prints all output to console | ||
@@ -30,5 +30,2 @@ */ | ||
// Bootstrap the project on the filesystem, including new dirs, npm i, etc. | ||
let {folder, install} = await bootstrap({options, standalone, update}) | ||
// Populate basic project files | ||
@@ -39,2 +36,6 @@ let opts = { | ||
} | ||
// Bootstrap the project on the filesystem, including new dirs, npm i, etc. | ||
let {folder, install} = await bootstrap({options, standalone, update, runtime: opts.runtime}) | ||
return create({options: opts, folder, install, standalone, update}) | ||
@@ -41,0 +42,0 @@ } |
{ | ||
"name": "@architect/create", | ||
"version": "1.0.7", | ||
"version": "1.0.8-RC.0", | ||
"description": "Idempotently initialize Architect projects", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -13,3 +13,3 @@ [<img src="https://s3-us-west-2.amazonaws.com/arc.codes/architect-logo-500b@2x.png" width=500>](https://www.npmjs.com/package/@architect/create) | ||
``` | ||
npm init @architect [--runtime [node, ruby, python]] [project name and/or path] | ||
npm init @architect [--runtime [node, deno, ruby, python]] [project name and/or path] | ||
``` | ||
@@ -16,0 +16,0 @@ |
@@ -11,3 +11,3 @@ let {join} = require('path') | ||
*/ | ||
module.exports = function arcPackage ({options, name, folder}) { | ||
module.exports = function arcPackage({options, name, folder}) { | ||
// Don't install if invoked from a globally installed @arc/arc | ||
@@ -14,0 +14,0 @@ let isGlobal = (options[0] && options[1] && options[2] && |
@@ -5,3 +5,3 @@ let {join} = require('path') | ||
module.exports = function arcTemplate ({name, folder, standalone, update}) { | ||
module.exports = function arcTemplate({name, folder, standalone, update, runtime}) { | ||
// most basic default Architect app possible | ||
@@ -14,4 +14,4 @@ let arcFile = `@app | ||
## Uncomment the following lines to deploy to AWS! | ||
# @aws | ||
@aws | ||
runtime ${runtime} | ||
# profile default | ||
@@ -23,2 +23,3 @@ # region us-west-1 | ||
let pathToArc = join(folder, '.arc') | ||
// FIXME add app.arc, arc.toml and arc.yml | ||
let pathToJSON = join(folder, 'arc.json') | ||
@@ -25,0 +26,0 @@ let pathToYAML = join(folder, 'arc.yaml') |
@@ -18,3 +18,3 @@ let path = require('path') | ||
*/ | ||
module.exports = async function maybeCreate ({options=[], standalone=false, update}) { | ||
module.exports = async function maybeCreate({options=[], standalone=false, update, runtime}) { | ||
if (!update) update = updater('Create') | ||
@@ -41,3 +41,3 @@ | ||
} | ||
arcTemplate({name, folder, standalone, update}) | ||
arcTemplate({name, folder, standalone, update, runtime}) | ||
@@ -44,0 +44,0 @@ /** |
@@ -38,5 +38,6 @@ let {readArc, updater} = require('@architect/utils') | ||
let supported = ['node', 'ruby', 'python', 'rb', 'py', 'js'] | ||
let supported = ['node', 'deno', 'ruby', 'python', 'rb', 'py', 'js'] | ||
let node = 'nodejs10.x' | ||
let deno = 'deno' | ||
let ruby = 'ruby2.5' | ||
@@ -49,3 +50,3 @@ let python = 'python3.7' | ||
if (supported.includes(override)) { | ||
let runtimes = {node, ruby, python, rb:ruby, py:python, js:node} | ||
let runtimes = {node, ruby, python, rb:ruby, py:python, js:node, deno} | ||
runtime = runtimes[override] | ||
@@ -52,0 +53,0 @@ } |
@@ -7,6 +7,7 @@ /** | ||
let ext = rt => runtime.startsWith(rt) | ||
if (ext('node')) return 'js' | ||
if (ext('python')) return 'py' | ||
if (ext('ruby')) return 'rb' | ||
if (ext('node')) return 'js' | ||
if (ext('deno')) return 'ts' | ||
if (ext('python')) return 'py' | ||
if (ext('ruby')) return 'rb' | ||
throw Error('invalid runtime') | ||
} |
@@ -13,3 +13,3 @@ let fs = require('fs') | ||
* @param {string} type - required. one of: http, event, queue, table, ws | ||
* @param {string} runtime - required. one of: node, ruby, python | ||
* @param {string} runtime - required. one of: node, deno, ruby, python | ||
* @param {string} method - optional. one of: get, post, put, delete, patch | ||
@@ -16,0 +16,0 @@ * @param {string} path - optional. of the format: /foo/:bar/baz |
@@ -9,2 +9,11 @@ let learn = 'learn more about event functions here: https://arc.codes/primitives/events' | ||
let deno = `import { Context, Event } from "https://deno.land/x/lambda/mod.ts"; | ||
export async function handler(event: Event, context: Context) { | ||
return { | ||
statusCode: 200, | ||
body: \`Welcome to deno \${Deno.version.deno} 🦕\` | ||
}; | ||
}` | ||
let ruby = `# ${learn} | ||
@@ -22,2 +31,2 @@ def handler(event) | ||
module.exports = {nodejs, ruby, python} | ||
module.exports = {nodejs, deno, ruby, python} |
let learn = 'learn more about HTTP functions here: https://arc.codes/primitives/http' | ||
let deno = `import { Context, Event } from "https://deno.land/x/lambda/mod.ts"; | ||
export async function handler(event: Event, context: Context) { | ||
return { | ||
statusCode: 200, | ||
body: \`Welcome to deno \${Deno.version.deno} 🦕\` | ||
}; | ||
}` | ||
function html (lang, ext) { | ||
@@ -96,2 +105,2 @@ return ` | ||
module.exports = {nodejs, ruby, python} | ||
module.exports = {nodejs, deno, ruby, python} |
@@ -9,2 +9,11 @@ let learn = 'learn more about queue functions here: https://arc.codes/primitives/queues' | ||
let deno = `import { Context, Event } from "https://deno.land/x/lambda/mod.ts"; | ||
export async function handler(event: Event, context: Context) { | ||
return { | ||
statusCode: 200, | ||
body: \`Welcome to deno \${Deno.version.deno} 🦕\` | ||
}; | ||
}` | ||
let ruby = `# ${learn} | ||
@@ -22,2 +31,2 @@ def handler(event) | ||
module.exports = {nodejs, ruby, python} | ||
module.exports = {nodejs, deno, ruby, python} |
@@ -9,2 +9,12 @@ let learn = 'learn more about scheduled functions here: https://arc.codes/primitives/scheduled' | ||
let deno = `import { Context, Event } from "https://deno.land/x/lambda/mod.ts"; | ||
export async function handler(event: Event, context: Context) { | ||
return { | ||
statusCode: 200, | ||
body: \`Welcome to deno \${Deno.version.deno} 🦕\` | ||
}; | ||
}` | ||
let ruby = `# ${learn} | ||
@@ -22,2 +32,2 @@ def handler(event) | ||
module.exports = {nodejs, ruby, python} | ||
module.exports = {nodejs, deno, ruby, python} |
@@ -9,2 +9,11 @@ let learn = 'learn more about DynamoDB table stream functions here: https://arc.codes/primitives/tables' | ||
let deno = `import { Context, Event } from "https://deno.land/x/lambda/mod.ts"; | ||
export async function handler(event: Event, context: Context) { | ||
return { | ||
statusCode: 200, | ||
body: \`Welcome to deno \${Deno.version.deno} 🦕\` | ||
}; | ||
}` | ||
let ruby = `# ${learn} | ||
@@ -22,2 +31,2 @@ def handler(event) | ||
module.exports = {nodejs, ruby, python} | ||
module.exports = {nodejs, deno, ruby, python} |
@@ -9,2 +9,11 @@ let learn = 'learn more about WebSocket functions here: https://arc.codes/primitives/ws' | ||
let deno = `import { Context, Event } from "https://deno.land/x/lambda/mod.ts"; | ||
export async function handler(event: Event, context: Context) { | ||
return { | ||
statusCode: 200, | ||
body: \`Welcome to deno \${Deno.version.deno} 🦕\` | ||
}; | ||
}` | ||
let ruby = `# ${learn} | ||
@@ -22,2 +31,2 @@ def handler(event) | ||
module.exports = {nodejs, ruby, python} | ||
module.exports = {nodejs, deno, ruby, python} |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
45395
813
2