assembly-source

0.1.0 • Public • Published

assembly-source

Create or change .NET assembly attributes in C# and JScript source code.

npm status node Travis build status AppVeyor build status Dependency status

usage

const Assembly = require('assembly-source')
const fs = require('fs')
 
// Construct from source code
const assembly = Assembly(fs.readFileSync('./AssemblyInfo.cs'))
 
// Read attributes (strings, booleans and numbers)
console.log(assembly.get('AssemblyVersion'))
 
// Modify and add attributes
assembly.set('AssemblyVersion', '1.2.3')
assembly.set('ComVisible', true)
 
// Then save
fs.writeFileSync('./AssemblyInfo.cs', assembly.toSource())

Or create metadata from scratch for JScript:

const assembly = Assembly({ language: 'jscript' })
 
assembly.set('AssemblyFileVersion', '1.2.3.4')
assembly.set('AssemblyInformationalVersion', '1.2.3')
 
const js = assembly.toSource({ preamble: true })

install

With npm do:

npm install assembly-source

license

MIT © Vincent Weevers

install

npm i assembly-source

Downloadsweekly downloads

2

version

0.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability