GithubHelp home page GithubHelp logo

bitjson / typescript-starter Goto Github PK

View Code? Open in Web Editor NEW
3.5K 43.0 242.0 1.95 MB

Quickly create and configure a new library or Node.js project

Home Page: https://bitjson.github.io/typescript-starter/

License: MIT License

TypeScript 99.42% JavaScript 0.58%
typescript typedoc ava tslint prettier standard-version nodejs library starter template

typescript-starter's Issues

env: node\r: No such file or directory

  • I'm submitting a ...
    [x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary

After generating a project, I ran npm run info and received the following:

> [email protected] info /Users/REDACTED
> npm-scripts-info

env: node\r: No such file or directory
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] info: `npm-scripts-info`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] info script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/REDACTED

The same error occurs when running ./node_modules/.bin/npm-scripts-info directly.

However, if you call it as node ./node_modules/.bin/npm-scripts-info, it works fine.

This is obviously the same error as here so there's clearly some DOS endings instead of unix endings but I'm not sure where.

CLI setup failing on windows 10

  • I'm submitting a ...
    [ x ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ x ] question about how to use this project

  • Summary

Either I'm setting this up wrong, or there's a bug with the setup. Running through the CLI constantly fails to properly install for me on windows 10. I have tried in command prompt, powershell, and Bash (WSL) and each time I get the same error. I have also tried using "Run as admin" and still fails.

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

Errors:

image

Main error is a renaming operation;

15921 silly saveTree | `-- [email protected]
15921 silly saveTree `-- [email protected]
15922 verbose stack Error: EPERM: operation not permitted, rename 'X:\dev\.misc\test-ts\node_modules\.staging\nyc-f51733ed\node_modules\snapdragon' -> 'X:\dev\.misc\test-ts\node_modules\.staging\snapdragon-5e10080e'
15923 verbose cwd X:\dev\.misc\test-ts
15924 verbose Windows_NT 10.0.17134
15925 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\xander\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
15926 verbose node v10.7.0
15927 verbose npm  v6.1.0
15928 error path X:\dev\.misc\test-ts\node_modules\.staging\nyc-f51733ed\node_modules\snapdragon
15929 error code EPERM
15930 error errno -4048
15931 error syscall rename
15932 error Error: EPERM: operation not permitted, rename 'X:\dev\.misc\test-ts\node_modules\.staging\nyc-f51733ed\node_modules\snapdragon' -> 'X:\dev\.misc\test-ts\node_modules\.staging\snapdragon-5e10080e'
15932 error  { [Error: EPERM: operation not permitted, rename 'X:\dev\.misc\test-ts\node_modules\.staging\nyc-f51733ed\node_modules\snapdragon' -> 'X:\dev\.misc\test-ts\node_modules\.staging\snapdragon-5e10080e']
15932 error   cause:
15932 error    { Error: EPERM: operation not permitted, rename 'X:\dev\.misc\test-ts\node_modules\.staging\nyc-f51733ed\node_modules\snapdragon' -> 'X:\dev\.misc\test-ts\node_modules\.staging\snapdragon-5e10080e'
15932 error      errno: -4048,
15932 error      code: 'EPERM',
15932 error      syscall: 'rename',
15932 error      path:
15932 error       'X:\\dev\\.misc\\test-ts\\node_modules\\.staging\\nyc-f51733ed\\node_modules\\snapdragon',
15932 error      dest:
15932 error       'X:\\dev\\.misc\\test-ts\\node_modules\\.staging\\snapdragon-5e10080e' },
15932 error   stack:
15932 error    'Error: EPERM: operation not permitted, rename \'X:\\dev\\.misc\\test-ts\\node_modules\\.staging\\nyc-f51733ed\\node_modules\\snapdragon\' -> \'X:\\dev\\.misc\\test-ts\\node_modules\\.staging\\snapdragon-5e10080e\'',
15932 error   errno: -4048,
15932 error   code: 'EPERM',
15932 error   syscall: 'rename',
15932 error   path:
15932 error    'X:\\dev\\.misc\\test-ts\\node_modules\\.staging\\nyc-f51733ed\\node_modules\\snapdragon',
15932 error   dest:
15932 error    'X:\\dev\\.misc\\test-ts\\node_modules\\.staging\\snapdragon-5e10080e',
15932 error   parent: 'test-ts' }
15933 error The operation was rejected by your operating system.
15933 error It's possible that the file was already in use (by a text editor or antivirus),
15933 error or that you lack permissions to access it.
15933 error
15933 error If you believe this might be a permissions issue, please double-check the
15933 error permissions of the file and its containing directories, or try running
15933 error the command again as root/Administrator (though this is not recommended).
15934 verbose exit [ -4048, true ]

message: 'nodegit_1 is not defined',

  • I'm submitting a ...
    [X] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

Step 1:

yarn add nodegit --save

Step 2:

yarn add @types/nodegit --save -D

Step 3:

import { Clone, Cred } from 'nodegit';

const cloneURL = '[email protected]:nodegit/test';
const localPath = require('path').join(__dirname, 'tmp');

    const cloneOptions = {
      fetchOpts: {
        callbacks: {
          certificateCheck: () => 1,
          credentials: (url: string, userName: string) => {
            return Cred.sshKeyFromAgent(userName);
          }
        }
      }
    };
const repo = await Clone.clone(cloneURL, localPath, cloneOptions);

I get following error:

  /Users/shiv/projects/myapp-cli/src/lib/create.ts:36                                                                  
   36:     const repo = await Clone.clone(cloneURL, localPath, cloneOptions);                  

  Rejected promise returned by test. Reason:

  ReferenceError {
    message: 'nodegit_1 is not defined',
  }

  Cli.seed (src/lib/create.ts:36:18)
  ava_1.test (src/tests/create.spec.ts:13:24)

What i'm missing here any prompt help will be appriciated

use `--rootDir` in config files

  • I'm submitting a ...
    [X] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary
    This is rather a suggestion to prevent future bugs, whenever --outDir is used, I would recommend setting --rootDir, see https://github.com/Microsoft/TypeScript/wiki/FAQ#why-does---outdir-moves-output-after-adding-a-new-file for more details.

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

Node.js application - simple server example

  • I'm submitting a ...
    [ ] bug report
    [X] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary

Thanks for the tool! Great work!

If I choose Node.js application type during installation I have a library example in src folder.

What do you think about generate simple web server as example in src if user select Node.js application type?

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

Add a monorepo option?

Reddit said you wanted feedback, so here goes: A lot of this looks great, and I would probably use it, but I need multi-repo support (probably using lerna).

Integration with Intern?

  • I'm submitting a ...
    [ ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [x] question about how to use this project

  • Summary
    I am not able to integrate Intern with typescript-starter. What's the correct way to do it?

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

Can't see test results in Windows 10

  • I'm submitting a ...
    [X] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary

When running npm run watch, whenever my application compiles it briefly shows which of my tests errored, but then it detects some more file changes, recompiles and the errors are gone. I cannot see what went wrong in my tests, all that shows up are the type check errors, if any.

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

It is a Node app, not intended to run in the browser. Even with errors, this is all that the PowerShell shows after displaying errors for less than a second:

[20:29:48] File change detected. Starting incremental compilation...


[20:29:49] Compilation complete. Watching for file changes.

build-tests.js

  • I'm submitting a ...
    [ ] bug report
    [ ] feature request
    [x] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary

Thank you for sharing this! Do you mind explaining the rationale and need for build-tests.js

How to execute tests for internal methods?

  • I'm submitting a ...
    [ ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [x] question about how to use this project

  • Summary
    It is not clear how would I write and execute tests for methods and classes that are not exposed from the module?

Currently, you need to expose a function from a module to be able to run a test.

  • Other information (e.g. detailed explanation, stack traces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

Strict config breaks yarn watch

  • I'm submitting a ...
    [x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary
    With a fresh clone, I run yarn watch and all is well.
    However, changing the config to use .strict instead of .flexible means that running yarn watch fails, evidently in part due to missing declaration files for hash.js which makes me wonder if it's related to the upgrade issue #36, as well as an import algorithm not being used.

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

Error output (sorry for the weird symbols):

yarn watch v0.24.5
$ yarn build && yarn build:tests -- --no-browser && concurrently -r --kill-others 'npm run --silent build:main -- -w' 'npm run --silent build:tests -- -w --no-browser' 'sleepms 2000 && ava --watch' 
yarn build v0.24.5
$ trash build && yarn build:main && yarn build:module && yarn build:browser-deps && yarn build:browser && yarn build:browser-cjs && yarn build:resolve-sourcemaps 
yarn build:main v0.24.5
$ tsc -p tsconfig.json 

�[100;30m3�[0m import hash from 'hash.js'
�[100;30m �[0m �[91m                 ~~~~~~~~~�[0m

src/adapters/crypto.browser.ts(3,18): �[91merror�[0m TS7016: Could not find
a declaration file for module 'hash.js'.
 '/Users/heatherbooker/dev/garbage/typescript-starter/node_modules/hash.js/lib/hash.js'
 implicitly has an 'any' type.
  Try `npm install @types/hash.js` if it exists or add a new
declaration (.d.ts) file containing `declare module 'hash.js';`


�[100;30m10�[0m export function createHash (algorithm: 'sha256') {
�[100;30m  �[0m �[91m                            ~~~~~~~~~�[0m

src/adapters/crypto.browser.ts(10,29): �[91merror�[0m TS6133: 'algorithm'
is declared but never used.

Supporting `npm ci` in CI configs

  • I'm submitting a ...
    [x] feature request

  • Summary

Have you thought about supporting the new npm ci command in CI configs?

I actually haven't used it much myself, but I think this does the trick:

if [ -f package-lock.json ] && [ npm ci --help 2>&1 >/dev/null ] ; then npm ci ; else npm install ; fi

Coverage doesn't work with node <4.5

  • I'm submitting a ...
    [x ] bug report

The ava library being used is affected by the following bug which causes it to fail to run the coverage:
avajs/ava#1354
They're recommending that engines in package.json is changed to node>=4.5, would probably be a good idea to do the same here :)

Missing changelog command

  • I'm submitting a ...
    [x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary

There is no changelog command as is shown in the npm run info script and on the README.

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

I simply generated the project as instructed, and there is no changelog command to generate the changelog.

package.json name prop not set during interactive config

  • I'm submitting a ...
    [x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary
    The package.json name property is not set to the name entered during interactive config.

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

Can be recreated by starting a new project. The name prop typescript-starter spits out is always "typescript-starter". I would expect it to be the name I use during config, or possibly a slugified version of that name.

Not sure if this intentional, but it seems odd.

"Cannot find module 'path'" when running npm run watch

  • I'm submitting a ...
    [X] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary

I have just created a typescript-starter project in my local machine (a Node application), but as soon as I try running npm run watch, I get a crash. node_modules/pkg-conf/index.js:1 crashes with "Error: Cannot find module 'path'".

  • Other information

I'm using Windows 10 x64 and Node 8.9.1. The latest crash I got was with these options, although I've got it using several other configurations as well:

Enter the new package name: test
What are you making? Node.js application
Enter the package description: Test
Will this project use npm or yarn? npm
More fun stuff: Enable tslint-immutable, Include VS Code debugging config, Include CircleCI config

The installation seems to end without errors, but as soon as I run npm run watch, I get the following:

[17:48:05] Starting compilation in watch mode...

[17:48:06] Found 0 errors. Watching for file changes.

C:\Users\David\test\node_modules\pkg-conf\index.js:1
Error: Cannot find module 'path'
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\David\test\node_modules\pkg-conf\index.js:2:14)
    at Module._compile (module.js:635:30)
    at Module.replacementCompile (C:\Users\David\test\node_modules\nyc\node_modules\append-transform\index.js:58:13)
    at module.exports (C:\Users\David\test\node_modules\nyc\node_modules\default-require-extensions\js.js:8:9)
    at C:\Users\David\test\node_modules\nyc\node_modules\append-transform\index.js:62:4
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:unit: `nyc --silent ava "--watch"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test:unit script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\David\AppData\Roaming\npm-cache\_logs\2018-07-08T16_48_07_024Z-debug.log
ERROR: "test:unit -- --watch" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] watch: `run-s clean build:main && run-p "build:main -- -w" "test:unit -- --watch"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] watch script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\David\AppData\Roaming\npm-cache\_logs\2018-07-08T16_48_07_122Z-debug.log

I'm also uploading the two log files from the crashes in case they're helpful.

2018-07-08T16_48_07_024Z-debug.log
2018-07-08T16_48_07_122Z-debug.log

Browser build & testing

Need to add an example of the library using functionality of a built-in Node.js module, while also providing a browser fallback.

Probably a sha256 method which just accepts a string and returns it's sha256 digest. In Node.js, it should use the (fast, native) built-in hash function. In the browser, it should fall back to hash.js.

The browser build can also replace the module build (for now), since ES6 modules are (currently) only able to be used by browser build systems. When a version of Node.js supports ES6 modules, we'll add the module build back.

The browser build should be tested with karma-ava or something similar. (Bonus: both builds will be fully-tested, so the language here can be revised.)

yarn watch not working on windows 10

  • I'm submitting a ...
    [x ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary
    running yarn watch on windows 10 will produce this output

yarn watch v0.20.3
$ trash build && multiview [yarn watch:build] [yarn watch:unit]
module.js:472
    throw err;
    ^

Error: Cannot find module './build/Debug/buffertools.node'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (~~my repo~~\node_modules\buffertools\buffertools.js:26:20)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
error Command failed with exit code 1.

this is because multiview use buffertools which not support simple instalation on windows ( you need a C++ compiler & python 2.7 for that).

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

yarn test issue on win 10

  • I'm submitting a ...
    [ x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary
    Trying to following initial setup here.
    yarn install - works great.
    yarn watch - gets stuck towards the end on what sort of looks like bad argument passing (see attached stacktrace)

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

$ yarn watch
yarn watch v0.21.3
$ yarn build && yarn build:tests -- --no-browser && concurrently -r --kill-others 'npm run --silent build:main -- -w' 'npm run --silent build:tests -- -w --no-browser' 'sleepms 2000 && ava --watch'
yarn build v0.21.3
$ trash build && yarn build:main && yarn build:module && yarn build:browser-deps && yarn build:browser && yarn build:browser-cjs && yarn build:resolve-sourcemaps
yarn build:main v0.21.3
$ tsc -p tsconfig.json
Done in 1.22s.
yarn build:module v0.21.3
$ tsc -p config/exports/tsconfig.module.json
Done in 1.29s.
yarn build:browser-deps v0.21.3
$ mkdirp build/temp && browserify node_modules/hash.js/lib/hash.js --standalone hash -o build/temp/hash.js
Done in 0.66s.
yarn build:browser v0.21.3
$ rollup -c config/exports/rollup.config.js -f es -o build/browser/index.js
Done in 0.68s.
yarn build:browser-cjs v0.21.3
$ rollup -c config/exports/rollup.config.js -f cjs -o build/browser/index.cjs.js
Done in 0.67s.
yarn build:resolve-sourcemaps v0.21.3
$ sorcery -i build/browser/index.js && sorcery -i build/browser/index.cjs.js
Done in 0.53s.
Done in 7.07s.
yarn build:tests v0.21.3
$ trash test && node config/exports/build-tests.js --no-browser
Done in 0.73s.
'np' is not recognized as an internal or external command,
operable program or batch file.
'run' is not recognized as an internal or external command,
operable program or batch file.
'-w'' is not recognized as an internal or external command,
operable program or batch file.
'np' is not recognized as an internal or external command,
operable program or batch file.
'run' is not recognized as an internal or external command,
operable program or batch file.
'--silent' is not recognized as an internal or external command,
operable program or batch file.
The filename, directory name, or volume label syntax is incorrect.
'-w' is not recognized as an internal or external command,
operable program or batch file.
'--no-browser'' is not recognized as an internal or external command,
operable program or batch file.
'sleepm' is not recognized as an internal or external command,
operable program or batch file.
'2000' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.

An in-range update of hash.js is breaking the build 🚨

Version 1.1.0 of hash.js just got published.

Branch Build failing 🚨
Dependency hash.js
Current Version 1.0.3
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As hash.js is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

yarn clean breaks tslint

  • I'm submitting a ...
    [x] bug report

  • Summary
    Do the following:

  1. yarn install
  2. yarn test
  3. yarn clean
  4. 💥 yarn test

The yarn clean command is deleting files that tslint needs to work correctly. See the output below:

$ yarn test
yarn test v0.23.3
$ yarn lint && yarn unit && yarn check-coverage
yarn lint v0.23.3
$ tslint src/**/*.ts
module.js:472
    throw err;
    ^
Error: Cannot find module './test/parse'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/dgregoire/tmp/typescript-starter/node_modules/tslint/lib/test.js:28:13)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
error Command failed with exit code 1.
error Command failed with exit code 1.

This is due to known issues with how yarn clean works.

  • Other information

If I add a .yarnclean file up front that has these contents:

!node_modules/tslint/

Then running yarn clean does not delete the needed files and everything appears to work as expected.

Require on Node.js

  • I'm submitting a ...
    [ ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [x] question about how to use this project

  • Summary
    Hi there,
    I'm using the generated build within Node.js application.
    I've a typescript file (in src/lib) that exports a default class and several interfaces.
    When trying to require the CommonJS file, I have to do that:

const lib = require('my-lib').default;

How to handle javascript module and CommonJS ?

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)
    microsoft/TypeScript#2719

An in-range update of browserify is breaking the build 🚨

Version 14.3.0 of browserify just got published.

Branch Build failing 🚨
Dependency browserify
Current Version 14.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As browserify is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
Commits

The new version differs by 4 commits .

  • cd01926 14.3.0
  • 08caf04 changelog
  • ad5060d Merge pull request #1710 from substack/https-browserify-1
  • 7c7b4d4 update https-browserify to ^1.0.0

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

cannot find module "build/main/index.js"

  • I'm submitting a ...
    [ ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

"npx typescript-starter" doesn't work.

  • I'm submitting a ...
    [ ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [x] question about how to use this project

  • Summary

when i run `npx typescript-starter':

D:\Projects>npx typescript-starter qizh-core
npx: installed 1 in 2.248s
The "path" argument must be of type string
npx: installed 351 in 37.594s
null

and then it opens a cli.js in my editor

[main 12:32:44] update#setState idle
[main 12:33:14] update#setState checking for updates
[main 12:33:14] update#setState idle

after i closed the file, the command just finished with nothing.

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)
    _20180312123608

enhancements ideas?

@bitjson

I've started a few projects based on this structure -- but I've gone what I would call 'more full on' with the class structure, using express, etc. etc.

Would you be interested on collaborating on updating the template with latest typescript, tools, etc. and maybe another repo extended with express js?

Or would you prefer me to fork and go?

thanks for the great work - it was a tremendous help.

Chad

Explain purpose for separate builds in readme

I am a newbie switching from ES6 - babel - flow type - config to typescript. The project has been really helpful in wiring all the basic things.
I was wondering what is the use of typescript.module.json?

With the current config, I get a main folder and a module folder in my build folder. Which have almost the same generated code. The only difference being main folder also has an interface file. filename.d.ts

Thanks for the help.

Task to deploy documentation to GitHub pages

It'd be great if there was a clean and mostly-automatic option for deploying the TypeDoc generated documentation to GitHub pages. Also should link to the example documentation from README.md.

An in-range update of typescript is breaking the build 🚨

Version 2.3.1 of typescript just got published.

Branch Build failing 🚨
Dependency typescript
Current Version 2.3.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As typescript is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details - ❌ **continuous-integration/travis-ci/push** The Travis CI build failed [Details](https://travis-ci.org/bitjson/typescript-starter/builds/226523961)

Release Notes TypeScript 2.3

For release notes, check out the release announcement

For new features, check out the What's new in TypeScript 2.3.

For breaking changes, check out the Breaking changes in TypeScript 2.3 page.

For the complete list of fixed issues, check out the issues fixed in TypeScript 2.3 RC and after TypeScript 2.3 RC.

Download:

Special thanks to all contributors to this release:

  • Akinmade Bond
  • Anders Hejlsberg
  • Andy Hanson
  • Argelius Andreas
  • @arjunyel
  • Artem Roshko
  • Arthur Ozga
  • Bill Ticehurst
  • Christian Silver
  • Christophe Vidal
  • @cedvdb
  • Daniel Lehenbauer
  • Daniel Rosenwasser
  • Diullei Gomes
  • @e-cloud
  • Erik McClenney
  • @falsandtru
  • Hendrik Liebau
  • Herrington Darkholme
  • Igor Novozhilov
  • James Henry
  • Jason Jarrett
  • Jason Ramsay
  • Josh Goldberg
  • K. Preißer
  • Kagami Sascha Rosylight
  • Kanchalai Tanglertsampan
  • Klaus Meinhardt
  • Logan Mzz
  • Magnus Hiie
  • Matt Bierner
  • Matt McCutchen
  • Mike Busyrev
  • Mine Starks
  • Mohamed Hegazy
  • Natalie Coley
  • Nathan Shively-Sanders
  • Nico Kemnitz
  • Nicolas Henry
  • Oleg Mihailik
  • Ron Buckton
  • Ryan Cavanaugh
  • Soo Jae Hwang
  • Tuure Savuoja
  • Vadi Taslim
  • Vincent Bel
  • Vladimir Matveev
  • Zhengbo Li
Commits

The new version differs by 346 commits0.

  • 47e5569 Update LKG
  • 9ada915 Merge pull request #15381 from Microsoft/revert15104
  • fe0a307 Revert "Treat callback parameters as strictly covariant"
  • 96a3c91 Revert "Fix callback types to match covariantly"
  • 70bb2d3 Revert "Accept new baselines"
  • 3abd0c8 Revert "Add tests"
  • 42d6a9c Revert "Check callback return values bi-variantly"
  • d581bed Revert "Accept new baselines"
  • cf17be2 Revert "Add another test case"
  • e86512e Revert "Allow callbacks unioned with null and/or undefined"
  • 22647bb Revert "Update tests"
  • 8a85f4a Update LKG
  • 3c3b73e Merge branch 'master' into release-2.3
  • a0abadb Merge pull request #15320 from Microsoft/fixTypePredicateThisParameter
  • 5783435 Merge pull request #15330 from gcnew/exportConsts

There are 250 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

CircleCI testing on multiple node versions?

  • I'm submitting a ...
    [x] feature request

  • Summary

Is there an option for testing on multiple node versions in CircleCI? Do I add a few calls to nvm into the .circleci/config.yml? I'm coming from Travis where you list one or two node versions in an array and it runs on both in parallel.

EDIT: also, an AppVeyor option would be great for when CI needs to run on Windows. (for example, to catch stuff like the outstanding Windows bug I mentioned in #67)
EDIT2: ...and travis, in case you need free Mac testing.

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml
  • The new Node.js version is in-range for the engines in 1 of your package.json files, so that was left alone

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Lodash fp causes issues with watch process

  • I'm submitting a ...
    [X ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary
    Using the map or reduce functions from lodash/fp leads to a strange behavior in the watch process, where the results of the tests will flash up briefly, and then the screen is immediately cleared. Normally is stays up until a new watch is triggered, which is necessary for review and debugging.

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

I've been building a library initialized via this project. Things were going well until I attempted to use lodash/fp. Using the map or reduce functions from that library leads to the screen clearing immediately as soon as tests finish when in watch mode (npm run watch). Can be recreated fairly easily by me by installing lodash + typings, then invoking a function like this from a test:

import { map } from 'lodash/fp';

export const mapFn = (): Array<number> => {
  const mapper = map((): number => {
    return 1;
  });

  return mapper(['a', 'b']);  
};

test like:

import { mapFn } from './utils';

test('foo', t => {
  const mapped = mapFn();
  console.log(mapped);
  t.pass();
});

The normal (non-fp) map and reduce do not cause this behavior.

use with deployable web app

  • I'm submitting a ...
    [ x ] question about how to use this project

  • Summary

Starter looks great for distributing a module. Can you make suggestions on using the starter for a deployable web app rather than for a module?

For example, my web app project has:

src/
- server (an express app)
- client (client-side browser app)
- common (modules common to the server and client apps)

Import ava

  • I'm submitting a ...
    [x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary
    I get this build error:

src/lib/number.spec.ts:2:10 - error TS2305: Module '".../node_modules/ava/index"' has no exported member 'test'.

2 import { test } from 'ava';
           ~~~~

The ava module code suggests that test should be imported like this: import test from 'ava';

Why not use `ts-node` to run tests?

  • I'm submitting a ...
    [ x ] question about the decisions made in the repository
    [ x ] question about how to use this project

  • Summary

Awesome and thank you for putting this project together.

Why not use ts-node to run tests (im doing this with mocha and understand ava is quite different) pros/con for tsc first vs using ts-node?

I have an express app that serves up the static files for the client side app. Suggestions on using your starter on both the browser apps and on the nodejs apps?

Use a semi-script-runner to remove yarn dependency from package.json

Currently you have stuff like "unit": "yarn build && nyc ava" in the package.json, which prevents people from running with npm only. Changing it to npm run build would just result in the exact same problem. There are however, multiple libraries made to solve this. I don't remember most of them, because I wrote my own a few months or so ago which you can find here: https://github.com/YoloDev/simple-scripts

However, being written by me, that one is horribly undocumented (see package.json for usage), the point is you can create scripts that run a list of other scripts in sequence like a really simple task runner. I would probably go find one of the other ones, but by all means if you like mine you are free to use it.

UMD Support

  • I'm submitting a ...
    [ ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ X] question about how to use this project

  • Summary
    Can we generate UMD code using this project?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.