tsc --diagnostics --listFiles
Separate your common folder into a different project call
common, and make it into a node.js modules, instruction here:
Then in your original project, you do following:
npm link <folder path of common>
npm install <folder path of common> --save
Method 1 is easier to use as update to
common is automatically reflected in the main project and don't have to worry about updating.
Method 2 is good if you plan to later publish it as a standalone npm package. However update to
common will require manual update step in the main project.
common folder, make sure you create a
.npmignore file. Let say your
common project have following structure:
. ├── index.d.ts ├── index.js ├── lib/ <--- compiled location ├── node_modules ├── package.json ├── src/ ├── tsconfig.json ├── typings └── typings.json
.npmignore should look like following:
.DS_Store .git .gitignore examples node_modules npm-debug.log src tsconfig.json typings typings.json
You can check out my ng2-simple-mq as an example.