首页 \ 问答 \ 使用YUI Compressor任务MSBuild事件创建新目录(Creating new Directory with YUI Compressor task MSBuild Event)

使用YUI Compressor任务MSBuild事件创建新目录(Creating new Directory with YUI Compressor task MSBuild Event)

我正在使用YUI进行缩小。 一切正常。 我打算每次都将生成的文件保存在不同的目录中。 但是,如果我给出一条不存在的路径,则此任务无法生成目录。 对我来说,数字79将不断变化,以便每次都有一条新路径。 如果该文件夹已经存在,那么它会罚款它复制缩小的文件。

在生成文件时,如果不存在,则创建目录时有任何想法或帮助。

我将下面的一个与MSBuild集成为post build事件

 <JavaScriptCompressorTask
         SourceFiles="@(jsfile_global)"
         DeleteSourceFiles="false"
         OutputFile="minified/79/global-min.js"
         CompressionType="Standard"
         LoggingType="Info"
         LineBreakPosition="-1"         
    />

任何帮助或方向将非常感激。

谢谢。


I am using YUI for minification. It all works fine. I am planning to keep the generated file in a different directory each time. But if i give a path which doesn't not exist , this task is not able to generate the directory. for me the number 79 will keep changing so that everytime its a new path. If the folder already exists then it fines it copies the minified file.

Any idea or help in creating directory if not exists while generating the file.

I integrated the below one with MSBuild as post build event

 <JavaScriptCompressorTask
         SourceFiles="@(jsfile_global)"
         DeleteSourceFiles="false"
         OutputFile="minified/79/global-min.js"
         CompressionType="Standard"
         LoggingType="Info"
         LineBreakPosition="-1"         
    />

any help or direction will be really appreciated.

Thanks.


原文:https://stackoverflow.com/questions/16029354
更新时间:2024-03-31 19:03

最满意答案

它是由window.location.hash中的状态URI编码引起的。 对我来说,这解决了这个问题:

if (window.location.hash) {
window.location.hash = decodeURIComponent(window.location.hash);
// authorizedCallback returns wrong result when hash is URI encoded
this.oidcSecurityService.authorizedCallback();
} else {
this.oidcSecurityService.authorize();
}

It is caused by URI encoding of state in the window.location.hash. For me this fix the issue:

if (window.location.hash) {
window.location.hash = decodeURIComponent(window.location.hash);
// authorizedCallback returns wrong result when hash is URI encoded
this.oidcSecurityService.authorizedCallback();
} else {
this.oidcSecurityService.authorize();
}

相关问答

更多

相关文章

更多

最新问答

更多
  • linux环境下怎么用maven编译一个已有的java项目?
  • Ionic2和IonicDeploy(Ionic2 and IonicDeploy)
  • 尝试分组和别名数据时出错(Error when Attempting to Group and Alias Data)
  • Facebook PHP API错误代码100:API中提供的appsecret_proof无效(Facebook PHP API Error code 100: Invalid appsecret_proof provided in the API)
  • 不用u盘和光盘怎么安装linux系统
  • 表名作为变量参数(Table name as variable parameter)
  • 我想学计算机 在望京花园住 附近那有这样的地方可以学
  • 删除原始记录的重复项(Removing duplicates with original records)
  • Pandas:使用.astype(str)时忽略空值?(Pandas: ignore null values when using .astype(str)?)
  • Python新手阵列 - 列表转换[重复](Python newbie array - list conversion [duplicate])
  • java.lang.String cannot be cast to java.lang.Float
  • 带参数的选择器(Selector with argument)
  • python中的for循环语法(for loop syntax in python)
  • Nunit - 无法检索类别属性(NUnit - Can't retrieve a category property)
  • python3 xpath无法到达子节点(AttributeError:'NoneType'对象没有属性'text')(python3 xpath can't reach a child node (AttributeError: 'NoneType' object has no attribute 'text'))
  • Android自动 - 如何启用开发人员模式(Android auto - how to enable developer mode)
  • java weka stringtowordvector没有正确计算单词出现次数(java weka stringtowordvector is not counting word occurences properly)
  • 如何解释DHT响应中的“节点”?(How to interpret 'nodes' in a DHT response?)
  • 什么是使用opencv和树莓相机模块进行人脸检测的最佳算法(What is the best algorithm for face detection using opencv and raspberry camera module)
  • 可以somone解释这两个问题的解决方案(c程序,mutex,线程)吗?(Can someone explain the solution of these two questions (c program,mutex,threads)?)
  • 如何解决SyntaxError:意想不到的令牌var gulp(How to fix SyntaxError: Unexpected token var in gulp)
  • 在满足R中的第一个实例后,在所有行中分配值(Assign value in all rows following satisfaction of first instance in R)
  • 如何记录Atk4 auth /登录事件(How to log Atk4 auth/login event)
  • 是否有必要在新的scala项目中添加我的自定义scala库依赖项?(is it necessary to add my custom scala library dependencies in new scala project?)
  • Java中对象类的继承(Inheritance of Object Class in Java)
  • 如何在jquery自动完成中获取当前元素?(How to get current element in jquery autocomplete?)
  • 学电子商务甚么大学好
  • @Override在java中(@Override in java)
  • 虚拟机中怎么给linux装office
  • Laravel邮件参数(sendmail / smtp)(Laravel mail parameters (sendmail/smtp))