小编Osc*_*car的帖子

为什么有些npm包以@开头?

开头的依赖项有什么不同@吗?

这是意味着还是暗示某些东西?我没有看到任何关于此的信息.看看我的node_modules文件夹: 文件夹视图

Fortawesome@并且不包含典型fortawesome.css文件开头.那是一样的吗?或者是否@表明了什么?

这是我的package.json:

{
  "name": "ng-frontend",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build --prod",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^5.2.0",
    "@angular/common": "^5.2.0",
    "@angular/compiler": "^5.2.0",
    "@angular/core": "^5.2.0",
    "@angular/forms": "^5.2.0",
    "@angular/http": "^5.2.0",
    "@angular/platform-browser": "^5.2.0",
    "@angular/platform-browser-dynamic": "^5.2.0",
    "@angular/router": "^5.2.0",
    "@fortawesome/fontawesome": "^1.1.4",
    "animate.css": "^3.6.1",
    "bootstrap": "^4.0.0",
    "core-js": "^2.4.1",
    "jasny-bootstrap": "^3.1.3",
    "jquery": "^3.3.1",
    "popper.js": …
Run Code Online (Sandbox Code Playgroud)

javascript node.js npm

34
推荐指数
3
解决办法
3350
查看次数

webpack与nodejs一起使用

我是reactjs的新手.我刚开始学习reactjs.我在nodejs中使用webpack时遇到问题.我想创建将运行webpack文件的节点服务器.我有webpack文件:

const {resolve} = require('path');
const webpack = require('webpack');
const validate = require('webpack-validator');
const {getIfUtils, removeEmpty} = require('webpack-config-utils');

module.exports = env => {
  const {ifProd, ifNotProd} = getIfUtils(env)

  return validate({
    entry: './index.js',
    context: __dirname,
    output: {
      path: resolve(__dirname, './build'),
      filename: 'bundle.js',
      publicPath: '/build/',
      pathinfo: ifNotProd(),
    },
    devtool: ifProd('source-map', 'eval'),
    devServer: {
      port: 8080,
      historyApiFallback: true
    },
    module: {
      loaders: [
        {test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader'},
        {test: /\.css$/, loader: 'style-loader!css-loader'},
        {test: /(\.eot|\.woff2|\.woff|\.ttf|\.svg)/, loader: 'file-loader'},
      ],
    },
    plugins: removeEmpty([
      ifProd(new webpack.optimize.DedupePlugin()), …
Run Code Online (Sandbox Code Playgroud)

node.js reactjs webpack

4
推荐指数
2
解决办法
1554
查看次数

Angular 编译很慢

我在Symfony-PHP 中有一个API,我用邮递员对其进行了测试,它的工作原理非常棒。但是当我这样做时,应用程序开始构建并且消息需要一分钟多的时间。当我需要对某个组件(例如字母)进行更改时,它会重新编译整个项目,并且对于这么小的更改花费的时间太长。ng serve --aot --optimizationcompiled successfully.html

--watch参数设置为true默认情况下,这是确定的。不知道有没有人知道为什么这个编译这么慢。

版本:

Angular CLI: 6.2.2
Node: 8.12.0
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.8.2
@angular-devkit/core         0.8.2
@angular-devkit/schematics   0.8.2
@schematics/angular          0.8.2
@schematics/update           0.8.2
rxjs                         6.2.2
typescript                   2.9.2


oscar@ubuntu:~$: ng s --aot --optimization


****************************************************************************************
This is a simple server for use in testing or debugging Angular applications locally.
It hasn't been reviewed for security issues.

DON'T USE IT FOR PRODUCTION! …
Run Code Online (Sandbox Code Playgroud)

node.js angular-cli angular

3
推荐指数
1
解决办法
9010
查看次数

如何在PHP中结束字符串?

Substr PHP

string喜欢这个http://domain.sf/app_local.php/foo/bar/33.最后的字符是id元素.他的长度不止一个,所以我不能用:

substr($dynamicstring, -1);
Run Code Online (Sandbox Code Playgroud)

在这种情况下必须

substr($dynamicstring, -2);
Run Code Online (Sandbox Code Playgroud)

如何在"/ bar /"之后获取caracters string而不取决于长度?

php substring

1
推荐指数
1
解决办法
143
查看次数

标签 统计

node.js ×3

angular ×1

angular-cli ×1

javascript ×1

npm ×1

php ×1

reactjs ×1

substring ×1

webpack ×1