-
Notifications
You must be signed in to change notification settings - Fork 2.8k
start-dev launch option (ts-node-dev) #234
base: master
Are you sure you want to change the base?
Conversation
Update references from bowdenk7 repo to Microsoft repo
added package-lock for npm5 and fixed bug with flash messages
Added `build` `preLaunchTask` for debug configuration
Removed duplication in npm scripts `serve` and `watch`
…MaxOptions'. fix err TypeScript-Node-Starter/src/controllers/api.ts[6, 9]: missing whitespace, 8 files fix bugs of issue 15
fit bugs of issue 15 and some other bugs caused by tslint
port changes from PR microsoft#11 and update package.lock from latest npm version
fix: copying issues
…lash-types Simplify augmented module for express-flash
…-nodejs-versions Specify NodeJS version as strings in Travis configuration
📝 remove reference to legacy file. Closes microsoft#190
This commit rewrites linting support in the project to be based solely on the ESLint as advised by the TSLint tool authors: https://medium.com/palantir/tslint-in-2019-1a144c2317a9 The migration is based on default, recommended settings for TypeScript in ESLint and is expected to be updated in future to better fit project goals. All references has been updated and replaced with relevant ESLint context: - dependencies migration from TSLint to ESLint - VSCode configuration changes to support ESLint exension - VSCode extensions recommendation changes - `.eslintrc` and `.eslintignore` configuration files added - all error level problems in the source files are covered by this migration Thanks!
✨ Migrate TSLint to ESLint. Closes microsoft#209
fix lint error ``` PS> npm run lint > [email protected] lint C:\Users\JipingWang\source\repos\api > tsc --noEmit && eslint '*/**/*.{js,ts}' --quiet --fix Oops! Something went wrong! :( ESLint: 5.16.0. No files matching the pattern "'*/**/*.{js,ts}'" were found. Please check for typing mistakes in the pattern. npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! [email protected] lint: `tsc --noEmit && eslint '*/**/*.{js,ts}' --quiet --fix` npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the [email protected] lint 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\JipingWang\AppData\Roaming\npm-cache\_logs\2019-07-18T15_26_05_580Z-debug.log ```
fix lint error
Fix lint warnings
Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.4.0 to 1.4.2. - [Release notes](https://github.com/mysticatea/eslint-utils/releases) - [Commits](mysticatea/eslint-utils@v1.4.0...v1.4.2) Signed-off-by: dependabot[bot] <[email protected]>
…rn/eslint-utils-1.4.2 Bump eslint-utils from 1.4.0 to 1.4.2
Use update indexes access in Mongoose configuration. Fixes microsoft#225
- upgrade to latest packages - cast `req.user` as `UserDocument` - update logger to use latest Winston syntax - disable `no-inferrable-types`, Mongoose use unified topology Thx to @CarlosSolrac
5a58703
to
2299dc1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If accepted, it would require solution for serving static assets from public directory. At the moment, content usually pre-built like css (from scss) could not be used when started in that mode.
For example such minimal change does the trick, but is just a pointer on how to achieve this, could be better one:
- add
cross-env
as dev dependency
"start-dev": "cross-env NODE_ENV=development dotenv -- nodemon -e ts -x ts-node --files src/server.ts"
app.ts
:
const staticAssetsRoot = (process.env.NODE_ENV === "development") ?
path.join(__dirname, "../dist") :
__dirname;
app.use(
express.static(path.join(staticAssetsRoot, "public"), { maxAge: 31557600000 })
);
2299dc1
to
9746234
Compare
@peterblazejewicz perhaps, |
Nevermind, found a much better option, one sec |
@@ -10,7 +10,7 @@ | |||
"license": "MIT", | |||
"scripts": { | |||
"start": "npm run serve", | |||
"start-dev": "dotenv -- nodemon -e ts -x ts-node --files src/server.ts", | |||
"start-dev": "dotenv -- ts-node-dev --watch views src/server.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
takes a few seconds to reload after changes, unlike nodemon;
--watch views
will also trigger reload on any change in views folder (still need to refresh the page to see them)
unfortunatelly, couldn't make it trigger refresh on scss changes in public folder (--watch public,views
), works when putting scss in views folder though.
Are there any other adjustments needs to be made? |
why this is not merged ? this is a must have when you are working on a project |
fbc1328
to
1e15e8b
Compare
allows to work on project without re-building each time