- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用具有多个环境的 Angular 项目。每当为单个环境进行构建需要很长时间时。我怎样才能减少它。我在这里添加了我的项目配置。
包.json:
{
"name": "test",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "node --max_old_space_size=10240 ./node_modules/@angular/cli/bin/ng serve --aot",
"build": "rimraf dist && node --max_old_space_size=10240 ./node_modules/@angular/cli/bin/ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"build:universal": "npm run build:client-and-server-bundles && npm run webpack:server",
"serve:universal": "node dist/server.js",
"build:client-and-server-bundles": "ng build --prod && ng build --prod --app 1 --output-hashing=false",
"webpack:server": "webpack --config webpack.server.config.js --progress --colors",
"postbuild": "node zipbuild"
},
"private": true,
"dependencies": {
"@angular-devkit/core": "7.3.3",
"@angular/animations": "7.2.6",
"@angular/cdk": "^7.3.3",
"@angular/cli": "7.3.3",
"@angular/common": "7.2.6",
"@angular/compiler": "7.2.6",
"@angular/core": "7.2.6",
"@angular/flex-layout": "7.0.0-beta.23",
"@angular/forms": "7.2.6",
"@angular/http": "7.2.6",
"@angular/material": "^7.3.3",
"@angular/platform-browser": "7.2.6",
"@angular/platform-browser-dynamic": "7.2.6",
"@angular/platform-server": "7.2.6",
"@angular/router": "7.2.6",
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.13.3",
"@angular/compiler-cli": "7.2.6",
"@angular/language-service": "7.2.6",
"@types/jasmine": "~3.3.9",
"@types/jasminewd2": "~2.0.6",
"@types/node": "^11.9.5",
"codelyzer": "^4.5.0",
"css-loader": "2.1.0",
"jasmine-core": "^3.3.0",
"jasmine-spec-reporter": "^4.2.1",
"karma": "~4.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^2.0.5",
"karma-jasmine": "^2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "^5.4.2",
"ts-node": "^8.0.2",
"tslint": "^5.13.0",
"typescript": "3.2.4"
}
}
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"test": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets",
"src/favicon.ico",
"src/web.config"
],
"styles": [
"src/styles.scss"
],
"scripts": [
"src/assets/SigWebTablet.js"
]
},
"configurations": {
"demo": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"outputPath": "dist/demo",
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.demo.ts"
}
]
},
"demo1": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"outputPath": "dist/demo",
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.demo.ts"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "test:build"
},
"configurations": {
"production": {
"browserTarget": "test:build:production"
},
"sacramento": {
"browserTarget": "test:build:sacramento"
},
"denver": {
"browserTarget": "test:build:denver"
},
"orange": {
"browserTarget": "test:build:orange"
},
"slo": {
"browserTarget": "test:build:slo"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "atims-prebook:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [],
"styles": [
"src/styles.scss"
],
"assets": [
"src/assets",
"src/favicon.ico"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"server": {
"builder": "@angular-devkit/build-angular:server",
"options": {
"outputPath": "dist/server",
"main": "main.server.ts",
"tsConfig": "tsconfig.server.json"
}
}
}
},
"test-e2e": {
"root": "",
"sourceRoot": "e2e",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "test:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "test",
"schematics": {
"@schematics/angular:class": {
"spec": false
},
"@schematics/angular:component": {
"spec": false,
"prefix": "pbpc",
"styleext": "scss"
},
"@schematics/angular:directive": {
"spec": false,
"prefix": "pbpc"
},
"@schematics/angular:guard": {
"spec": false
},
"@schematics/angular:module": {
"spec": false
},
"@schematics/angular:pipe": {
"spec": false
},
"@schematics/angular:service": {
"spec": false
}
}
}
最佳答案
您可以一起执行命令,如下所示:
npm run build -- --c demo && npm run build -- --c demo1
{
"name": "myApp",
"version": "0.0.0",
"engines": {
"node": "10.13.0",
"npm": "6.4.1"
},
"scripts": {
"test": "jest src/app",
"test:watch": "jest src/app --watch",
"lint": "tslint -c tslint.json 'src/app/**/*.ts' --project src/tsconfig.json",
"appStart": "npm run build -- --c demo && npm run build -- --c demo1" // This line
},
}
npm run appStart
A; B # Run A and then B, regardless of success of A
A && B # Run B if and only if A succeeded
A || B # Run B if and only if A failed
A & # Run A in background.
关于angular - npm 在多个环境上运行构建,没有提及指定的环境,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55001656/
我最近一直在尝试用 python 开发一个 discord 机器人。我这样做是为了如果一条消息包含某个数字,它会使用react并发送一条消息。这是 cog 文件中的代码: import discord
我有一个用于 channel 存档和组织的机器人。当有人提到 channel 时,我试图让它执行一些代码,以便将消息移动到它所属的 channel ,但我无法让它响应 channel 提及。 我以为会
如何在UILabel中检测链接/提及/标签并使其可单击。另外,是否有我可以利用的开源库(我已经看过了不处理多行tex的Fancy UILabel,不处理提及/标签的TTAttributedLabel)
来自推文的示例数据: 我总是在 #kampus 上见到 @gEmbul,我们总是打开该网站 https://www.youtube.com/ facebook# :) @007 日期是字符串,我想匹配
我一直在尝试制作一个发送命令,该命令可以将消息的作者发送给一个提到的用户,或者发送两个提到的用户。我可以在消息中获得第一次提及,但我不知道如何在消息中获得第二次甚至第三次提及。我尝试使用: messa
编辑 : 我自己找到了解决办法,谢谢大家看到这个帖子!解决办法是: /// SIMPLY ADD || message.member const taggedUser = message.mentio
这个问题已经有答案了: Fast punctuation removal with pandas (4 个回答) 已关闭 4 年前。 我想编写一个定义,它接受一个字符串(一条推文)并创建一个 2 列数
我正在设计一个应用程序,用户可以使用该应用程序从多个帐户发送多条推文(提及),并且正在使用 Twitter4j 进行同样的操作。对此,我有几个问题: 身份验证:应用程序有一个身份验证部分。我能够使用基
我有一个数据集,其中包含来自 Twitter 的推文。其中一些还包含用户提及,例如 @thisisauser。我尝试在执行其他清理过程的同时删除该文本。 def clean_text(row, opt
假设我们有 3 个表:tweet、users、tweet_mentusers,其中 tweet.user_id = users.id 和 tweet.id = tweet_mentusers.twee
我目前正在使用以下代码,它获取推文,然后将其传递给处理的函数。但这不是实时的。 auth = tweepy.OAuthHandler(consumer_key, consumer_secret) au
我需要创建一个正则表达式模式来查找名为 Tweets 的类中的提及。在这种情况下,“@”后的有效字符为:(A-Z 或 a-z)、数字、下划线(“_”)或连字符(“-”)。与经典 Twitter 用户名
这是示例图片 --> 我正在尝试使文本输入功能与 Facebook 的非常相似。以 @ 开头的提及将生成我的 friend 姓名列表,然后选择一个将充当类似对象的角色。因此,删除突出显示的单词将删除
所以我只需要一些关于如何在 Discord.js 上做某事的帮助。 我对如何使用 message.mentions.channels 感到非常困惑,并且文档没有帮助。 我只需要一个 console.l
我提到我的 friend 使用 Koala,Ruby 和 Sinatra。我查看了文档,但一无所获。记住这一点,我不想给我的 friend 发信息,但我想和我一起提到他。我的代码: @graph =
我想使用 api 在 slack 中发布消息。我怎样才能像@channel in slack 一样提及一个 channel 的所有团队成员? 最佳答案 您可以使用 . Example 您可以在 Sl
我试过使用 gem twitter , grackle , 和 TweetStream但我不知道如何获得用户@mentions 的流。 我只是想不出如何将一段代码放在一起,表示“让用户提及所有内容”。
我正在用 Node.js 编写一个应用程序,它允许用户在 twitter 等消息中相互提及。我希望能够找到用户并向他们发送通知。为了做到这一点,我需要拉 @usernames 从 node.js 中的
我试图从传入的 webhook 中提及用户。 我通过 postman 尝试了几次迭代 { "text": "test @user" } 或者 { "text": "test @user@email.c
我曾经有一些运行良好的 python,可以在 Tweepy 流监听器上自动回复,但由于 8 月份 Twitter API 发生变化,它不再有效。 我正在重新构建它,每 10 秒获取一次我最近提到的内容
我是一名优秀的程序员,十分优秀!