publish

如何上传自己的npm包和安装上传的npm包并使用

为君一笑 提交于 2019-11-29 23:56:21
第一步: 首先我们去 npm 官网注册一个账号。 如果你的username一直不能注册成功,可以在你的username前面加一个~,就可以注册成功了。 第二步: 1.新建一个项目 2.生成package.json文件 npm init package name: (testpublish) //包名,可更改,也可以使用默认(直接回车) version: (1.0.0) 0.0.1 //版本,可更改,也可以使用默认(直接回车) description: 演示上传npm包 //项目描述,方便别人了解你的模块作用,搜索的时候也有用 entry point: (index.js) //指定了程序的主入口文件,可更改,也可以使用默认(直接回车) test command: //测试命令(直接回车) git repository: //git仓库(直接回车) keywords: //一个字符串数组,方便别人搜索到本模块,可更改,也可以使用默认(直接回车) author: Heath //作者,可更改,也可以使用默认(直接回车) license: (ISC) //你可以在https://spdx.org/licenses/这个地址查阅协议列表 ,可更改,也可以使用默认(直接回车) 3.新建index.js文件 因为上面生成package时,使用的主文件叫index.js

Publishing from Visual Studio 2015 - allow untrusted certificates

≡放荡痞女 提交于 2019-11-29 20:50:39
I am publishing my ASP.NET 5 MVC6 project from Visual Studio 2015. I have imported publish profile from my server. Connection validates successfully, however when I publish my project I have the following error: ERROR_CERTIFICATE_VALIDATION_FAILED Connected to the remote computer ("XXXXXXXXX") using the specified process ("Web Management Service"), but could not verify the server's certificate. If you trust the server, connect again and allow untrusted certificates. There is no option to allow untrusted certificates in publishing settings. The option to allow untrusted certificates is not yet

How to deploy a jekyll site locally with css, js and background images included?

爱⌒轻易说出口 提交于 2019-11-29 19:27:50
I've been trying to load my octopress site (based on jekyll) to my local network. There is no server, I just want it available locally on a shared folder. Every time i deploy it to a local folder the css and js and background image links are broken. The available options such as rsync, github and heroku all require ssh's and passwords. This can be found here: http://octopress.org/docs/deploying/ Is there a rake option that helps with this? SOLVED: Kikito, Thank you very much for the guidance. I just implemented it and forked a git repository. There is one problem, though. I have used this

Post-build event command for publish (Visual Studio 2010)

喜夏-厌秋 提交于 2019-11-29 18:54:22
问题 I have a project in visual studio 2010. This project has the following post-build event command lines: SET TARGET_PROJECT=TestMain IF NOT EXIST "$(TargetDir)IceBox" ( XCOPY /E /I /Y "$(SolutionDir)Externals\IceBox" "$(TargetDir)IceBox" ) IF NOT EXIST "$(TargetDir)bzip2.dll" ( COPY "$(SolutionDir)Externals\IceBox\bzip2.dll" "$(TargetDir)" ) XCOPY /E /I /Y "$(SolutionDir)Externals\Infragistics" "$(TargetDir)" But this commands are just used when I create a debug or a release. When I publish my

VS2012 publish multiple projects in a solution

て烟熏妆下的殇ゞ 提交于 2019-11-29 17:19:32
问题 We are using VS2012. We have a solution with mulitple web projects and are using publish to deploy a project. There are already quite a few projects in the solution. To publish all of them at once it is pretty time consuming. Is there a way to publish all the projects at once? 回答1: I found out I can use msbuild at the command line to publish multiple projects. msbuild example.sln /p:Configuration=Test;DeployOnBuild=true;PublishProfile=Test.example.pubxml /MaxCpuCount:8 回答2: You might be

Django之模型层(2)

纵然是瞬间 提交于 2019-11-29 16:28:32
Django之模型层(2) 一、创建模型 实例:我们来假定下面这些概念,字段和关系。 作者模型:一个作者由姓名和年龄。 作者详细模型:把作者的详情放到详情表,包含生日,手机号,家庭住址等信息。作者详情模型和作者模型之间是一对一的关系(one-to-one)。 出版社模型:出版商有名称,所在城市以及email。 书籍模型:书籍有书名和出版日期,一本书可能会有多个作者,一个作者也可以写多本书,所以作者和书籍的关系就是多对多的关联关系(many-to-many);一本是只应该由一个出版商出版,所以出版商和书籍是一对多关联关系(one-to-many)。 模型建立如下: from django.db import models # Create your models here. class Author(models.Model): nid = models.AutoField(primary_key=True) name=models.CharField( max_length=32) age=models.IntegerField() # 与AuthorDetail建立一对一的关系 authorDetail=models.OneToOneField(to="AuthorDetail",on_delete=models.CASCADE) class AuthorDetail

redirect user after facebook share and publish

江枫思渺然 提交于 2019-11-29 12:53:11
How can I redirect a user to a specific URL if the user publishes and to a different URL if he skips? https://www.facebook.com/dialog/feed? app_id=123050457758183& link=https://developers.facebook.com/docs/reference/dialogs/& picture=http://fbrell.com/f8.jpg& name=Facebook%20Dialogs& caption=Reference%20Documentation& description=Using%20Dialogs%20to%20interact%20with%20users.& message=Facebook%20Dialogs%20are%20so%20easy!& redirect_uri=http://www.example.com/response The above example redirects the user to same URL whether he clicks publish or skip. I tried the example given below: <script>

模型层之多表操作

久未见 提交于 2019-11-29 12:42:10
创建模型 假定下面这些概念,字段和关系 作者模型:一个作者有姓名和年龄。 作者详细模型:把作者的详情放到详情表,包含生日,手机号,家庭住址等信息。作者详情模型和作者模型之间是一对一的关系(one-to-one) 出版商模型:出版商有名称,所在城市以及email。 书籍模型: 书籍有书名和出版日期,一本书可能会有多个作者,一个作者也可以写多本书, 所以作者和书籍的关系就是多对多的关联关系(many-to-many); 一本书只应该由一个出版商出版,所以出版商和书籍是一对多关联关系(one-to-many)。 为了存储出版社的邮箱,地址,在 Book 表后面加字段 这样会有大量重复的数据,浪费空间 一对多: 一个出版社对应多本书(关联信息建在多的一方,也就是 Book 表中) 一旦确定表关系是一对多,在多对应的表中创建关联字段 多对多: 一本书有多个作者,一个作者出多本书 一旦确定表关系是多对多,创建第三张关系表 (中间表,中间表就三个字段,自己的 id,书籍 id 和作者 id) 一对一: 对作者详细信息的扩展 一旦确定是一对一的关系,在两张表中的任意一张表中建立关联字段+Unique 在 models 创建如下模型 from django.db import models # Create your models here. class Book(models.Model):

Silverlight application cannot access WCF services on other machines

て烟熏妆下的殇ゞ 提交于 2019-11-29 12:12:40
I have a silverlight application which works perfectly and can access the WCF services which are hosted in silverlight application itself. The port it is using is 1794. When I deploy to other servers (dev or test or staging), the application is not able to access WCF services. This is a snippet from my ServiceReference.ClientConfig looks like <endpoint address="http://localhost:1794/MyWebService.svc" binding="customBinding" bindingConfiguration="CustomBinding_MyWebService" contract="ConfigMgmtServiceReference.MyWebService" name="CustomBinding_MyWebService" /> My root folder contains the

Visual Studio 2013 Build and Publish

牧云@^-^@ 提交于 2019-11-29 11:56:29
I have mixed web and windows projects in VS 2013. I have a solution to build all the projects. For testing purposes I would like to automatically deploy some of the web projects into a local folder. I can do that manually, right click menu and select publish... I have created publish profile which looks like <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <WebPublishMethod>FileSystem</WebPublishMethod> <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> <LastUsedPlatform>Any CPU</LastUsedPlatform>