package.json

Faulty auto import with path alias

◇◆丶佛笑我妖孽 提交于 2021-01-27 07:19:52
问题 I'm having strange issue when auto importing services/components from folder provided with path alias within Angular 9 application. Those are my aliases defined in tsconfig.json "paths": { "@core/*": ["app/core/*"], "@shared/*": ["app/shared/*"], "@state/*": ["app/state/*"] } Then in Core folder I'm reexporting all services in index file ( app/core/index.ts ) export * from './sse/sse.service'; export * from './rack/rack.service'; Now when I'm injecting the service in a constructor the

vscode package.json String does not match the pattern

只谈情不闲聊 提交于 2021-01-21 06:34:41
问题 I am trying out VSCode on an existing project that uses npm and has a package.json file with a corresponding "name:" key that reads "SpecPro-File-Management-UI". VSCode is objecting to this line with "String does not match the pattern ...", apparently because of the upper-case characters in the name. This problem is described in a VSCode issue which is closed. Which leaves me with advice to setup a custom schema for my package.json file. This is pretty unfriendly, and a barrier to adopting

vscode package.json String does not match the pattern

一笑奈何 提交于 2021-01-21 06:34:24
问题 I am trying out VSCode on an existing project that uses npm and has a package.json file with a corresponding "name:" key that reads "SpecPro-File-Management-UI". VSCode is objecting to this line with "String does not match the pattern ...", apparently because of the upper-case characters in the name. This problem is described in a VSCode issue which is closed. Which leaves me with advice to setup a custom schema for my package.json file. This is pretty unfriendly, and a barrier to adopting

Passing date to package.json script

不问归期 提交于 2021-01-04 08:47:36
问题 I have a deployment script I'm trying to set. I'm trying to set an environmental variable called DEPLOY_DATE equal to now. "scripts": { "deploy": "kubectl set env deploy/api DEPLOY_DATE=\"$(date)\"" } The problem is this just sets DEPLOY_DATE equal to $(date) instead of the actual date. Is there anyway package.json script can actually evaluate the date variable, or any variable? 回答1: I think it's correctly set, try the following to verify: "deploy": "kubectl set env deploy/api DEPLOY_DATE=\"$

Passing date to package.json script

杀马特。学长 韩版系。学妹 提交于 2021-01-04 08:45:26
问题 I have a deployment script I'm trying to set. I'm trying to set an environmental variable called DEPLOY_DATE equal to now. "scripts": { "deploy": "kubectl set env deploy/api DEPLOY_DATE=\"$(date)\"" } The problem is this just sets DEPLOY_DATE equal to $(date) instead of the actual date. Is there anyway package.json script can actually evaluate the date variable, or any variable? 回答1: I think it's correctly set, try the following to verify: "deploy": "kubectl set env deploy/api DEPLOY_DATE=\"$

npm install if package.json was modified

做~自己de王妃 提交于 2020-12-24 04:07:50
问题 TL;DR: Is there a way to have npm install run automatically before running any npm script if your package.json has been modified? Problem Scenario You pull or checkout a branch that updated package.json . You run npm run my-script . my-script depends on a package that has newly been added to package.json . my-script fails. You wonder why. Before flipping over your desk you run npm install just to be sure. my-script runs successfully. You don't need a new desk. I know that build / task runner

npm install if package.json was modified

喜你入骨 提交于 2020-12-24 04:05:45
问题 TL;DR: Is there a way to have npm install run automatically before running any npm script if your package.json has been modified? Problem Scenario You pull or checkout a branch that updated package.json . You run npm run my-script . my-script depends on a package that has newly been added to package.json . my-script fails. You wonder why. Before flipping over your desk you run npm install just to be sure. my-script runs successfully. You don't need a new desk. I know that build / task runner