generator-gulp-angular
generator-gulp-angular copied to clipboard
Documentation (How it Works) not clear when choosing Typescript
Current text in documentation:
tsd:install is located in the gulp/tsd.js which is created only when choosing TypeScript. It will automatically download typings files for the dependency found in Bower with a popular library TSD
But there is no gulp/tsd.js file. And when running gulp serve, I was getting the error:
ERROR in ./src/app/index.module.ts
Module build failed: Error: ENOENT: no such file or directory, open '/Users/oliviermungo/Projects/WebApps/weddy4_typescript/weddy4/.tmp/typings/tsd.d.ts'
at Error (native)
So, I installed tsd:
sudo npm install -g tsd
and ran:
tsd install
Which downloaded the requested files in the ./tmp/typings folder. After that, I could gulp serve succesffully.
Great work, great generator, BTW.
Olivier Mungo
I have the same problem. Seems like the installation of the typescript definition files only works when tsd is installed globally. Maybe one have to change the install command in the generator.
if (this.props.jsPreprocessor.key === 'typescript') {
this.spawnCommandSync('tsd', ['install', '-so']);
}
Maybe it is better to use tsd from the node_modules/.bin
folder in the generated app.
I ran into the same thing, glad to have found this issue.
Yep, it's an oudated part of the documentation.
We extract recently tsd from the generator to use it as an external tool.
@Swiip should I update the docs or are we solving the tsd
issue as @4kochi described?
Like gulp and bower, tsd as now to be installed in global. It's what I seen in the TS community. I prefere to document that instead of trying some magic workaround.
@Swiip If that's the decision, should the documentation be updated? This caught me off guard as well.
Are the locations it needs to be updated shown in a search for npm install -g?