assembly-source

2019-02-13 admin

assembly-source是什么

什么是assembly-source,Create or change .NET assembly attributes in C# and JScript source code

assembly-source使用教程帮助文档

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

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-53653.html

文章标题:assembly-source

回到顶部