Coder Social home page Coder Social logo

node-nuget's Introduction

nuget

Nuget library wrapper for Node.js.

This library uses Vinyl files for flexibility and Gulp compatibility.

Raw usage

nuget = require 'nuget'

nuget.pack 'package.nuspec', (err, nupkg_file) ->
  throw err if err

  nuget.push nupkg_file, (err) ->
    throw err if err

    console.log "Successfully pushed #{nupkg_file.path}"

Gulp usage

gulp = require 'gulp'
gutil = require 'gulp-util'
es = require 'event-stream'
nuget = require 'nuget'

nugetGulp = -> es.map (file, callback) ->
  nuget.pack file, (err, nupkg_file) ->
    return callback(err) if err
    nuget.push nupkg_file, (err) -> if err then gutil.log(err) else callback()

gulp.src('*.nuspec')
  .pipe(nugetGulp())

Configuring Nuget

Add the 'nuget.org' source to your Nuget config file

$ mono nuget.exe sources add -name "nuget.org" -source "https://www.nuget.org/api/v2/package"

Add the credentials for your source

$ mono nuget.exe setApiKey {YOUR_API_KEY} -source nuget.org

node-nuget's People

Contributors

kmalakoff avatar kvnloo avatar

Stargazers

 avatar

Watchers

 avatar  avatar

node-nuget's Issues

Glob pattern in nuspec files doesn't work

A nuspec file like:

<?xml version="1.0"?>
<package >
    <metadata>
        <id>MyPackg</id>
        <version>2.3.0</version>
        <title>MyPackg</title>
        <authors>Big Technologies</authors>
        <owners>Big Technologies</owners>
        <requireLicenseAcceptance>false</requireLicenseAcceptance>
        <summary>MyPackg - Retail</summary>
        <description>Retail front-end.</description>
        <releaseNotes></releaseNotes>
        <copyright>Copyright 2019</copyright>
        <tags>MyPackg</tags>
    </metadata>
    <files>
        <file src="c:\package\**\*.*" target="content" />
    </files>
</package>

produces an error:
"Nuget: cannot build c:\pkg.nuspec. Missing files: c:\package\**\*.*"

Travis CI for building NPM package.

As I mentioned in #2, I think we should use TravisCI for publishing this NPM package.

Here is an example .travis.yml configuration:

language: node_js
node_js:
- 0.8.0
before_deploy:
- npm run build
deploy:
  provider: npm
  email: <your_email>
  api_key:
    secure: <your_encrypted_api_key>
  on:
    tags: true
    repo: kmalakoff/node-nuget

I think that should work.

Use compatibility range for dependencies versions

This packge use * for all dependencies:

"dependencies": {
  "elementtree": "*",
  "event-stream": "*",
  "semver": "*",
  "shelljs": "*",
  "underscore": "*",
  "queue-async": "*",
  "vinyl-fs": "*"
}

This can break the package when a dependency make API changes. For example vinyl removed the .pipe() method from Vinyl objects, which this package use.

Please check your dependencies compatibility ranges and use them instead of *. The first step would be "vinyl-fs": "~2".

No transpiled version

How do I use this package? It's written in CoffeeScript and has no transpiled version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.