标签: bundle

如何在Xcode中为iPhone应用程序创建自己的包

我在为我的应用程序创建一个包并将文件放在包中时遇到了一些困难.

例如,Facebook已经使用他们的框架为iPhone应用程序开发了一个包.同样,我还想创建一个可以在许多应用程序中重用的包.

我的问题是:

  • 我应该遵循哪些步骤为任何类型的应用程序创建一个包?
  • 创建捆绑包时应该注意什么?

iphone xcode facebook bundle objective-c

11
推荐指数
2
解决办法
2万
查看次数

无法访问Bundle Resource/File(OSGi)

目前我正在使用Jetty和Equinox开发基于OSGi的WebApp(参见:http://wiki.eclipse.org/Jetty/Tutorial/EclipseRT-Jetty-Starter-Kit).到目前为止一切都很好,但我无法访问我自己的一些文件/资源.位置/路径是"configuration/data/config.csv"和"configuration/data/data.zip".我测试了一切:

context.getBundleContext().getBundle().getEntry("config.csv");
context.getBundleContext().getBundle().getResource("config.csv");
this.getClass().getClassLoader().getResource("config.csv");
context.getBundleContext().getDataFile("config.csv");
Run Code Online (Sandbox Code Playgroud)

当然所有可能的路径变体如:"configuration/data/config.csv","/ configuration/data/config.csv","\ configuration/data/config.csv","/ config.csv".此外,我已将文件夹添加到OSGi类路径(在MANIFEST.MF中):

Bundle-ClassPath: .,
 configuration/data/
Run Code Online (Sandbox Code Playgroud)

生成的URL看起来总是像这样(或null):"configuration/CBR-Data/config.csv",当我将它传输到File对象"D:\ configuration\CBR-Data\config.csv"时.

但我真正不明白的是我的一个DS的属性文件被完美加载:
<properties entry="configuration/dsconfig.properties"/>

有人有想法/提示或其他什么?我开车疯了......

resources osgi bundle file

11
推荐指数
1
解决办法
2万
查看次数

如何在symfony中重命名一个包?

我的包位于,src/Cinergy/Bundle/ComponentBundle/CinergyComponentBundle.php并且包的逻辑名称是'CinergyComponentBundle'.

由于我没有坚持公司的命名惯例,我必须更改捆绑的逻辑名称.让我知道我必须重命名它'XXXCinergyComponentBundle'

我需要更改哪些文件?

我尝试将CinergyComponentBundle.php文件和包含的类重命名为XXXCinergyComponentBundle.php.我还在AppKernel中更改了引用.

不幸的是,这不起作用.当我尝试清除缓存时,我收到以下错误消息:

[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]                                   
The service "cinergy.people.direct.php" has a dependency on a non-existent service "cinergy.work.registry". 
Run Code Online (Sandbox Code Playgroud)

这两个服务确实属于具有新名称的包.这使我得出结论,我在重命名过程中遗漏了一些东西.

有任何想法吗?

php bundle rename symfony

11
推荐指数
3
解决办法
1万
查看次数

NODE.JS的捆绑模块

ASP.NET MVC 4带来了将多个样式表或javascripts捆绑成如下所示的惊人工具:

bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
                    "~/Content/themes/base/jquery.ui.core.css",
                    "~/Content/themes/base/jquery.ui.datepicker.css",
                    "~/Content/themes/base/jquery.ui.theme.css"));
Run Code Online (Sandbox Code Playgroud)

NODE.JS是否有任何模块可以完成相同的任务 - 将客户端 javascript库捆绑成一个?我见过像browserify,uglifier等工具,但是这些需要手动调用控制台命令(或者我可能错过了什么?).同时,例如,消除这个过多的步骤并将中间件轻松集成到express.js应用程序中会很不错.

javascript bundle node.js

11
推荐指数
1
解决办法
5378
查看次数

Errno :: EACCES:通过gitlab安装gem时权限被拒绝

我正在尝试设置gitlab,从而使用sudo从另一个用户帐户安装一些宝石,但我经常遇到Permission denied错误.

sudo -u gitlab -H bundle install --deployment --without development test postgres

> Using ... ( a lot of successful gems there )
> Using pygments.rb (0.3.2) from https://github.com/gitlabhq/pygments.rb.git (at master) 
> Errno::EACCES: Permission denied - pygments.rb-0.3.2.gem
> An error occurred while installing pygments.rb (0.3.2), and Bundler cannot continue.
> Make sure that `gem install pygments.rb -v '0.3.2'` succeeds before bundling.\



sudo -u gitlab -H gem install pygments.rb -v '0.3.2'

> Successfully installed pygments.rb-0.3.2
> 1 gem …
Run Code Online (Sandbox Code Playgroud)

ruby gem bundle bundler gitlab

11
推荐指数
2
解决办法
4万
查看次数

Asp.net mvc捆绑.合并效果很好.但压缩和缩小不起作用

我的所有javascript和css结合在一起.但是,当我看到他们没有缩小.我不知道为什么.

我的包如下所示:

         bundles.Add(new Bundle("~/bundles/jqueryval").Include(
            "~/Scripts/jquery-ui.js",
            "~/Scripts/jquery.validate.js",
            "~/Scripts/grid.locale-tr.js",
            "~/Scripts/jquery.jqGrid.js",
            "~/Scripts/bootstrap.js",
            "~/Scripts/messages_tr.js",
             "~/Scripts/jquery.form.js"
           )
       );
        bundles.Add(new Bundle("~/bundles/mainjs").Include(
            "~/Scripts/jquery-1.10.2.js",
            "~/Scripts/bootstrap.js",
            "~/Scripts/superfish.js",
            "~/Scripts/jquery.flexslider.js",
            "~/Scripts/jquery.kwicks-1.5.1.js",
            "~/Scripts/jquery.easing.1.3.js",
            "~/Scripts/jquery.cookie.js",
            "~/Scripts/touchTouch.jquery.js"
           )
       );

        bundles.Add(new Bundle("~/bundles/allcss").Include(
           "~/Content/Css/bootstrap*",
           "~/Content/Css/opa-icons.css",
           "~/Content/Css/charisma-app.css",
           "~/Content/Css/ui.jqgrid.css",
           "~/Content/Css/jquery-ui.css"
           )
       );

        bundles.Add(new Bundle("~/bundles/maincss").Include(
           "~/Content/Css/bootstrap.css",
           "~/Content/Css/responsive.css",
           "~/Content/Css/style.css",
           "~/Content/Css/touchTouch.css",
           "~/Content/Css/kwicks-slider.css"
           )
       );
Run Code Online (Sandbox Code Playgroud)

我的全球性asax如下所示:

        protected void Application_Start()
    {
#if DEBUG
        BundleTable.EnableOptimizations = false;
#else
                    BundleTable.EnableOptimizations = true;
#endif
        AreaRegistration.RegisterAllAreas();
        WebApiConfig.Register(GlobalConfiguration.Configuration);
        FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
        RouteConfig.RegisterRoutes(RouteTable.Routes);
        BundleConfig.RegisterBundles(BundleTable.Bundles);

        GlobalConfiguration.Configuration.MessageHandlers.Add(new CorsHandler());
    }
Run Code Online (Sandbox Code Playgroud)

和:

 @System.Web.Optimization.Scripts.Render("~/bundles/mainjs")
 @System.Web.Optimization.Styles.Render("~/bundles/maincss")
Run Code Online (Sandbox Code Playgroud)

asp.net asp.net-mvc bundle asp.net-mvc-4

11
推荐指数
2
解决办法
6459
查看次数

"BundleTable.EnableOptimizations = true;" 自动缩小文件或只选择.min(如果可用)

我需要知道指定"BundleTable.EnableOptimizations = true;"是否会自动缩小文件(js和Css),或者只选择.min(如果可用)?

asp.net-mvc bundle asp.net-mvc-5

11
推荐指数
1
解决办法
1万
查看次数

需要来自不同的模块 - 单独生成 - webpack包

我正在构建一个应用程序,可以根据需要加载各种模块(由不同的webpack配置生成的其他包).该BaseModule负责,知道什么时候加载的包和出口一些默认的类一样BaseUtils.模块本身不知道可能需要加载的所有可能的模块/包.

TestModule是运行时按需加载BaseModule并TestModule希望使用的模块之一BaseUtils.

现在的问题是:是否有可能require('basemodule/BaseUtils')在TestModule,它有自己的webpack.config.js文件中,BaseModule列出外部?也就是说,有没有办法让生成的testmodule bundle重用生成的basemodule bundle中可用的模块?或者BaseModule是否需要导出到全局变量?

bundle module webpack

11
推荐指数
1
解决办法
215
查看次数

您没有对/Library/Ruby/Gems/2.3.0目录的写许可权

当我gem install bundler在MacOS 10.13.x中使用命令时,错误是You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.

$ gem install bundler
Fetching: bundler-1.16.2.gem (100%)
ERROR:  While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
Run Code Online (Sandbox Code Playgroud)

macos bundle rubygems

11
推荐指数
3
解决办法
5401
查看次数

Nextjs 构建包包含两次 React-dom

我设置了 webpack 分析器来查看我的包大小,我注意到 React-dom 被包含了两次。有谁知道这是为什么以及如何解决它? 在此输入图像描述

这也是我的 package.json:

{
  "name": "test",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint",
    "analyze": "cross-env ANALYZE=true next build"
  },
  "dependencies": {
    "framer-motion": "^10.12.16",
    "next": "^13.4.6",
    "react": "^18.2.0",
    "react-dom": "^18.2.0"
  },
  "devDependencies": {
    "@next/bundle-analyzer": "^13.4.6",
    "autoprefixer": "^10.4.14",
    "cross-env": "^7.0.3",
    "postcss": "^8.4.24",
    "tailwindcss": "^3.3.2"
  }
}
Run Code Online (Sandbox Code Playgroud)

bundle reactjs webpack react-dom next.js

11
推荐指数
0
解决办法
539
查看次数