Giter Club home page Giter Club logo

grunt-umbraco-package's People

Contributors

abjerner avatar ninjaonsafari avatar tomfulton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

grunt-umbraco-package's Issues

Allow specifying iconUrl

In the latest versions of Umbraco, I think when the new packager was implemented in developer section, the package.xml has a iconUrl, which is used when uploading a local package (.zip) in Umbraco backoffice.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<umbPackage>
  <files />
  <info>
    <package>
      <name>Test</name>
      <version>1.0.0</version>
      <iconUrl />
      <license url="http://opensource.org/licenses/MIT">MIT License</license>
      <url>http://our.umbraco.org</url>
      <requirements type="strict">
        <major>7</major>
        <minor>5</minor>
        <patch>9</patch>
      </requirements>
    </package>
    <author>
      <name>Bjarne Fyrstenborg</name>
      <website>www.bjarnefyrstenborg.dk</website>
    </author>
    <readme><![CDATA[]]></readme>
  </info>
  <DocumentTypes />
  <Templates />
  <Stylesheets />
  <Macros />
  <DictionaryItems />
  <Languages />
  <DataTypes />
</umbPackage>

Allow specifying requirements from options

It seems it is not possible via the options object to specify the requirements (minimum Umbraco version). It just set requirements to 0.0.0

requirements: {
major: 0,
minor: 0,
patch: 0
}

When creating a package from Umbraco backoffice it set the requirements (default to Umbraco version in which the package is created).

<requirements type="strict">
        <major>7</major>
        <minor>5</minor>
        <patch>9</patch>
</requirements>

It would be great to add an object to handle this from json config, e.g.

{
	"name": "Switcher",
	"description": "Switcher for Umbraco 7",
	"directory": "Switcher",
	"version": "1.0.3",
	"requirements": {
		"major": 7,
		"minor": 5,
		"patch": 0
	},
	"url": "https://github.com/bjarnef/Switcher",
	"author": "Bjarne Fyrstenborg",
	"authorUrl": "https://github.com/bjarnef",
	"license": "MIT",
	"licenseUrl": "http://opensource.org/licenses/MIT",
	"readme": "Switcher is a simple property editor that works as an alternative to the core true/false datatype. It can be used for different kinds of true/false values e.g. on/off, active/deactive or enabled/disabled and gives a more visual feedback to the content editor. Furthermore it is great for content editors, who edit content from tablets, where the switch-button is touch friendly."
}

Missing "/" for orgPath element when Including file at root of project

How to reproduce.

  1. Include a file at the root of the project.
  2. Run the grunt umbraco packaging
  3. Try to install the package manually - Umbraco throw a 500. It occurs for all umbraco v7+.

Reason: orgPath is empty for files at the root:

`

	<file>
		<guid>myfile.html</guid>

		<orgPath></orgPath>

		<orgName>myfile.html</orgName>

	</file>

`

Fix: Files added at the root need a slash:

`

	<file>

		<guid>myfile.html</guid>

		<orgPath>/</orgPath>

		<orgName>myfile.html</orgName>

	</file>

`

The specific error is this:
2017-07-03 10:54:42,824 [P6248/D2/T34] ERROR umbraco.cms.businesslogic.packager.Installer - Error importing file E:\Temp\UmbracoCms.7.6.3\App_Data\97508966-55a6-4fbd-ba69-35d4df4ef3dd.umb
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at umbraco.cms.businesslogic.packager.Installer.GetFileName(String path, String fileName)
at umbraco.cms.businesslogic.packager.Installer.LoadConfig(String tempDir)
at umbraco.cms.businesslogic.packager.Installer.Import(String inputFile, Boolean deleteFile)
2017-07-03 10:54:42,824 [P6248/D2/T34] ERROR Umbraco.Web.WebApi.Filters.FileUploadCleanupFilterAttribute - Could not acquire actionExecutedContext.Response.Content
System.NullReferenceException: Object reference not set to an instance of an object.
at Umbraco.Web.WebApi.Filters.FileUploadCleanupFilterAttribute.OnActionExecuted(HttpActionExecutedContext actionExecutedContext)

Referenced package.xml seems to be copied 1:1

Hi Tom,

Great initiative creating this package :D

I'm not sure whether I have done something wrong, but I've tried following the instructions from the readme file.

My main problem is that when referencing my package.xml file, it seems to be copied 1:1 to the ZIP file, and the <files /> element in the XML remains empty, even though the files of my package are added to the ZIP file. Values like the name and version specified in the Grunt config aren't added to the manifest either.

I also experience a few other issues:

  • If I run the task again, the ZIP file isn't overwritten, so if I run the task twice, files from my package will be added twice to the ZIP file.
  • Running the task will create a new temporary folder in the source directory. I guess this is fine, but the temporary folder isn't deleted afterwards.

Since I couldn't get this to work, I've created a new Grunt task roughly based on this one. Should I create a pull request with my changes, or just create a new, similar package?

My task will take the same configuration as yours - except the manifest option - and then automatically generate the entire manifest. This however doesn't take extra resources like document types, templates and similar into consideration, but that could be added as well.

Use node-archiver instead of adm-zip

I have a few files that get corrupted by adm-zip. From what I understand the only npm package to reliably zip all files is node-archiver. Any chance this can be switched out?

Allow for Package Actions to be Included

One one of my projects, I recently added a package action that gives the user installing the package permission to see the section added by that package: rhythmagency/formulate@ae20953

I was thinking of using grunt-umbraco-package to create the Umbraco package so I don't have to do it manually every time I create a release. However, I didn't see any documentation that indicated it was possible to add package actions with this tool, so I'll have to go the manual route for now.

Would be awesome if you added support for package actions to be included.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.