SORU
12 EKİM 2013, CUMARTESİ


Bower ve devDependencies vs bağımlılıkları

'Köşeli' ve 1.0.8, açısal bileşenleri, ancak orijinal bower ben yükledim.yükler olduğunu sonradan fark yo koştum json dosya alay açısal ve açısal-senaryo 'devDependencies ben yeniden 1.2.0-rc.her zaman' altında kaldı 2 bileşenleri-alay açısal ve senaryo açısal devDependencies yerine bağımlılıkları altında.

DevDependencies nasıl kullanıldığını ve eğer el ile sabitleme ya da olduğu gibi bırakın rahatsız gerekip gerekmediğini merak ediyorum. Bir taraftan dev bir bağımlılık gibi bir şey işaretlemek için nasıl bower CLİ belirtin var mı?

Sonra dosya düzenlemeleri:

{
    name: "Angular",
    version: "0.0.0",
    dependencies: {
        json3: "~3.2.4",
        jquery: "~1.9.1",
        bootstrap-sass: "~2.3.1",
        es5-shim: "~2.0.8",
        angular-mocks: "1.2.0-rc.2",
        angular-sanitize: "1.2.0-rc.2",
        angular-resource: "1.2.0-rc.2",
        angular-cookies: "1.2.0-rc.2",
        angular: "1.2.0-rc.2",
        angular-scenario: "1.2.0-rc.2"
    },
    devDependencies: { }
}

Önce Düzenlemeler:

{
    "name": "Angular",
    "version": "0.0.0",
    "dependencies": {
        "angular": "~1.0.7",
        "json3": "~3.2.4",
        "jquery": "~1.9.1",
        "bootstrap-sass": "~2.3.1",
        "es5-shim": "~2.0.8",
        "angular-resource": "~1.0.7",
        "angular-cookies": "~1.0.7",
        "angular-sanitize": "~1.0.7"
    },
    "devDependencies": {
        "angular-mocks": "~1.0.7",
        "angular-scenario": "~1.0.7"
    }
}

CEVAP
13 EKİM 2013, Pazar


devDependencies gelişim ile ilgili bir komut, örneğin, birim testi, ambalaj komut dosyaları, belge oluşturma, vb.

dependencies üretim kullanımı için gerekli olan ve dev için de gerekli kabul.

Senin gibi dependencies içinde devDependencies da dahil olmak üzere zararlı olmayacak; modül sadece daha fazla dosya (bayt) yükleyin alıcı daha fazla (gereksiz) kaynak sırasında paket. Sade Bir POV, bu ekstra bayt zararlı olabilir, sadece bakış açına göre değişir.

Biraz ışık tutmak için, bower help install modüller devDependencies altında listelenen bakıyor -p --production, örneğin) modül yükleme sırasında ihmal edilebilir:

bower install angular-latest --production

Bu bir şey geliştirme platformu dışında bir yükleme yapmak için önerilen yöntemdir.

Tam tersine, modülleri dependencies altında listelenen atlamak için bir yolu yoktur.


Gibibower@1.2.7(bower latest source) bower help verim:

Usage:

    bower <command> [<args>] [<options>]

Commands:

    cache                   Manage bower cache
    help                    Display help information about Bower
    home                    Opens a package homepage into your favorite browser
    info                    Info of a particular package
    init                    Interactively create a bower.json file
    install                 Install a package locally
    link                    Symlink a package folder
    list                    List local packages
    lookup                  Look up a package URL by name
    prune                   Removes local extraneous packages
    register                Register a package
    search                  Search for a package by name
    update                  Update a local package
    uninstall               Remove a local package

Options:

    -f, --force             Makes various commands more forceful
    -j, --json              Output consumable JSON
    -l, --log-level         What level of logs to report
    -o, --offline           Do not hit the network
    -q, --quiet             Only output important information
    -s, --silent            Do not output anything, besides errors
    -V, --verbose           Makes output more verbose
    --allow-root            Allows running commands as root

See 'bower help <command>' for more information on a specific command.

ve ayrıca, bower help install verim (latest source):

Usage:

    bower install [<options>]
    bower install <endpoint> [<endpoint> ..] [<options>]

Options:

    -F, --force-latest      Force latest version on conflict
    -h, --help              Show this help message
    -p, --production        Do not install project devDependencies
    -S, --save              Save installed packages into the project's bower.json dependencies
    -D, --save-dev          Save installed packages into the project's bower.json devDependencies

    Additionally all global options listed in 'bower help' are available

Description:

    Installs the project dependencies or a specific set of endpoints.
    Endpoints can have multiple forms:
    - <source>
    - <source>#<target>
    - <name>=<source>#<target>

    Where:
    - <source> is a package URL, physical location or registry name
    - <target> is a valid range, commit, branch, etc.
    - <name> is the name it should have locally.

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • International Secret Agents Concerts

    Internationa

    2 Aralık 2008
  • ipsy Makeup Tips

    ipsy Makeup

    19 ŞUBAT 2009
  • kylediablo

    kylediablo

    8 Ocak 2007