create-faas-app 0.0.2-beta.220 → 0.0.2-beta.257

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+
3
+ 'use strict';
4
+
5
+ require('./lib/index')
package/lib/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- import { Command } from 'commander';
2
- declare const commander: Command;
1
+ declare const commander: import("commander").Command;
3
2
  export default commander;
package/lib/index.js CHANGED
@@ -151,7 +151,10 @@ production:
151
151
  "coverage"
152
152
  ],
153
153
  "jest": {
154
- "preset": "ts-jest",
154
+ "verbose": false,
155
+ "transform": {
156
+ ".(jsx|tsx?)": "@sucrase/jest-plugin"
157
+ },
155
158
  "collectCoverage": true,
156
159
  "collectCoverageFrom": [
157
160
  "**/*.ts"
@@ -201,7 +204,7 @@ coverage/
201
204
  "**/dist": true,
202
205
  "**/tmp": true
203
206
  },
204
- "eslint.packageManager": "yarn",
207
+ "eslint.packageManager": "npm",
205
208
  "eslint.validate": [
206
209
  "javascript",
207
210
  "javascriptreact",
@@ -214,7 +217,7 @@ coverage/
214
217
  "gulp.autoDetect": "off",
215
218
  "npm.autoDetect": "off"
216
219
  }`);
217
- child_process.execSync(`yarn --cwd ${answers.name} install`, { stdio: 'inherit' });
220
+ child_process.execSync(`cd ${answers.name} && npm install`, { stdio: 'inherit' });
218
221
  if (answers.example) {
219
222
  fs.writeFileSync(path.join(answers.name, 'index.func.ts'), `import { useFunc } from '@faasjs/func';
220
223
  import { useHttp } from '@faasjs/http';
@@ -240,7 +243,7 @@ describe('hello', function () {
240
243
  });
241
244
  });
242
245
  `);
243
- child_process.execSync(`yarn --cwd ${answers.name} jest`, { stdio: 'inherit' });
246
+ child_process.execSync(`cd ${answers.name} && npm exec jest`, { stdio: 'inherit' });
244
247
  }
245
248
  }
246
249
  function action$1 (program) {
@@ -249,7 +252,7 @@ function action$1 (program) {
249
252
  .on('--help', function () {
250
253
  console.log(`
251
254
  Examples:
252
- yarn create faas-app`);
255
+ npx create-faas-app`);
253
256
  })
254
257
  .option('--name <name>', '项目名字')
255
258
  .option('--region <region>', '可用区')
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "create-faas-app",
3
- "version": "0.0.2-beta.220",
3
+ "version": "0.0.2-beta.257",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
+ "types": "libs/index.d.ts",
6
7
  "bin": {
7
- "create-faas-app": "lib/index.js"
8
+ "create-faas-app": "index.js"
8
9
  },
9
10
  "homepage": "https://faasjs.com/doc/create-faas-app.html",
10
11
  "repository": {
@@ -16,7 +17,8 @@
16
17
  "prepack": "rm -rf ./lib && rollup -c"
17
18
  },
18
19
  "files": [
19
- "lib"
20
+ "lib",
21
+ "index.js"
20
22
  ],
21
23
  "dependencies": {
22
24
  "commander": "*",
@@ -29,5 +31,5 @@
29
31
  "rollup": "*",
30
32
  "rollup-plugin-typescript2": "*"
31
33
  },
32
- "gitHead": "4fcaeb158971f3565179ba4bbb065fea73b38566"
34
+ "gitHead": "febe1ba20502e0b776f7efe9100abf0f82b199a0"
33
35
  }